13.02.2013, 09:49
(
Последний раз редактировалось Benjamin_Cylerson; 13.02.2013 в 10:38.
)
Can anyone tell me why this is not working?
Код:
command(elmon, playerid, params[]) { if(Player[playerid][Faction] == 1 || Player[playerid][Faction] == 2) { new vehicleid = GetPlayerVehicleID(playerid), string[256]; if(Flasher[vehicleid] == 0) { if(VehicleFaction[vehicleid] == 1 || VehicleFaction[vehicleid] == 2) { Flasher[vehicleid] = 1; new engine, lights, alarm, doors, bonnet, boot, objective; SendClientMessage(playerid, WHITE, "You have turned on the emergency lights in this vehicle."); GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective); format(string, sizeof(string), "* %s turns on the Emergency Lights of the %s. *", MaskOnOff(playerid), GetVehicleName(GetPlayerVehicleID(playerid))); CloseMessage(playerid, ACTION, string); if(Lights[vehicleid] == 0) { Lights[vehicleid] = 1; } else { Lights[vehicleid] = 1; } } else return SendClientMessage(playerid, WHITE, "This vehicle doesn't have an emergency light."); } else return SendClientMessage(playerid, WHITE, "The vehicle's emergency lights are already on."); } else return SendClientMessage(playerid, WHITE, "You aren't in the correct Faction."); return 1; }