01.03.2016, 17:33
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 5, 2421.6328,-1220.3962,25.4868));
TIP: if an if-statement is followed by only one line of code, you don't need the {}, it makes more readable code:
PHP код:
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5, 1465.3230,-1010.9038,26.8438))
SetPlayerPos(playerid,2305.2227,-16.1804,26.7422);
if(IsPlayerInRangeOfPoint(playerid, 5, 2421.6328,-1220.3962,25.4868))
SetPlayerPos(playerid,1204.8491,-13.1725,1000.9219);
if(IsPlayerInRangeOfPoint(playerid, 5, 2104.4556,-1806.4227,13.5547))
SetPlayerPos(playerid,372.4194,-133.1292,1001.4922);
return 1;
}
if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5, 2305.2227,-16.1804,26.7422))
SetPlayerPos(playerid,1465.3230,-1010.9038,26.8438);
if(IsPlayerInRangeOfPoint(playerid, 5, 1204.8491,-13.1725,1000.9219))
SetPlayerPos(playerid,2421.6328,-1220.3962,25.4868);
if(IsPlayerInRangeOfPoint(playerid, 5, 372.4194,-133.1292,1001.4922))
SetPlayerPos(playerid,2104.4556,-1806.4227,13.5547);
}