SA-MP Forums Archive
Need help about line in script - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help about line in script (/showthread.php?tid=425020)



Need help about line in script - yaron0600 - 24.03.2013

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...


Re: Need help about line in script - Misiur - 24.03.2013

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


Re: Need help about line in script - Xoomer - 24.03.2013

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

check it


Re: Need help about line in script - Don_Cage - 24.03.2013

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.


Re: Need help about line in script - Misiur - 24.03.2013

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


Re: Need help about line in script - Don_Cage - 24.03.2013

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)


Re: Need help about line in script - yaron0600 - 24.03.2013

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


Re: Need help about line in script - MP2 - 24.03.2013

Most the revised code.


Re: Need help about line in script - Don_Cage - 24.03.2013

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")



Re: Need help about line in script - yaron0600 - 24.03.2013

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