nick change help
#1

pawn Код:
dcmd_nick(playerid, params[])
{
        if(strlen(params) < 4) return SendClientMessage(playerid,RED,"4 letters not more..");
                .....
                .....
                .....
        PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}

i dont know, how to make the nick change script, i use dini registration, help me please..
Reply
#2

Quote:
Originally Posted by jaksimaksi
Посмотреть сообщение
pawn Код:
dcmd_nick(playerid, params[])
{
        if(strlen(params) < 4) return SendClientMessage(playerid,RED,"4 letters not more..");
                .....
                .....
                .....
        PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}

i dont know, how to make the nick change script, i use dini registration, help me please..
pawn Код:
dcmd_nick(playerid, params[])
{
        if(strlen(params) < 4)
        {
                SendClientMessage(playerid,RED,"4 letters not more..");  
                return 1;
        }
            else
        {
                SetPlayerName(playerid, params);
                SendClientMessage(playerid,0xFFFFFFFF,"** You've changed your nick **");  
        }
        return 1;
}
Here you go, test this out, I think this was the script where you asked for..
Enjoy!
Reply
#3

I know this, but i want to save, the new nickname to registration file..
Reply
#4

Quote:
Originally Posted by jaksimaksi
Посмотреть сообщение
I know this, but i want to save, the new nickname to registration file..
Oh okay hmm.. Try this:
Reply
#5

Quote:
Originally Posted by Ihsan-Cingisiz
Посмотреть сообщение
Oh okay hmm.. Try this:
pawn Код:
dcmd_nick(playerid, params[])
{
    new file[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), "%s.ini", name);
   
    if(strlen(params) < 4)
    {
        SendClientMessage(playerid,RED,"4 letters not more..");
        return 1;
    }
    else
    {
        SetPlayerName(playerid, params);
        SendClientMessage(playerid,0xFFFFFFFF,"** You've changed your nick **");
        new name2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name2, sizeof(name2));
        dini_IntSet(file, "PlayerName", name2);
    }
    return 1;
}
I don't exactly know the dini_IntSet, it can be dini_Set or something because it's a
variable with character, maybe someone else can correct that.. Anyways, this was
all what i can do for you. I hope you will get enough help to solve your problem.
Reply
#6

ty, but i dont have variable playername, i have just a usr. file called with players name, its possible to change it?
Reply
#7

Quote:
Originally Posted by jaksimaksi
Посмотреть сообщение
ty, but i dont have variable playername, i have just a usr. file called with players name, its possible to change it?
Hmm.. If you don't have, this command i gave you will make it for you then..
So you don't need to do anything, but only solve the dini_IntSet, try it, if it
not work try dini_Set instead of dini_IntSet..
Reply
#8

This is what you need, I thnk.
Код:
How to set up a easy account?
Use udb_Create("Nickname","mypassword") to create a user with password=mypassword.
If you want to check the logins for this player, use udb_CheckLogin("Nickname","mypassword") - it should work!
If you want to set the clantag, use the new dUserSet("Nickname").("clantag","NEW").
If you want to set ASJKDHKSJDH use dUserSet("Nickname").("ASJKDHKSJDH ","jkhj123")
To get the value of "sads", type dUser("Nickname").("sads")
To remove the account use udb_Remove("Nickname") - it will return true, if the acc existed.
To rename an account use udb_renameUser("Nickname","NewNickname") - it will return true, if the acc existed.
https://sampforum.blast.hk/showthread.php?tid=31
Reply
#9

yea... but, my registration is using dini... I think i cant edit my server files with dudb when they are called .usr
Reply
#10

anny suggestions, please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)