Making a command do two different thinks?
#1

I want to make my /door, /gates and /barrier commands both open and close. So like if someone goes up to the gates and do /gates, they open the gates, but when they do /gates again it shuts the gate? i also want to do this for /engine. Please help.
Reply
#2

Create new variable, like "new gatesopen;" and then check is gates opened or not:
pawn Код:
if(gatesopened == 0)
{
   //Open your gates
  gatesopened = 1;
}
else if(gatesopened == 1)
{
   //close your gates
  gatesopened = 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)