/setname problem
#1

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
Reply
#2

Post your code first.
Reply
#3

You need the delete the old player file, xD
Reply
#4

Код 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
Reply
#5

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...
Reply
#6

Nowhere is that code does it change any kind of file. What file system do you use?
Reply
#7

Quote:
Originally Posted by Kaylux
Посмотреть сообщение
Nowhere is that code does it change any kind of file. What file system do you use?
ini.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)