Car id big problem
#1

I have a bug with cars ids
I create a job vehicle for a player that start a job and a restriction when he tries to enter the vehicle if he's not on the job and
when im entering random vehicles that aren't from the job it say's that they are job vehicles
//here i create the vehicle
JobVehicle[playerid] = CreateVehicle(482, 2179.4768,-1667.1775,14.8053, 258.5340, 0, 0, 100);
// here's the restriction (its under OnPlayerEnterVehicle)
if(DrugsCp[playerid] == 0 && vehicleid == JobVehicle[playerid])
{
SendClientMessage(playerid, COLOR_GREY, "This is a job vehicle");
SlapPlayer(playerid);
}

then after relog it all works fine if i don't wotk at that job again
Reply
#2

There is no need to create JobVehicle. If some vehicle model is restriced for a job (like 482 in your case), just check vehicle model and use RemovePlayerFromVehicle.

Or on OnPlayerEnterVehicle, just use ClearAnimation and show the message.

In both cases players will be prevented to use that specific vehicle.
Reply
#3

Quote:
Originally Posted by SymonClash
Посмотреть сообщение
There is no need to create JobVehicle. If some vehicle model is restriced for a job (like 482 in your case), just check vehicle model and use RemovePlayerFromVehicle.

Or on OnPlayerEnterVehicle, just use ClearAnimation and show the message.

In both cases players will be prevented to use that specific vehicle.
i want players to be able to use a vehicle with id 482, but not that vehicle that the player is using on the job
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)