/removeleader
#1

I need commande for moving leader, when he isnt online
Reply
#2

That won't be possible. Player must be online if you want to make command like /removeleader (id)

Go to scriptfiles and do it !
Reply
#3

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

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

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

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

Ingame do /rcon login rconpass

then /rcon mapname NewMapName
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)