14.08.2015, 17:42
PHP код:
if(newkeys == KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid))
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
if(mot == VEHICLE_PARAMS_OFF)
{
SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
GameTextForPlayer(playerid,"~y~motor: ~g~ligado",5000,3);
PlayerPlaySound(playerid, 1054 , 0.0, 0.0, 10.0);
}else{
GameTextForPlayer(playerid,"~y~motor: ~r~desligado",5000,3);
PlayerPlaySound(playerid, 1054 , 0.0, 0.0, 10.0);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
}
}
return 1;
}