SA-MP Forums Archive
IsPlayerInVehicle bugged? - 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: IsPlayerInVehicle bugged? (/showthread.php?tid=70045)



IsPlayerInVehicle bugged? - SpiderPork - 22.03.2009

Is IsPlayerInVehicle bugged? There're no errors/warnings. It just doesn't work.

pawn Код:
if (strcmp("/command", cmdtext, true, 10) == 0)
{
    if(IsPlayerInVehicle(playerid, 476)) // If the player is in rustler
    {
       ...
    }
    return 1;
}



Re: IsPlayerInVehicle bugged? - Dujma - 22.03.2009

Quote:
Originally Posted by ʞɹod ɹǝpıds || SpiderPork
Is IsPlayerInVehicle bugged? There're no errors/warnings. It just doesn't work.

pawn Код:
if (strcmp("/command", cmdtext, true, 10) == 0)
{
    if(IsPlayerInVehicle(playerid, 476)) // If the player is in rustler
    {
       ...
    }
    return 1;
}
IsPlayerInVehicle is by ID not by model.


Re: IsPlayerInVehicle bugged? - SpiderPork - 22.03.2009

I used GetPlayerVehicleID instead of IsPlayerInVehicle, but it's still the same.


Re: IsPlayerInVehicle bugged? - Dujma - 22.03.2009

You need this

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

Not GetVehicleID


Re: IsPlayerInVehicle bugged? - SpiderPork - 22.03.2009

Damn, I'm getting rusty . It works now.

Thanks for your help.