Quote:
Originally Posted by MP2
Your if() structure is completely wrong.
pawn Код:
CMD:exit(playerid, params[]) { #pragma unused params if(IsPlayerInRangeOfPoint(playerid, 2.0, 1456.424682, -987.705749, 996.105041)) // LS Bank { SetPlayerPos(playerid, 1791.145019 +2, -1777.106567 +2, 13.544099 +1); } else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1474.0437, -1751.1372, 3285.2859)) // LSPD { SetPlayerPos(playerid, 1554.307495 -2, -1675.323852 -1, 15.770359); } else { SendClientMessage(playerid, COLOR_RED, "ERROR"COL_WHITE": You are not near an exit point."); } return 1; }
Also, always put a space after commas, it helps make your code clearer to read.
Also, this line:
pawn Код:
SendClientMessage(playerid,-1,""COL_RED"ERROR"COL_WHITE":You have to be near the exit point to exit LSPD!");
You're wasting character space by using colour embedding at the start. Remove that and just set the colour message to red.
|
Ye indeed i changed it to isplayerinrange of point and i will set an else at the bottom thats what i thought 2 minutes before implemented and worked just forgot to edit the post to [solved] thanks anyway mp2