Need help about line in script
#1

Whats wrong here ?

Код:
  if(!IsPlayerInRangeOfPoint(playerid,5.0,1635.46,-263.07,43.79))&& (5.0,1287.16,1303.05,10.53)&& (5.0,-1245.89,-748.73,63.83)&& (5.0,1085.25,-1381.94,13.52); return SendClientMessage(playerid,COLOR_PINK,"You're not at the right place");
Please fix this line and send that...
Reply
#2

You have to rewrite IsPlayerInRangeOfPoint for each coordinates, you can't do it like you do it currently.
Reply
#3

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

check it
Reply
#4

Like this
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid,5.0,1635.46,-263.07,43.79) || !IsPlayerInRangeOfPoint(playerid,5.0,1287.16,1303.05,10.53) || !IsPlayerInRangeOfPoint(playerid,5.0,-1245.89,-748.73,63.83) || !IsPlayerInRangeOfPoint(playerid,5.0,1085.25,-1381.94,13.52); return SendClientMessage(playerid,COLOR_PINK,"You're not at the right place");
Also, if you put && you must be at all those places at same time wich isnt possible so put || insted.
Reply
#5

Nope, OP got && right - it will go off only when he isn't in any of those places.
Reply
#6

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Nope, OP got && right - it will go off only when he isn't in any of those places.
Ah ok, Well.. You learn something new everyday (Y)
Reply
#7

New two errors


Код:
d:\Users\User\Desktop\SCript\filterscripts\CustomPNS.pwn(131) : error 001: expected token: ")", but found ";"
d:\Users\User\Desktop\SCript\filterscripts\CustomPNS.pwn(131) : error 036: empty statement
d:\Users\User\Desktop\SCript\filterscripts\CustomPNS.pwn(132) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
In the same line
Reply
#8

Most the revised code.
Reply
#9

Sorry try this
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid,5.0,1635.46,-263.07,43.79) && !IsPlayerInRangeOfPoint(playerid,5.0,1287.16,1303.05,10.53) && !IsPlayerInRangeOfPoint(playerid,5.0,-1245.89,-748.73,63.83) && !IsPlayerInRangeOfPoint(playerid,5.0,1085.25,-1381.94,13.52)) return SendClientMessage(playerid,COLOR_PINK,"You're not at the right place")
Reply
#10

You forgot in the end ";" but NVM ty thats work !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)