Gate Help
#1

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:
Код:
new mygate;
This too:
Код:
forward CheckGate();
This goes to OnGameModeInit:
Код:
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);
}
But where i put that gate opens only for members... And is this right?
Reply


Messages In This Thread
Gate Help - by Josip_Hrnjak - 20.05.2012, 14:03
Re: Gate Help - by Faisal_khan - 20.05.2012, 14:06
Re: Gate Help - by Josip_Hrnjak - 20.05.2012, 14:26
Re: Gate Help - by Faisal_khan - 20.05.2012, 14:41
Re: Gate Help - by Josip_Hrnjak - 20.05.2012, 14:53

Forum Jump:


Users browsing this thread: 2 Guest(s)