13.02.2013, 09:03
Hello. I add in OnPlayerKeyStateChange:
but when i am press on ALT (on foot) - OK. When I press in vehicle - nothing. Why?
Код:
if(newkeys & KEY_WALK) { printf("Test 1!"); if(IsPlayerInAnyVehicle(playerid)) { printf("Test 2!"); new en,li,al,doors,bon,boot,ob; new veh = GetPlayerVehicleID(playerid); GetVehicleParamsEx(veh,en,li,al,doors,bon,boot,ob); if(Cardvig[veh][1] == 0) {SetVehicleParamsEx(veh,en,1,al,doors,bon,boot,ob);Cardvig[veh][1] = 1;} else if(Cardvig[veh][1] == 1) {SetVehicleParamsEx(veh,en,0,al,doors,bon,boot,ob);Cardvig[veh][1] = 0;} return 1; }