nick change help -
jaksimaksi - 28.01.2011
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..
Re: nick change help -
Ihsan-Cingisiz - 28.01.2011
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!
Re: nick change help -
jaksimaksi - 28.01.2011
I know this, but i want to save, the new nickname to registration file..
Re: nick change help -
Ihsan-Cingisiz - 28.01.2011
Quote:
Originally Posted by jaksimaksi
I know this, but i want to save, the new nickname to registration file..
|
Oh okay hmm.. Try this:
Re: nick change help -
Ihsan-Cingisiz - 28.01.2011
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.
Re: nick change help -
jaksimaksi - 28.01.2011
ty, but i dont have variable playername, i have just a usr. file called with players name, its possible to change it?
Re: nick change help -
Ihsan-Cingisiz - 28.01.2011
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..
Re: nick change help -
iMonk3y - 28.01.2011
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
Re: nick change help -
jaksimaksi - 29.01.2011
yea... but, my registration is using dini... I think i cant edit my server files with dudb when they are called .usr
Re: nick change help -
jaksimaksi - 29.01.2011
anny suggestions, please?