22.04.2014, 19:28
My problem is, that OnPlayerKeyStateChange callback is not working, when i press "H" in vehicle what is defined as KEY_CTRL_BACK. I tried to debug that. When player presses "H" on vehicle, it didn't print debug function, but when he was on foot, then it did.
Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(IsPlayerInRangeOfPoint(playerid, 6.0,2212.7642,-2289.8892,14.7647)) { if(KaupasidVeokil[vehid] == 500) return SCM(playerid, V_HPUNANE, "Veok on tooteid tдis!"); if(!OnT88Auto[vehid]) return SCM(playerid, V_HPUNANE, "See ei ole tццauto!"); if(GetVehicleModel(vehid) != 499) return SCM(playerid, V_HPUNANE, "See sхiduk ei ole kaubavedaja veok!"); TogglePlayerControllable(playerid, 0); GameTextForPlayer(playerid, "Alustati kaupade pealelaadimist veokisse", 2000, 5); SetTimerEx("KaubadPeale",5000, false, "ii",playerid, vehid); } }