SA-MP Forums Archive
IsPlayerInRangeOfPoint - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IsPlayerInRangeOfPoint (/showthread.php?tid=203707)



IsPlayerInRangeOfPoint - Tessar - 27.12.2010

Ive scripted a "IsPlayerInRangeOfPoint" script.

The problem is that when i tried doing this line:
pawn Код:
if(!IsPlayerInVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"You Are Not In A Vehicle!");
It came up with this error:
pawn Код:
(3825) : warning 202: number of arguments does not match definition
Thanks


Re: IsPlayerInRangeOfPoint - blackwave - 27.12.2010

pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"You Are Not In A Vehicle!");



Re: IsPlayerInRangeOfPoint - Tessar - 27.12.2010

So to fix it all i needed to add was "Any"?


Re: IsPlayerInRangeOfPoint - blackwave - 27.12.2010

Ya, since IsPlayerInAnyVehicle is meant for "any" vehicle, it doesn't needs extra arguments. But IsPlayerInVehicle requires a certain car:
pawn Код:
new car;
car = CreateVehicle(model, x, y, z ...);
if(IsPlayerInVehicle(playerid) == car) return FUNCTION;



Re: IsPlayerInRangeOfPoint - Tessar - 27.12.2010

Ok thankyou! it worked.