Problem with OnPlayerKeyStateChange
#1

Hello. I add in OnPlayerKeyStateChange:

Код:
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;
  }
but when i am press on ALT (on foot) - OK. When I press in vehicle - nothing. Why?
Reply
#2

Ok, FIXED Fail with key_list.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)