SA-MP Forums Archive
I'm wondering how can i add something to a player's name? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I'm wondering how can i add something to a player's name? (/showthread.php?tid=158029)



I'm wondering how can i add something to a player's name? - Micko9 - 08.07.2010

Heres what i'd want:

Код:
Command:/tagme

Function:Adds [TNNP] On The End of The Nickname of the Player that did the function

Example:

PlayerName: Asdf

PlayerTypes: /tagme

Playername: Asdf[TNNP]



Re: I'm wondering how can i add something to a player's name? - Hiddos - 08.07.2010

pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
  if(!strcmp(cmdtext,"/tagme",true))
  {
    new pName[MAX_PLAYER_NAME], npName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,sizeof pName);
    format(npName,sizeof npName,"%s[TNNP]",pName);
    SetPlayerName(playerid,npName);
    return 1;
  }
  return 0;
}
MAX_PLAYER_NAME is 24, and it can't be set higher then that. So if the player's name is 19 characters or more, the tag won't show (Tag size = 6, 19 + 6 = 25)


Re: I'm wondering how can i add something to a player's name? - CAR - 08.07.2010

don't watch this msg


Re: I'm wondering how can i add something to a player's name? - Micko9 - 08.07.2010

OH LOL I forgot that XDDDDDDDDDDDD