17.03.2009, 20:37
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_SUBMISSION) // if somebody presses 2 { if(IsNosTimer[playerid] == true) { SendClientMessage(playerid, 0xFFFF00AA, "Please Wait Before Using NOS!"); return 1; } if(IsMotorBike(GetVehicleModel(GetPlayerVehicleID(playerid)))) { Nos = SetTimerEx("NosTimer", 15000, false, "i", playerid); IsNosTimer[playerid] = true; SendClientMessage(playerid, 0xFFFF00AA, "Vehicle Is Not Modifiable!"); return 1; } if(!IsMotorBike(GetVehicleModel(GetPlayerVehicleID(playerid)))) { Nos = SetTimerEx("NosTimer", 15000, false, "i", playerid); IsNosTimer[playerid] = true; SetVehicleHealth(GetPlayerVehicleID(playerid), 1000); //set car health to 1000 AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); //give player 10x nos. PlayerPlaySound(playerid, 1133, 0, 0 ,0); // little sound return 1; } return 1; } return 1; }
Appreciate any help given, thanks.
I haven't scripted in quite a while, so don't blame me. :P