Vehicle problems
#15

All right. How do you define IsGovVehicle?
put before OnGameModeInit ()
IsGovVehicle (carid) {if ((carid> = 1) && (carid <= 5)) {return 1;} return 0;}
then check on public OnPlayerStateChange (playerid, newstate, oldstate)
public OnPlayerStateChange (playerid, newstate, oldstate)
{
if (IsPlayerNPC (playerid))
{
return 1;
}
if (newstate == PLAYER_STATE_DRIVER)
{
GetVehicleParamsEx (newcar, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx (newcar, engineOn [newcar], lights, alarm, doors, bonnet, boot, objective);
if (IsGovVehicle(newcar))
{
if (PlayerInfo[playerid][pFac] == 2) {return 1; }
else RemovePlayerFromVehicle (playerid); SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the GOV.");
}
return 1;
}

that should work
Reply


Messages In This Thread
Vehicle problems - by salev13 - 01.12.2018, 12:47
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 13:49
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 13:52
Re: Vehicle problems - by salev13 - 01.12.2018, 13:55
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 13:56
Re: Vehicle problems - by salev13 - 01.12.2018, 14:00
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 14:04
Re: Vehicle problems - by salev13 - 01.12.2018, 14:17
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 14:21
Re: Vehicle problems - by salev13 - 01.12.2018, 14:22
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 14:30
Re: Vehicle problems - by salev13 - 01.12.2018, 14:51
Re: Vehicle problems - by Tenka - 01.12.2018, 15:04
Re: Vehicle problems - by salev13 - 01.12.2018, 15:17
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 16:09

Forum Jump:


Users browsing this thread: 2 Guest(s)