Command for XtremeAdmin in another script
#1

public OnPlayerCommandText(playerid, cmdtext[])
{

if (strcmp("/spawnmenu", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
ShowMenuForPlayer(MainMenu, playerid);
TogglePlayerControllable(playerid, false);

return 1;
}
else
{
return SendClientMessage(playerid, 0xAFAFAFAA, "* This command is only for administrators!");
}
}

THAT's my code...but work for the RCON Admins...
I want make that command for Lv9 XtremeAdmins...can someone gimme a hand??
Reply
#2

you have to put all the functions of XtremeAdmin in your GM !
Reply
#3

there aren't other fast metods right ?:S
Reply
#4

no, juste add all the fs functions in your gm !!
or create your own admin system
Reply
#5

You can,but a little complex.
Here's example
Код:
//add in admin fs
forward func(playerid);
public func(playerid){
  return //player admin level
}
Код:
//add in your gm
stock func(playerid){
  return CallRemoteFunction("func","i",playerid);
}

//in OnPlayerCommandText
if(IsPlayerAdmin(playerid) && func(playerid) >= 9)
Have a nice day^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)