if(IsPlayerInVehicle(playerid, ID))
#3

Quote:
Originally Posted by JamesC
Посмотреть сообщение
You are confused, vehicleid is the server ID of the vehicle which starts from 0 - 1999. The model of the vehicle is what you're going for, 476 is Rustler. To target a Rustler, you need to use GetVehicleModel and GetPlayerVehicleID.

pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 476) {
    // The player is in a Rustler.
}
Ah! what a fail.. Thanks!
but that did make some errors so i needed to use this instead. And this disable the function of some reason.
pawn Код:
if(GetVehicleModel(vehicleid) == 476)
But when do you use it like this way?
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 476) {
Reply


Messages In This Thread
if(IsPlayerInVehicle(playerid, ID)) - by cruising - 13.01.2012, 10:10
Re: if(IsPlayerInVehicle(playerid, ID)) - by JamesC - 13.01.2012, 10:46
Re: if(IsPlayerInVehicle(playerid, ID)) - by cruising - 13.01.2012, 10:58
Re: if(IsPlayerInVehicle(playerid, ID)) - by JamesC - 13.01.2012, 11:01
Re: if(IsPlayerInVehicle(playerid, ID)) - by cruising - 13.01.2012, 11:18

Forum Jump:


Users browsing this thread: 1 Guest(s)