How to make change name ?
#1

Hello guys, how to make change name with cmd ? but, i have save system.. the location of saving stats in : scriptfiles/nAdmin/Users and using .ini .. please help me to make change name with cmd..
Reply
#2

Just change at Users Folder
Reply
#3

Quote:
Originally Posted by Giroud12
Посмотреть сообщение
Just change at Users Folder
LOL.. i need with cmd to change name..

Quote:
Originally Posted by ******
Посмотреть сообщение
Did you use a save system that ties a file to a user name (and if so, why)?
yes, because to save money,score,etc
Reply
#4

Yo,take a look at this thread : https://sampforum.blast.hk/showthread.php?tid=327076
Reply
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
No, that's not an answer to my question. That's just a reason for a user system, not a reason for a user system that names files after users.
sorry, my english so bad.. so, i dont know what u mean.. so, how to make change name ?
Reply
#6

Код:
COMMAND:changename(playerid,params[])
{
    new OtherPlayer12, Msg12[170], Name12[24], Message12[150], OtherPlayerName12[24];
    SendAdminText(playerid,"/changename", params);
    if (APlayerData[playerid][PlayerLevel] < 5) return SendClientMessage(playerid, 0xFFFFFFFF, "[ERROR]: You don't have access!");
    else if(sscanf(params, "rs[170]", OtherPlayer12, Message12)) return SendClientMessage(playerid,0xFFFFFFFF, "SYNTAX: /changename <name/id> <newname>");
    GetPlayerName(playerid, Name12, sizeof(Name12));
    GetPlayerName(OtherPlayer12, OtherPlayerName12, sizeof(OtherPlayerName12));
    format(Msg12, sizeof(Msg12), "{FF6600}%s {FFFFFF}has changed {FF6600}%s {FFFFFF}his name to: {FF6600}%s", Name12, OtherPlayerName12, Message12);
    SendClientMessageToAll(0xFFFFFFFF, Msg12);
    SetPlayerName(OtherPlayer12, Message12);
    return 1;
}
Well, I can not help much seeming you did not go into detail about what you are using (zcmd, etc...) anyways hope this can help you. You will need to define the things in it and etc.
Reply
#7

Try this Broker :

pawn Код:
if(strcmp(cmd, "/changename", true) == 0)
    {
        GetPlayerName(playerid, sendername, sizeof(sendername));
        new tmpp[256];
        tmpp = strtok(cmdtext, idx);
        if(!strlen(tmpp))
        {
            SendClientMessage(playerid, COLOR_DBLUE, "Correct SYNTAX: /changename [playerid] [new nick]");
            return 1;
        }
        giveplayerid = strval(tmpp);
        tmp = strtok(cmdtext, idx);
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1337)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    SetPlayerName(giveplayerid, tmp);
                    format(string, sizeof(string), "AdmCMD: %s(%i) vam je promjenio ime u %s", sendername, playerid, tmp);
                    SendClientMessage(giveplayerid, COLOR_WHITE, string);
                    format(string, sizeof(string), "("COL_RED"C.Life{FFFFFF}!) You have changed ID %i's name to %s", giveplayerid, tmp);
                    SendClientMessage(playerid, COLOR_WHITE, string);
                    format(string, 256, "("COL_RED"C.Life{FFFFFF}!) "COL_RED"%s {FFFFFF}je promjenuo ime "COL_RED"%s{FFFFFF}-a u "COL_RED"%s.", sendername,giveplayer, tmp);
                    ABroadCast(WHITE,string,1);
                }
                else
                {
                    format(string, sizeof(string), "%d nije aktivan igrac.", giveplayerid);
                    SendClientMessage(playerid, COLOR_RED, string);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Nemate dozovolu za koristenje te komande!");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "Morate se prijaviti da biste koristili tu komandu!");
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)