SA-MP Forums Archive
Admin change 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Admin change name (/showthread.php?tid=66720)



Admin change name - Mitchell_Bouwman - 23.02.2009

Hello,

I am searching the script to change someone's name as admin. (Roleplay).
Could someone made it or give me advice?


Re: Admin change name - Mitchell_Bouwman - 23.02.2009

Bump!


Re: Admin change name - Lazarus - 23.02.2009

pawn Код:
if(strcmp(cmdtext, "/changename", true, 11) == 0)
{
    if(IsPlayerAdmin(playerid) == 0) return 0;
    if(strlen(cmdtext[12]) == 0) return 1;

    new pos = strfind(cmdtext, " ", true, 12);
    if(pos == -1) return 1;

    if(strlen(cmdtext[pos + 1]) == 0) return 1;

    SetPlayerName(strval(cmdtext[12]), cmdtext[pos + 1]);
    return 1;
}



Re: Admin change name - MenaceX^ - 23.02.2009

SetPlayerName(...