Change a players name on the server.
#1

on my script, i want to make it so, i can choose the Clan tag, while in game...so, for example, If my name is 'Darren' on the server, I use a command (/clan for example) and i say /clan TSF and my name on the Server turns into '[TSF]Darren'

(also it would be helpfull if its possible to save this clan tag to a Godfather-like Register system...)
Reply
#2

SetPlayerName

And more precisely, something like that.

pawn Code:
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
format(PlayerName, sizeof PlayerName, "[%s]%s", cmdtext[6], PlayerName); //assuming command is "/clan", cmdtext[6] is the start of the command argument.
SetPlayerName(playerid, PlayerName);
Reply
#3

Thanks 0rb,

i didnt think of that ><
Reply
#4

How do i make it so its a MAX of 4 letters?

i got

/clantag [CLantag]

now, how do i make it a max of 4 letters
Reply
#5

strlen..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)