02.12.2014, 18:21
Hello, i have a name changing command for admins, but it doesn't save, i've looked for stuff to help me on ****** and nothing worked, could you please help me out here?
Thank you if you are able to help me out!
pawn Code:
ACMD:setname(playerid,params[])
{
if (pInfo[playerid][Adminlevel] < 2) return 0;
new name[MAX_PLAYER_NAME], str[130],str1[130], newname[MAX_PLAYER_NAME];
if(sscanf(params, "us", ID,newname)) return SCM(playerid,orange,"--- /setname <ID> <Newname> ---");
GetPlayerName(ID,name,24);
format(str,130,"You changed %s's name to %s",name,newname);
SCM(playerid,red,str);
format(str1,130, "%s %s has changed your name to %s",AdminLevelName(playerid), GetName(playerid),newname);
SCM(ID,red,str1);
SetPlayerName(ID,newname);
return 1;
}