26.04.2012, 14:16
Hi what I want is when a player runs out of nitro, he can press the fire key, and the nos gets reloaded.
This however doesn't work.
Does anyone of you guys see the mistake/error in here?
This however doesn't work.
Does anyone of you guys see the mistake/error in here?
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys == KEY_FIRE) { if(pWorld[playerid] == WORLD_STUNT) { if(IsPlayerInAnyVehicle(playerid)) { AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); SendClientMessage(playerid, -1, ""COL_GREY">> "COL_BLUE"SERVER "COL_GREY"<< "COL_WHITE"Your vehicle now has "COL_GREEN"NOS"COL_WHITE"!"); } } } if(newkeys == KEY_FIRE && oldkeys == KEY_FIRE) { if(pWorld[playerid] == WORLD_STUNT) { if(IsPlayerInAnyVehicle(playerid)) { AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); SendClientMessage(playerid, -1, ""COL_GREY">> "COL_BLUE"SERVER "COL_GREY"<< "COL_WHITE"Your vehicle now has "COL_GREEN"NOS"COL_WHITE"!"); } } } return true; }