Hello everyone! I have a problem with OnPlayerEnterVehicle, i currently have two vehicle groups on my server, and they are rent vehicles(8 of them) and vehicles for a job(5 of them).
When a player trys to enter a job vehicle, and he is not an employee of that job, he will get kicked out of that vehicle, here's the code:
And that works perfectly, however, when somebody tries to enter the rent vehicle he can't enter it because he gets that same message from above: [ E ] | {FFFFFF}Niste zaposleni kao vozac maltera.");
The rent vehicle group is called BesplatnaAuta, and i did not include them in any callback, I just used BesplatnaAuta[0] = AddStaticVehicle(etc)
If
When a player trys to enter a job vehicle, and he is not an employee of that job, he will get kicked out of that vehicle, here's the code:
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == vmkamioni[0] || vmkamioni[1] || vmkamioni[2] || vmkamioni[3] || vmkamioni[4])
{
if(PlayerInfo[playerid][pPosao] != 1)
{
SCM, "[ E ] | {FFFFFF}Niste zaposleni kao vozac maltera.");
ClearAnimations(playerid);
}
}
return 1;
}
The rent vehicle group is called BesplatnaAuta, and i did not include them in any callback, I just used BesplatnaAuta[0] = AddStaticVehicle(etc)
If