How could I make a single Gate command, which all Law Enforcing teams could use. Like /gate at LSPD would open lspd gate even if it was a FBI member. And a LSPD member could open FBI gate. One /gate command.
No I have a LSPDGATE1 command. I use ZCMD
Код:
new LSPDGate1Open;
new LSPDGate1;
new stock GateTimer;
LSPDGate1 = CreateObject(968,1544.5999756,-1630.9000244,13.3999996,0.0000000,0.0000000,87.9949036);
CMD:LSPDGate1(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 15.0, 1544.5999756,-1630.9000244,13.3999996))
{
if (gTeam[playerid] == TEAM_LSPD, TEAM_NOOSE, TEAM_FBI)
{
if(LSPDGate1Open == 0)
{
MoveObject(LSPDGate1,1544.5999756,-1630.9000244,13.3999996,0.0000000,90.0000000,87.9999390,1.0);
LSPDGate1Open = 1;
}
else
{
MoveObject(LSPDGate1,1544.5999756,-1630.9000244,13.3999996,0.0000000,0.0000000,87.9949036,1.0);
LSPDGate1Open = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You are not a member of a Law Enforcing Agency.");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You are not near the gate.");
}
return 1;
}