/setname problem - 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: /setname problem (
/showthread.php?tid=206246)
/setname problem -
TheKingOfSamp - 03.01.2011
I have a problem with changin names , When i change someones name it's change in game but he'll still able
to log in his previous name , For example : My name was jack and now i changed it to Eric , it changes in game
But when you log off you can log in jack and eric too.. thats the problem , Which mean 2 users goes to the control panel , i didn't change..
I hope i get help
Thanks
Re: /setname problem -
Kaylux - 03.01.2011
Post your code first.
Re: /setname problem -
Jochemd - 03.01.2011
You need the delete the old player file, xD
Re: /setname problem -
TheKingOfSamp - 03.01.2011
Код HTML:
if(strcmp(cmd, "/setname", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new tmpp[256];
tmpp = strtok(cmdtext, idx);
if(!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /setname [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) has changed Your name to %s", sendername, playerid, tmp);
SendClientMessage(giveplayerid, COLOR_DBLUE, string);
format(string, sizeof(string), "AdmCMD: You have changed ID %i's name to %s", giveplayerid, tmp);
SendClientMessage(playerid, COLOR_DBLUE, string);
format(string, 256, "AdmWarning: %s has changed %s's his name to %s.", sendername,giveplayer, tmp);
ABroadCast(COLOR_YELLOW,string,1);
}
else
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
}
return 1;
}
there's the code
Re: /setname problem -
TheKingOfSamp - 03.01.2011
Quote:
Originally Posted by Jochemd
You need the delete the old player file, xD
|
Dude , It should be changed without deletin anything , When i change jack to eric it should change automatically in control panel...
Re: /setname problem -
Kaylux - 03.01.2011
Nowhere is that code does it change any kind of file. What file system do you use?
Re: /setname problem -
TheKingOfSamp - 03.01.2011
Quote:
Originally Posted by Kaylux
Nowhere is that code does it change any kind of file. What file system do you use?
|
ini.