work vehicles.
#2

You can use this method to check what model the car is.
we know that a pizzaboy is the id: 448 (https://sampwiki.blast.hk/wiki/Vehicle_Model_ID_List)
Then we can check if the model the player sits in, is equal to 448 by doing the following:

PHP код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 448)
    return 
SendClientMessage(playerid, -1"You need to be in the pizzaboy!"); 
https://sampwiki.blast.hk/wiki/GetVehicleModel
https://sampwiki.blast.hk/wiki/GetPlayerVehicleID

You may also want to check if the player is in a vehicle before doing this. That can be done by using "IsPlayerInVehicle(playerid)" (https://sampwiki.blast.hk/wiki/IsPlayerInVehicle)
Reply


Messages In This Thread
work vehicles. - by zZzTGTzZz - 09.01.2018, 15:43
Re: work vehicles. - by Tord - 09.01.2018, 15:50
Re: work vehicles. - by zZzTGTzZz - 09.01.2018, 16:02
Re: work vehicles. - by Tord - 09.01.2018, 16:24

Forum Jump:


Users browsing this thread: 1 Guest(s)