Player Name
#1

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;
}
Reply
#2

You must post this on Languages section, not here.
Reply
#3

Oh sorry I did it to give certainty to ****** translate, and I copied the left side. Sorry.
Reply
#4

No problem, and use SSCANF not(strcmp? not so sure lol).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)