27.06.2012, 13:12
I have this command for turn on the engine, how can i make it if the car has no gas u can't turn on the engine ?
pawn Код:
if(strcmp(cmd,"/engineon",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Vehicle = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(Vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid, COLOR_YELLOW, "You have turned your engine >{FFFFFF} ON");
Engine[Vehicle] = 1;
SetVehicleParamsEx(Vehicle, 1, lights, alarm, doors, bonnet, boot, objective);
}
return 1;
}