18.05.2012, 09:18
I need commande for moving leader, when he isnt online
CMD:Removeleader(playerid,params[]) { new Name; if(sscanf(params,"s",Name)) return 0; new File[64]; format(file,64,"Accounts/%s.ini",Name); INI_Open(File); INI_WriteInt("Leader",0) //... INI_Save(); INI_Close(); //go on return true; }
Example:
Код:
CMD:Removeleader(playerid,params[]) { new Name; if(sscanf(params,"s",Name)) return 0; new File[64]; format(file,64,"Accounts/%s.ini",Name); INI_Open(File); INI_WriteInt("Leader",0) //... INI_Save(); INI_Close(); //go on return true; } #e: Stupid t9 |
GetPlayerName(playerid, name, 24);
format(file, sizeof(file), "yourmap/users/%s.ini", id);