19.10.2010, 03:59
Add at the top where you have all your variables
Add to ongamemodeinit
Command
You must have a check to see if the gate is open or closed.
pawn Код:
new gate;
pawn Код:
gate = 1;
pawn Код:
if (strcmp(cmdtext, "/gate", true)==0)
{
if(IsPlayerInRangeOfPoint(playerid,20,782.09,-1384.78,12.75))
{
if(gate == 0)
{
MoveObject(gate,773.91998291016, -1384.759765625, 12.704795837402, 3.0);
SendClientMessage(playerid, COLOR_YELLOW, "Gate has opened");
gate = 1;
}
else
{
MoveObject(gate,782.34002685547, -1384.7600097656, 12.704795837402, 3.0)
SendClientMessage(playerid, COLOR_YELLOW, "Gates have closed");
gate = 0;
}
}
return 1;
}