Saving name change
#1

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?

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;
}
Thank you if you are able to help me out!
Reply
#2

What saving system are you using?
Reply
#3

Oh, shit, i forgot about putting that xD, i'm using INI
Reply
#4

Show your saveplayer stock
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)