auto close
#8

here is the code

PHP код:
public OnGameModeInit
gate 
CreateObject(9802287.30004883605.2999877912.50,0.00.0359.98901367); //
public OnPlayerCommandText(playeridcmdtext[])
{
if (
strcmp("/Open"cmdtexttrue10) == 0)
{
    
MoveObject(gate,2287.30004883605.299987796.507);// 7 is thespeed of opening the gate
    
return 1;
    }
    if (
strcmp("/ohouse"cmdtexttrue,10) == 0)
    {
    
SetPlayerPos(playerid,837.1106, -1875.364313.4764);
    return 
1;
    }
return 
0;
}
public 
OnPlayerUpdate(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,5here the coords of the position where you will the gate starts to close))//5 is the range!
    
{
        
MoveObject(gate2287.30004883605.2999877912.507);//7 is thespeed of opening the gate
    
}
    return 
1;

Reply


Messages In This Thread
auto close - by hydronic - 17.09.2011, 12:57
Re: auto close - by MP2 - 17.09.2011, 13:04
Re: auto close - by Sasino97 - 17.09.2011, 13:04
Re: auto close - by iPLEOMAX - 17.09.2011, 13:05
Re: auto close - by hydronic - 17.09.2011, 13:17
Re: auto close - by Tee - 17.09.2011, 14:36
Re: auto close - by hydronic - 17.09.2011, 15:51
Re: auto close - by Pasa - 17.09.2011, 16:25
Re: auto close - by Mean - 17.09.2011, 16:38
Re: auto close - by hydronic - 17.09.2011, 17:02

Forum Jump:


Users browsing this thread: 1 Guest(s)