03.07.2009, 00:30
im trying to make it so when player try to enter a car, if its a specific car it doesnt let him enter, but my problem is i dont know how to get the vehicleid of the car hes trying to enter. any idea?
somethink like
seems like it should be an easy solution but im stuck. just need help with getting the vehicle part, any help much appreciated thanks.
somethink like
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ENTER_VEHICLE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid); //but of course not known yet since not in it
if(vehicleid == testcar1)
{
SendClientMessage(playerid,COLOR_BRIGHTRED,"LOCKED..");
//....
}
}
return 1;
}