[SOLVED] Add player/clan [tag] when player chooses class?
#2

Giving player the tag...

pawn Код:
stock GivePlayerTag ( playerid , tag [ ] )
{
  new name [ MAX_PLAYER_NAME ];
  new newname [ 30 ];

  GetPlayerName ( playerid , name , MAX_PLAYER_NAME );

  format ( newname , sizeof ( newname ) , "[%s]%s" , tag , name );

  SetPlayerName ( playerid , string );

  return 1;
}
Untested. Please let me know if it doesnt work.

Usage:

pawn Код:
GivePlayerTag ( playerid , "LOL" );
if the players name is Cake that would turn the players name into [LOL]Cake.

I once made a GetPlayerTag function and ill see if i can find it for you.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)