26.05.2014, 16:52
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.
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;
}

