20.11.2011, 13:23
Код:
public TurnOnEngine(playerid, vehicle2) { new Float:health; new vehicleid = GetPlayerVehicleID(playerid); new vehhealth = GetVehicleHealth(vehicleid, health); if(health >= 0 && health <= 250 && Vehicle3[vehicle2][Engine] == 0) { new sendername[MAX_PLAYER_NAME]; new string[256]; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Engine didn't start ((%s)) ", sendername); ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; } else // changed this.. { // GameTextForPlayer(playerid,"~W~Engine turned ~g~On",3000,1); //TogglePlayerControllable(playerid, true); new sendername[MAX_PLAYER_NAME]; new string[256]; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Engine started ((%s)) ", sendername); ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); Vehicle3[vehicle2][Engine] = 1; SetVehicleParamsEx(GetPlayerVehicleID(playerid),1,lights,alarm,doors,bonnet,boot,objective); } return true; }