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, 12:39 AM   #1
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, 12:47 AM   #2
Hal's Avatar
Join Date: May 2010
Location: Toronto, Canada
Posts: 1,200
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, 12:50 AM   #3
Retardedwolf's Avatar
Join Date: Jun 2009
Posts: 1,566
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, 01: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:

#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] <= ' ')) {

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) {
        result[index - offset] = string[index];
    result[index - offset] = EOS;
    return result;
case 1337: is offline  
Old 10/12/2010, 01:19 AM   #5
Join Date: Nov 2009
Posts: 2,481
Reputation: 170
Default Re: [HELP] Hide Name

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.
If you read my old posts; I apologize in advance.
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 05:10 AM.

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