14.07.2010, 13:01
To make gates, you need to store the variables. something like
That makes a basic command driven gate. To make a ranged gate, you need timers checking IsPlayerInRangeOfPoint to open and close, and of course, take the 50$ to open it.
pawn Код:
new gate;
public OnGameModeInit()
{
gate = CreateObject(988, 0.0, 1.1, 10.859, 0.0, 0.0, -90.0); // Gate
return 1;
}
public OnPlayerCommandText(playerid,cmdtext)
{
if (!strcmp(cmdtext,"/open",true))
{
MoveObject(gate, 0.0, 6.1, 10.859, 4.0);
return 1;
}
if (!strcmp(cmdtext,"/close",true))
{
MoveObject(gate, 0.0, 1.1, 10.859, 4.0);
return 1;
}
return 0;
}