Player 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)
+--- Thread: Player Name (
/showthread.php?tid=515544)
Player Name -
NiKi123 - 26.05.2014
Hi I want to do the "Admin changed nick player".
Normally ladies SetPlayerName ... but it saves only the game and I need to make it also saved in scriptfiles.
Код:
COMMAND:setnick(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(alevel[playerid] < 1) return SCM(playerid, BIELA, "[ ! ] You are not admin");
if(strlen(params) > 24) return SendClientMessage(playerid, B_BILA, "Bad number");
new pos;
if(!params[0] || !(pos = chrfind(' ', params) + 1) || !params[pos]) return SendClientMessage(playerid, B_BILA, "Pouћitн: /setnick [ID] [New Nick]");
new CMD_ID = strval(params);
if(!IsPlayerConnected(CMD_ID)) return SendClientMessage(playerid, B_BILA, "[ ! ] Player is not Online [ ! ]");
SetPlayerName(CMD_ID, params[pos]);
}
return 1;
}
Re: Player Name -
TheSimpleGuy - 26.05.2014
You must post this on
Languages section, not here.
Re: Player Name -
NiKi123 - 26.05.2014
Oh sorry I did it to give certainty to ****** translate, and I copied the left side. Sorry.
Re: Player Name -
TheSimpleGuy - 26.05.2014
No problem, and use SSCANF not(strcmp? not so sure lol).