cmd gate
#5

Quote:
Originally Posted by MBilal
Посмотреть сообщение
Код:
new Gate[MAX_PLAYERS];
CMD:gate(playerid, params[]) 
{ 
if(Gate[playerid]==0)
{
    MoveObject(gate, -1538.53125, 679.52631, 3.31538, 2.0); 
    SendClientMessage(playerid, COLOR_YELLOW, "Gate is Open."); 
    Gate[playerid]=1;   
 return 1; 
}
else if(Gate[playerid]==1) 
{ 
    MoveObject(gate, -1538.53125, 679.52631, 8.99330, 2.0); 
    SendClientMessage(playerid, COLOR_YELLOW, "Gate is Closed."); 
   Gate[playerid]=0;
    return 1; 
}  
return 1;
}
Hope it help u!
Why would you use playerid variables, when the gate is moved globally?
Just use a global boolean.
Reply


Messages In This Thread
cmd gate - by s3ek - 04.03.2015, 19:35
Re: cmd gate - by CalvinC - 04.03.2015, 20:20
Re: cmd gate - by Abagail - 04.03.2015, 20:26
Re: cmd gate - by MBilal - 04.03.2015, 20:29
Re: cmd gate - by CalvinC - 04.03.2015, 20:56
Re: cmd gate - by s3ek - 05.03.2015, 00:06

Forum Jump:


Users browsing this thread: 1 Guest(s)