/changename +REP
#4

Quote:
Originally Posted by Kiyozi_Mu
Посмотреть сообщение
pawn Код:
CMD:changename(playerid, params[])
{
    new id, newname[MAX_PLAYER_NAME];
    if(sscanf(params, "us[24]", id, newname)) return SendClientMessage(playerid, -1, "USAGE: /changename [playerid] [new name]");

    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not admin!"); //Change it to your admin enum or whatever
    if(IsPlayerConnected(id))
    {
        new pname[MAX_PLAYER_NAME];
        GetPlayerName(id, pname, MAX_PLAYER_NAME);
        if(strcmp(pname, newname))
        {
            SetPlayerName(id, newname);

            new string[64];
            format(string, sizeof(string), "users/%s.ini", pname); // Your user data folder
            fremove(string);
            //Then re-save the player
        }
        else return SendClientMessage(playerid, -1, "Oldname & Newname cannot same!");
    }
    else return SendClientMessage(playerid, -1, "Player not connected!");
        return 1;
}
Why the changename isn't saving ??when i logout , and login back with the new name why i must register ?? I'm Checking in the Scriptfiles/User/%s.sav the name isn't change to the new name.
Reply


Messages In This Thread
/changename +REP - by WhiteAngels - 03.04.2014, 04:27
Re: /changename +REP - by forgottenkings - 03.04.2014, 04:42
Re: /changename +REP - by RenovanZ - 03.04.2014, 04:50
Re: /changename +REP - by WhiteAngels - 03.04.2014, 05:07
Re: /changename +REP - by forgottenkings - 03.04.2014, 05:15
Re: /changename +REP - by WhiteAngels - 03.04.2014, 05:23
Re: /changename +REP - by forgottenkings - 03.04.2014, 05:28
Re: /changename +REP - by WhiteAngels - 03.04.2014, 05:38
Re: /changename +REP - by LocMax - 03.04.2014, 05:39
Re: /changename +REP - by forgottenkings - 03.04.2014, 05:46

Forum Jump:


Users browsing this thread: 1 Guest(s)