Change a players name on the server. - 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: Change a players name on the server. (
/showthread.php?tid=66245)
Change a players name on the server. -
Martin_Smith - 20.02.2009
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...)
Re: Change a players name on the server. -
yom - 20.02.2009
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);
Re: Change a players name on the server. -
Martin_Smith - 20.02.2009
Thanks 0rb,

i didnt think of that ><
Re: Change a players name on the server. -
Martin_Smith - 20.02.2009
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
Re: Change a players name on the server. -
yom - 20.02.2009
strlen..