20.05.2012, 14:03
i found this on samp wiki... and i have few questions..
do i need command for this, or no? I think that this doesnt need command
And how can i make that gate opens only for members of some faction, eg.
so here is the code
This goes to top of script:
This too:
This goes to OnGameModeInit:
But where i put that gate opens only for members... And is this right?
do i need command for this, or no? I think that this doesnt need command
And how can i make that gate opens only for members of some faction, eg.
so here is the code
This goes to top of script:
Код:
new mygate;
Код:
forward CheckGate();
Код:
mygate = CreateObject(object_ID, closed_X, closed_Y, closed_Z, closed_rad_X, closed_rad_Y, closed_rad_Z)
Код:
public CheckGate() { new mygate_status; for(new i;i<MAX_PLAYERS;i++) { if(!IsPlayerConnected(i)) continue; if(IsPlayerInRangeOfPoint(i,10.0,closed_X,closed_Y,closed_Z))mygate_status=1; } if(mygate_status)MoveObject(mygate, open_X, open_Y, open_Z,Moving Speed); else MoveObject(mygate, closed_X, closed_Y, closed_Z, Moving Speed); }