SA-MP Forums Archive
GetClosestVehicle Problem.. - 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: GetClosestVehicle Problem.. (/showthread.php?tid=172181)



GetClosestVehicle Problem.. - Mystique - 29.08.2010

Okay so I'm experiencing some problems here. In my /carlock command I'm using this GetClosestvehicle function and it works fine to check if the car is locked or unlocked etc. When I add this, however, it stops to work. Don't this about what strmatch is..

pawn Код:
if(strmatch(CarSystem[GetClosestVehicle(playerid,5)][Carowner],pName(playerid)))

Okay so if I add GetPlayerVehicleID(playerid) on the GetClosestVehicle spot it all works fine when being inside the vehicle. When adding GetClosestVehicle it doesn't work at all..


Re: GetClosestVehicle Problem.. - Norck - 29.08.2010

pawn Код:
GetClosestVehicle(playerid,5)
Does 5 means range?
If so, than possible, that it doesn't work because there is no vehicles in such range.


Re: GetClosestVehicle Problem.. - Voldemort - 29.08.2010

use strcmp instead of strmatch


Re: GetClosestVehicle Problem.. - Mystique - 29.08.2010

Quote:
Originally Posted by Voldemort
Посмотреть сообщение
use strcmp instead of strmatch
I tried strcmp but now it doesn't even work with GetPlayerVehicleID....