Command for XtremeAdmin in another script - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command for XtremeAdmin in another script (
/showthread.php?tid=87451)
Command for XtremeAdmin in another script -
caldaia - 20.07.2009
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??
Re: Command for XtremeAdmin in another script -
James_Alex - 20.07.2009
you have to put all the functions of XtremeAdmin in your GM !
Re: Command for XtremeAdmin in another script -
caldaia - 20.07.2009
there aren't other fast metods right ?:S
Re: Command for XtremeAdmin in another script -
James_Alex - 20.07.2009
no, juste add all the fs functions in your gm !!
or create your own admin system
Re: Command for XtremeAdmin in another script -
yezizhu - 20.07.2009
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^^