SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 10/12/2010, 01:39 AM   #1
Larsey123IsMe
Guest
 
Posts: n/a
Default [HELP] Hide Name

How to hide and show a player name in TAB

like: /hideme - Then my name dont show up in the TAB list.
and /showme - To get my name back on the TAB list

PS. Yes, i have searched for 30 mins now, but ill dont find antyhing
 
Old 10/12/2010, 01:47 AM   #2
Hal
High-roller
 
Hal's Avatar
 
Join Date: May 2010
Location: Toronto, Canada
Posts: 1,219
Reputation: 43
Default Re: [HELP] Hide Name

You cannot hide names from the tab list.
__________________

Wanna start a project thats NOT sa-mp with me? I have a bunch of server space, PM me.
Hal is offline  
Old 10/12/2010, 01:50 AM   #3
Retardedwolf
High-roller
 
Retardedwolf's Avatar
 
Join Date: Jun 2009
Posts: 1,600
Reputation: 60
Default Re: [HELP] Hide Name

You could someone's name to black and you wouldn't really see it
Retardedwolf is offline  
Old 10/12/2010, 02:14 AM   #4
case 1337:
Big Clucker
 
case 1337:'s Avatar
 
Join Date: Dec 2010
Posts: 62
Reputation: 0
Default Re: [HELP] Hide Name

Maybe store their name in a file or a variable, then when you type /showme again your name would be set back to your old name, like the code below me, but logging would reset the variable, so here, try this:

pawn Code:
#include <a_samp>

new Name[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
    new idx;
    cmd = strtok(cmdtext, idx);

    if(strcmp(cmd, "/hideme", true) == 0) {
        new randstring[4], PlayerName, pName[MAX_PLAYER_NAME];
        new randnumber = 127 + random(71762);
        PlayerName = GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        Name[playerid] = PlayerName;
        format(randstring, sizeof(randstring), "Unknown_%d",randnumber);
        SetPlayerName(playerid, randstring);
        SendClientMessage(playerid, 0xFFFFFFAA, "You hid yourself.");
        SetPlayerColor(playerid, 0x00000000);
        return true;
    }
    if(strcmp(cmd, "/showme", true) == 0) {
        SetPlayerName(playerid, Name[playerid]);
        SendClientMessage(playerid, 0xFFFFFFAA, "You revealed yourself.");
        SetPlayerColor(playerid, 0xFFFFFFAA);
        return true;
    }
    return 0;
}


strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' ')) {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
case 1337: is offline  
Old 10/12/2010, 02:19 AM   #5
Steven82
High-roller
 
Join Date: Nov 2009
Location: I don't know....
Posts: 2,626
Reputation: 168
Default Re: [HELP] Hide Name

Quote:
Originally Posted by Retardedwolf View Post
You could someone's name to black and you wouldn't really see it
Wouldn't work, when someone clicks on the name, it's highlights.
Steven82 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide HUD Help TheDarkness Everything and Nothing 6 21/10/2009 07:43 AM
Hide hud [SOB]Chris Client Support 4 01/09/2009 09:05 AM
How to hide the name hp & armour tab ?? ic111164 Help Archive 3 20/07/2009 04:04 PM
welcome msg not hide for second player [SOB]Chris Help Archive 1 19/07/2009 08:54 PM


All times are GMT. The time now is 08:45 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.