/removeleader - 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)
+--- Thread: /removeleader (
/showthread.php?tid=343614)
/removeleader -
System12 - 18.05.2012
I need commande for moving leader, when he isnt online
Re: /removeleader -
MichaelProPlayer - 18.05.2012
That won't be possible. Player must be online if you want to make command like /removeleader (id)
Go to scriptfiles and do it !
Re: /removeleader -
iRage - 18.05.2012
Quote:
Originally Posted by MichaelProPlayer
That won't be possible. Player must be online if you want to make command like /removeleader (id)
Go to scriptfiles and do it !
|
Actually it is possible, checking if the name he entered is a valid userfile then editing a value inside it.
AW: /removeleader -
Dominik. - 18.05.2012
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;
}
This an untested Example, written in iPod.
#e:
Stupid t9
Re: AW: /removeleader -
System12 - 18.05.2012
Quote:
Originally Posted by Dominik.
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;
}
This an untested Example, written in iPod.
#e:
Stupid t9
|
I dont have define new Name; and new File[64];
Have I define it or not
Re: /removeleader -
milanosie - 18.05.2012
ofcourse it is possible, works the same way as my /offlineban.
pawn Код:
GetPlayerName(playerid, name, 24);
format(file, sizeof(file), "yourmap/users/%s.ini", id);
Just change the map
Re: /removeleader -
JAMMIEISFTW - 18.05.2012
Ingame do /rcon login rconpass
then /rcon mapname NewMapName