16.05.2016, 17:11
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.
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)&¤tInt[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)&¤tInt[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)&¤tInt[playerid]==3) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 2423.711181, -1742.248657, 13.546875);//Shop2 } currentInt[playerid] = 0; return 1; }