Need help! Script line
#1

Hi samp forum. Right now the script is this.

But is there anyway i can make it so the only two commands you will need is /open & /close?

Код:
CMD:cgate(playerid, params[])
{
	  if(PInfo[playerid][pCop] >= 3) {
	  MoveObject(ogate,1592.7605, -1638.0819, 14.9281,3.0);
	  SendClientMessage(playerid, -1, "You've CLOSED the PD garage gate, /ogate to open it.");
	  }
	  else
	  {
	  SendClientMessage(playerid, COLOR_GREY, "You've to be an Police Officer I to use this.");
	  }
	  return 1;
}

CMD:ogate(playerid, params[])
{
	  if(PInfo[playerid][pCop] >= 3) {
	  MoveObject(ogate, 1592.7605, -1638.0819, 9.8567,3.0);
	  SendClientMessage(playerid, -1, "You've OPENED the PD garage gate, /cgate to close it.");
	  }
	  else
	  {
	  SendClientMessage(playerid, COLOR_GREY, "You've to be an Police Officer I to use this.");
	  }
	  return 1;
}

CMD:bclose(playerid, params[])
{
	  if(PInfo[playerid][pCop] >= 3) {
	  MoveObject(ogate2,1544.6466, -1626.7156, 13.9754,3.0);
	  SendClientMessage(playerid, -1, "You've CLOSED the LSPD main Gate, type /bopen to open it again.");
	  }
	  else
	  {
	  SendClientMessage(playerid, COLOR_GREY, "You've to be an Police Officer I to use this.");
	  }
	  return 1;
}

CMD:bopen(playerid, params[])
{
	  if(PInfo[playerid][pCop] >= 3) {
	  MoveObject(ogate2, 1544.7471, -1619.6561, 13.9754,3.0);
	  SendClientMessage(playerid, -1, "You've OPENED the LSPD main Gate, /bclose to close it");
	  }
	  else
	  {
	  SendClientMessage(playerid, COLOR_GREY, "You've to be an Police Officer I to use this.");
	  }
	  return 1;
}
- Thanks for your help!
Reply
#2

Explain better, I do not understand, do you want to open and close with a single command?
Reply
#3

Right now the commands for the gates are /ogate /cgate & the other one /bopen /bclose.

I want it to be (for the both) /open and /close
Reply
#4

You have to use this, because if not when you execute the command will open the two together.
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#5

Quote:
Originally Posted by Speedpro
Посмотреть сообщение
You have to use this, because if not when you execute the command will open the two together.
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Great, thanks for that. Totally forgot about that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)