Need your help
#7

If you look in the filterscripts folder, gl_property.pwn is the example.

The enter/exit commands, and the usage of the currentInt array.

I've changed your original code to suit this addition.

Код:
new currentInt[MAX_PLAYERS]; // Put this up top of your script.

CMD:enter(playerid, params[])
{
	  if(IsPlayerInRangeOfPoint(playerid, 3.0, 1553.779052, -1675.300048, 16.195312))
		{
      SetPlayerPos(playerid, 246.6695, 65.8039, 1003.6406);//PD
      SetPlayerInterior(playerid, 6);
	  currentInt[playerid]=1
      }
      if(IsPlayerInRangeOfPoint(playerid, 3.0, 1929.604980, -1776.355957, 13.546875))
		{
	  	  SetPlayerPos(playerid, -25.7220, -187.8216, 1003.5469);//Shop1
	  	  SetPlayerInterior(playerid, 17);
		  currentInt[playerid]=2
		}
      if(IsPlayerInRangeOfPoint(playerid, 3.0, 2423.711181, -1742.248657, 13.546875))
		{
			SetPlayerPos(playerid, -25.7220, -187.8216, 1003.5469);//Shop2
  			SetPlayerInterior(playerid, 17);
			currentInt[playerid]=3
	  }
	  return 1;
}

CMD:exit(playerid, params[])
{
	  if(IsPlayerInRangeOfPoint(playerid, 3.0, 246.6695, 65.8039, 1003.6406)&&currentInt[playerid]==1)
		{
      SetPlayerPos(playerid, 1553.779052, -1675.300048, 16.195312);//PD
      SetPlayerInterior(playerid, 0);
      }
      if(IsPlayerInRangeOfPoint(playerid, 3.0, -25.7220, -187.8216, 1003.5469)&&currentInt[playerid]==2)
		{
		    SetPlayerPos(playerid, 1929.604980, -1776.355957, 13.546875);//Shop1
		    SetPlayerInterior(playerid, 0);
		}
		if(IsPlayerInRangeOfPoint(playerid, 3.0, -25.7220, -187.8216, 1003.5469)&&currentInt[playerid]==3)
		{
		    SetPlayerInterior(playerid, 0);
		    SetPlayerPos(playerid, 2423.711181, -1742.248657, 13.546875);//Shop2
	  }
	  currentInt[playerid] = 0;
	  return 1;
}
Reply


Messages In This Thread
Need your help - by canip - 16.05.2016, 13:00
Re: Need your help - by BiosMarcel - 16.05.2016, 14:29
Re: Need your help - by canip - 16.05.2016, 15:11
Re: Need your help - by BiosMarcel - 16.05.2016, 15:31
Re: Need your help - by Sew_Sumi - 16.05.2016, 15:39
Re: Need your help - by canip - 16.05.2016, 16:22
Re: Need your help - by Sew_Sumi - 16.05.2016, 17:11

Forum Jump:


Users browsing this thread: 2 Guest(s)