Fast question regarding admin - 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: Fast question regarding admin (
/showthread.php?tid=298813)
Fast question regarding admin -
remyguys - 22.11.2011
For example i have the underneath line,
And i would like to enable that admins(all admins) can also open the gate (im just asking for one gate so i know how to use it on the other gates too.)
Thanks in Advance!
PHP код:
if (!strcmp("/lsmsopen", cmdtext))
{
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 3)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1128.59997559, -1740.90002441, 9.50000000))
{
MoveObject(Gate, 1128.59997559, -1740.90002441, 9.50000000, 1); //fType 1
SendClientMessage(playerid, 0xEF994300, "Opening Gate.");
return 1;
}
}
}
Re: Fast question regarding admin -
IceCube! - 22.11.2011
PHP код:
if (!strcmp("/lsmsopen", cmdtext))
{
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 3 || PlayerInfo[playerid][pAdmin] >= 1) // If this doesnt work create another if statement
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1128.59997559, -1740.90002441, 9.50000000))
{
MoveObject(Gate, 1128.59997559, -1740.90002441, 9.50000000, 1); //fType 1
SendClientMessage(playerid, 0xEF994300, "Opening Gate.");
return 1;
}
}
}
[/QUOTE]
Re: Fast question regarding admin -
remyguys - 22.11.2011
I get errors idd,
Maybe a rly stupid question, but what do you mean with create another if statement(i know what) but where and how
EDIT: Hold on i think it works..
THANKS IF IT WORKS