Help?
#8

You can do it easilier.
Let's take a example with explications.
PHP код:
if(sscanf(params,"us[25]"targetnName)) return SendClientMessage(playerid, -1"/name [id_joueur] [new_name]"); 
Then do some verefications like
PHP код:
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1"This player is not connected.");
format(PATHT50"/Players/%s.ini"nName);
if(
fexist(PATHT)) return SendClientMessage(playerid, -1"Name already taken"); 
Remove the old file and attribute the new name.
PHP код:
        fremove(UserPath(target));
        
SetPlayerName(targetnName); 
Put new parameters like a new player who is regestering on your server.
PHP код:
new INI:File INI_Open(UserPath(target));
        
INI_WriteInt(File,"MDP"PlayerInfo[target][pMDP]);
        
INI_WriteInt(File,"Admin"PlayerInfo[target][pAdminlvl]);
        
INI_WriteInt(File,"Cash"PlayerInfo[target][pCash]);
        
INI_WriteInt(File,"Score"PlayerInfo[target][pScore]);
        
INI_Close(File); 
Dont copy/paste this code. He comes from my gamemode (my /name commands) and may not work on yours because I didn't put the whole code.
Reply


Messages In This Thread
Help? - by Micko123 - 08.06.2016, 21:06
Re: Help? - by J0sh... - 08.06.2016, 21:27
Re: Help? - by Micko123 - 08.06.2016, 21:29
Re: Help? - by J0sh... - 08.06.2016, 21:33
Re: Help? - by Micko123 - 08.06.2016, 21:35
Re: Help? - by J0sh... - 08.06.2016, 21:36
Re: Help? - by Micko123 - 08.06.2016, 21:38
Re: Help? - by Dayrion - 09.06.2016, 05:01
Re: Help? - by Micko123 - 09.06.2016, 06:16

Forum Jump:


Users browsing this thread: 2 Guest(s)