ZAP-Hosting Gameserver and Webhosting

Game Controls

  • Wenn man als Entwickler Tastatur Inputs abgreifen möchte in FiveM ist dies leider nicht allzu einfach. Aufgrund der Beschaffenheit von FiveM bzw. GTAV ist es nicht möglich diese direkt abzufragen.

    Es ist jedoch möglich die im Spiel vorhandenen/belegten Tasten zu verwenden. Im folgenden Sind diese Standardinputs kurz aufgelistet mit der Taste mit der diese Regulär belegt ist.




    Name Control ID Standardtaste
    INPUT_NEXT_CAMERA 0 V
    INPUT_LOOK_LR 1
    INPUT_LOOK_UD 2
    INPUT_LOOK_UP_ONLY 3
    INPUT_LOOK_DOWN_ONLY 4
    INPUT_LOOK_LEFT_ONLY 5
    INPUT_LOOK_RIGHT_ONLY 6
    INPUT_CINEMATIC_SLOWMO 7 L
    INPUT_SCRIPTED_FLY_UD 8
    INPUT_SCRIPTED_FLY_LR 9
    INPUT_SCRIPTED_FLY_ZUP 10
    INPUT_SCRIPTED_FLY_ZDOWN 11
    INPUT_WEAPON_WHEEL_UD 12
    INPUT_WEAPON_WHEEL_LR 13
    INPUT_WEAPON_WHEEL_NEXT 14
    INPUT_WEAPON_WHEEL_PREV 15
    INPUT_SELECT_NEXT_WEAPON 16
    INPUT_SELECT_PREV_WEAPON 17
    INPUT_SKIP_CUTSCENE 18
    INPUT_CHARACTER_WHEEL 19 LAlt
    INPUT_MULTIPLAYER_INFO 20 Z
    INPUT_SPRINT 21
    INPUT_JUMP 22
    INPUT_ENTER 23
    INPUT_ATTACK 24
    INPUT_AIM 25
    INPUT_LOOK_BEHIND 26 C
    INPUT_PHONE 27 UpArr
    INPUT_SPECIAL_ABILITY 28
    INPUT_SPECIAL_ABILITY_SECONDARY 29 B
    INPUT_MOVE_LR 30 D
    INPUT_MOVE_UD 31
    INPUT_MOVE_UP_ONLY 32 W
    INPUT_MOVE_DOWN_ONLY 33 S
    INPUT_MOVE_LEFT_ONLY 34 A
    INPUT_MOVE_RIGHT_ONLY 35
    INPUT_DUCK 36
    INPUT_SELECT_WEAPON 37
    INPUT_PICKUP 38
    INPUT_SNIPER_ZOOM 39 [
    INPUT_SNIPER_ZOOM_IN_ONLY 40
    INPUT_SNIPER_ZOOM_OUT_ONLY 41
    INPUT_SNIPER_ZOOM_IN_SECONDARY 42
    INPUT_SNIPER_ZOOM_OUT_SECONDARY 43
    INPUT_COVER 44 Q
    INPUT_RELOAD 45 R
    INPUT_TALK 46 E
    INPUT_DETONATE 47 G
    INPUT_HUD_SPECIAL 48
    INPUT_ARREST 49 F
    INPUT_ACCURATE_AIM 50
    INPUT_CONTEXT 51
    INPUT_CONTEXT_SECONDARY 52
    INPUT_WEAPON_SPECIAL 53
    INPUT_WEAPON_SPECIAL_TWO 54
    INPUT_DIVE 55
    INPUT_DROP_WEAPON 56 F9
    INPUT_DROP_AMMO 57 F10
    INPUT_THROW_GRENADE 58
    INPUT_VEH_MOVE_LR 59
    INPUT_VEH_MOVE_UD 60
    INPUT_VEH_MOVE_UP_ONLY 61
    INPUT_VEH_MOVE_DOWN_ONLY 62
    INPUT_VEH_MOVE_LEFT_ONLY 63
    INPUT_VEH_MOVE_RIGHT_ONLY 64
    INPUT_VEH_SPECIAL 65
    INPUT_VEH_GUN_LR 66
    INPUT_VEH_GUN_UD 67
    INPUT_VEH_AIM 68
    INPUT_VEH_ATTACK 69
    INPUT_VEH_ATTACK2 70
    INPUT_VEH_ACCELERATE 71
    INPUT_VEH_BRAKE 72
    INPUT_VEH_DUCK 73
    INPUT_VEH_HEADLIGHT 74
    INPUT_VEH_EXIT 75
    INPUT_VEH_HANDBRAKE 76
    INPUT_VEH_HOTWIRE_LEFT 77 X
    INPUT_VEH_HOTWIRE_RIGHT 78
    INPUT_VEH_LOOK_BEHIND 79
    INPUT_VEH_CIN_CAM 80
    INPUT_VEH_NEXT_RADIO 81
    INPUT_VEH_PREV_RADIO 82
    INPUT_VEH_NEXT_RADIO_TRACK 83
    INPUT_VEH_PREV_RADIO_TRACK 84
    INPUT_VEH_RADIO_WHEEL 85
    INPUT_VEH_HORN 86
    INPUT_VEH_FLY_THROTTLE_UP 87
    INPUT_VEH_FLY_THROTTLE_DOWN 88
    INPUT_VEH_FLY_YAW_LEFT 89
    INPUT_VEH_FLY_YAW_RIGHT 90
    INPUT_VEH_PASSENGER_AIM 91
    INPUT_VEH_PASSENGER_ATTACK 92
    INPUT_VEH_SPECIAL_ABILITY_FRANKLIN 93
    INPUT_VEH_STUNT_UD 94
    INPUT_VEH_CINEMATIC_UD 95
    INPUT_VEH_CINEMATIC_UP_ONLY 96
    INPUT_VEH_CINEMATIC_DOWN_ONLY 97
    INPUT_VEH_CINEMATIC_LR 98
    INPUT_VEH_SELECT_NEXT_WEAPON 99
    INPUT_VEH_SELECT_PREV_WEAPON 100
    INPUT_VEH_ROOF 101
    INPUT_VEH_JUMP 102
    INPUT_VEH_GRAPPLING_HOOK 103
    INPUT_VEH_SHUFFLE 104
    INPUT_VEH_DROP_PROJECTILE 105
    INPUT_VEH_MOUSE_CONTROL_OVERRIDE 106
    INPUT_VEH_FLY_ROLL_LR 107
    INPUT_VEH_FLY_ROLL_LEFT_ONLY 108
    INPUT_VEH_FLY_ROLL_RIGHT_ONLY 109
    INPUT_VEH_FLY_PITCH_UD 110
    INPUT_VEH_FLY_PITCH_UP_ONLY 111
    INPUT_VEH_FLY_PITCH_DOWN_ONLY 112
    INPUT_VEH_FLY_UNDERCARRIAGE 113
    INPUT_VEH_FLY_ATTACK 114
    INPUT_VEH_FLY_SELECT_NEXT_WEAPON 115
    INPUT_VEH_FLY_SELECT_PREV_WEAPON 116
    INPUT_VEH_FLY_SELECT_TARGET_LEFT 117
    INPUT_VEH_FLY_SELECT_TARGET_RIGHT 118
    INPUT_VEH_FLY_VERTICAL_FLIGHT_MODE 119
    INPUT_VEH_FLY_DUCK 120
    INPUT_VEH_FLY_ATTACK_CAMERA 121
    INPUT_VEH_FLY_MOUSE_CONTROL_OVERRIDE 122
    INPUT_VEH_SUB_TURN_LR 123
    INPUT_VEH_SUB_TURN_LEFT_ONLY 124
    INPUT_VEH_SUB_TURN_RIGHT_ONLY 125
    INPUT_VEH_SUB_PITCH_UD 126
    INPUT_VEH_SUB_PITCH_UP_ONLY 127
    INPUT_VEH_SUB_PITCH_DOWN_ONLY 128
    INPUT_VEH_SUB_THROTTLE_UP 129
    INPUT_VEH_SUB_THROTTLE_DOWN 130
    INPUT_VEH_SUB_ASCEND 131
    INPUT_VEH_SUB_DESCEND 132
    INPUT_VEH_SUB_TURN_HARD_LEFT 133
    INPUT_VEH_SUB_TURN_HARD_RIGHT 134
    INPUT_VEH_SUB_MOUSE_CONTROL_OVERRIDE 135
    INPUT_VEH_PUSHBIKE_PEDAL 136
    INPUT_VEH_PUSHBIKE_SPRINT 137
    INPUT_VEH_PUSHBIKE_FRONT_BRAKE 138
    INPUT_VEH_PUSHBIKE_REAR_BRAKE 139
    INPUT_MELEE_ATTACK_LIGHT 140
    INPUT_MELEE_ATTACK_HEAVY 141
    INPUT_MELEE_ATTACK_ALTERNATE 142
    INPUT_MELEE_BLOCK 143
    INPUT_PARACHUTE_DEPLOY 144
    INPUT_PARACHUTE_DETACH 145
    INPUT_PARACHUTE_TURN_LR 146
    INPUT_PARACHUTE_TURN_LEFT_ONLY 147
    INPUT_PARACHUTE_TURN_RIGHT_ONLY 148
    INPUT_PARACHUTE_PITCH_UD 149
    INPUT_PARACHUTE_PITCH_UP_ONLY 150
    INPUT_PARACHUTE_PITCH_DOWN_ONLY 151
    INPUT_PARACHUTE_BRAKE_LEFT 152
    INPUT_PARACHUTE_BRAKE_RIGHT 153
    INPUT_PARACHUTE_SMOKE 154
    INPUT_PARACHUTE_PRECISION_LANDING 155
    INPUT_MAP 156
    INPUT_SELECT_WEAPON_UNARMED 157 1
    INPUT_SELECT_WEAPON_MELEE 158 2
    INPUT_SELECT_WEAPON_HANDGUN 159 6
    INPUT_SELECT_WEAPON_SHOTGUN 160 3
    INPUT_SELECT_WEAPON_SMG 161 7
    INPUT_SELECT_WEAPON_AUTO_RIFLE 162 8
    INPUT_SELECT_WEAPON_SNIPER 163 9
    INPUT_SELECT_WEAPON_HEAVY 164 4
    INPUT_SELECT_WEAPON_SPECIAL 165 5
    INPUT_SELECT_CHARACTER_MICHAEL 166 F5
    INPUT_SELECT_CHARACTER_FRANKLIN 167 F6
    INPUT_SELECT_CHARACTER_TREVOR 168 F7
    INPUT_SELECT_CHARACTER_MULTIPLAYER 169
    INPUT_SAVE_REPLAY_CLIP 170 F3
    INPUT_SPECIAL_ABILITY_PC 171
    INPUT_CELLPHONE_UP 172
    INPUT_CELLPHONE_DOWN 173 DownArr
    INPUT_CELLPHONE_LEFT 174 LeftArr
    INPUT_CELLPHONE_RIGHT 175 RightArr
    INPUT_CELLPHONE_SELECT 176
    INPUT_CELLPHONE_CANCEL 177
    INPUT_CELLPHONE_OPTION 178
    INPUT_CELLPHONE_EXTRA_OPTION 179
    INPUT_CELLPHONE_SCROLL_FORWARD 180
    INPUT_CELLPHONE_SCROLL_BACKWARD 181
    INPUT_CELLPHONE_CAMERA_FOCUS_LOCK 182
    INPUT_CELLPHONE_CAMERA_GRID 183
    INPUT_CELLPHONE_CAMERA_SELFIE 184
    INPUT_CELLPHONE_CAMERA_DOF 185
    INPUT_CELLPHONE_CAMERA_EXPRESSION 186
    INPUT_FRONTEND_DOWN 187
    INPUT_FRONTEND_UP 188
    INPUT_FRONTEND_LEFT 189
    INPUT_FRONTEND_RIGHT 190
    INPUT_FRONTEND_RDOWN 191
    INPUT_FRONTEND_RUP 192
    INPUT_FRONTEND_RLEFT 193
    INPUT_FRONTEND_RRIGHT 194
    INPUT_FRONTEND_AXIS_X 195
    INPUT_FRONTEND_AXIS_Y 196
    INPUT_FRONTEND_RIGHT_AXIS_X 197
    INPUT_FRONTEND_RIGHT_AXIS_Y 198
    INPUT_FRONTEND_PAUSE 199 P
    INPUT_FRONTEND_PAUSE_ALTERNATE 200
    INPUT_FRONTEND_ACCEPT 201
    INPUT_FRONTEND_CANCEL 202
    INPUT_FRONTEND_X 203
    INPUT_FRONTEND_Y 204
    INPUT_FRONTEND_LB 205
    INPUT_FRONTEND_RB 206
    INPUT_FRONTEND_LT 207
    INPUT_FRONTEND_RT 208
    INPUT_FRONTEND_LS 209
    INPUT_FRONTEND_RS 210
    INPUT_FRONTEND_LEADERBOARD 211
    INPUT_FRONTEND_SOCIAL_CLUB 212
    INPUT_FRONTEND_SOCIAL_CLUB_SECONDARY 213
    INPUT_FRONTEND_DELETE 214
    INPUT_FRONTEND_ENDSCREEN_ACCEPT 215
    INPUT_FRONTEND_ENDSCREEN_EXPAND 216
    INPUT_FRONTEND_SELECT 217
    INPUT_SCRIPT_LEFT_AXIS_X 218
    INPUT_SCRIPT_LEFT_AXIS_Y 219
    INPUT_SCRIPT_RIGHT_AXIS_X 220
    INPUT_SCRIPT_RIGHT_AXIS_Y 221
    INPUT_SCRIPT_RUP 222
    INPUT_SCRIPT_RDOWN 223
    INPUT_SCRIPT_RLEFT 224
    INPUT_SCRIPT_RRIGHT 225
    INPUT_SCRIPT_LB 226
    INPUT_SCRIPT_RB 227
    INPUT_SCRIPT_LT 228
    INPUT_SCRIPT_RT 229
    INPUT_SCRIPT_LS 230
    INPUT_SCRIPT_RS 231
    INPUT_SCRIPT_PAD_UP 232
    INPUT_SCRIPT_PAD_DOWN 233
    INPUT_SCRIPT_PAD_LEFT 234
    INPUT_SCRIPT_PAD_RIGHT 235
    INPUT_SCRIPT_SELECT 236
    INPUT_CURSOR_ACCEPT 237
    INPUT_CURSOR_CANCEL 238
    INPUT_CURSOR_X 239
    INPUT_CURSOR_Y 240
    INPUT_CURSOR_SCROLL_UP 241
    INPUT_CURSOR_SCROLL_DOWN 242
    INPUT_ENTER_CHEAT_CODE 243
    INPUT_INTERACTION_MENU 244 M
    INPUT_MP_TEXT_CHAT_ALL 245 T
    INPUT_MP_TEXT_CHAT_TEAM 246 Y
    INPUT_MP_TEXT_CHAT_FRIENDS 247
    INPUT_MP_TEXT_CHAT_CREW 248
    INPUT_PUSH_TO_TALK 249 N
    INPUT_CREATOR_LS 250
    INPUT_CREATOR_RS 251
    INPUT_CREATOR_LT 252
    INPUT_CREATOR_RT 253
    INPUT_CREATOR_MENU_TOGGLE 254
    INPUT_CREATOR_ACCEPT 255
    INPUT_CREATOR_DELETE 256
    INPUT_ATTACK2 257
    INPUT_RAPPEL_JUMP 258
    INPUT_RAPPEL_LONG_JUMP 259
    INPUT_RAPPEL_SMASH_WINDOW 260
    INPUT_PREV_WEAPON 261
    INPUT_NEXT_WEAPON 262
    INPUT_MELEE_ATTACK1 263
    INPUT_MELEE_ATTACK2 264
    INPUT_WHISTLE 265
    INPUT_MOVE_LEFT 266
    INPUT_MOVE_RIGHT 267
    INPUT_MOVE_UP 268
    INPUT_MOVE_DOWN 269
    INPUT_LOOK_LEFT 270
    INPUT_LOOK_RIGHT 271
    INPUT_LOOK_UP 272
    INPUT_LOOK_DOWN 273
    INPUT_SNIPER_ZOOM_IN 274
    INPUT_SNIPER_ZOOM_OUT 275
    INPUT_SNIPER_ZOOM_IN_ALTERNATE 276
    INPUT_SNIPER_ZOOM_OUT_ALTERNATE 277
    INPUT_VEH_MOVE_LEFT 278
    INPUT_VEH_MOVE_RIGHT 279
    INPUT_VEH_MOVE_UP 280
    INPUT_VEH_MOVE_DOWN 281
    INPUT_VEH_GUN_LEFT 282
    INPUT_VEH_GUN_RIGHT 283
    INPUT_VEH_GUN_UP 284
    INPUT_VEH_GUN_DOWN 285
    INPUT_VEH_LOOK_LEFT 286
    INPUT_VEH_LOOK_RIGHT 287
    INPUT_REPLAY_START_STOP_RECORDING 288 F1
    INPUT_REPLAY_START_STOP_RECORDING_SECONDARY 289 F2
    INPUT_SCALED_LOOK_LR 290
    INPUT_SCALED_LOOK_UD 291
    INPUT_SCALED_LOOK_UP_ONLY 292
    INPUT_SCALED_LOOK_DOWN_ONLY 293
    INPUT_SCALED_LOOK_LEFT_ONLY 294
    INPUT_SCALED_LOOK_RIGHT_ONLY 295
    INPUT_REPLAY_MARKER_DELETE 296
    INPUT_REPLAY_CLIP_DELETE 297
    INPUT_REPLAY_PAUSE 298
    INPUT_REPLAY_REWIND 299
    INPUT_REPLAY_FFWD 300
    INPUT_REPLAY_NEWMARKER 301
    INPUT_REPLAY_RECORD 302
    INPUT_REPLAY_SCREENSHOT 303 U
    INPUT_REPLAY_HIDEHUD 304
    INPUT_REPLAY_STARTPOINT 305
    INPUT_REPLAY_ENDPOINT 306
    INPUT_REPLAY_ADVANCE 307
    INPUT_REPLAY_BACK 308
    INPUT_REPLAY_TOOLS 309
    INPUT_REPLAY_RESTART 310
    INPUT_REPLAY_SHOWHOTKEY 311 K
    INPUT_REPLAY_CYCLEMARKERLEFT 312
    INPUT_REPLAY_CYCLEMARKERRIGHT 313
    INPUT_REPLAY_FOVINCREASE 314
    INPUT_REPLAY_FOVDECREASE 315
    INPUT_REPLAY_CAMERAUP 316
    INPUT_REPLAY_CAMERADOWN 317
    INPUT_REPLAY_SAVE 318
    INPUT_REPLAY_TOGGLETIME 319
    INPUT_REPLAY_TOGGLETIPS 320
    INPUT_REPLAY_PREVIEW 321
    INPUT_REPLAY_TOGGLE_TIMELINE 322
    INPUT_REPLAY_TIMELINE_PICKUP_CLIP 323
    INPUT_REPLAY_TIMELINE_DUPLICATE_CLIP 324
    INPUT_REPLAY_TIMELINE_PLACE_CLIP 325
    INPUT_REPLAY_CTRL 326
    INPUT_REPLAY_TIMELINE_SAVE 327
    INPUT_REPLAY_PREVIEW_AUDIO 328
    INPUT_VEH_DRIVE_LOOK 329
    INPUT_VEH_DRIVE_LOOK2 330
    INPUT_VEH_FLY_ATTACK2 331
    INPUT_RADIO_WHEEL_UD 332
    INPUT_RADIO_WHEEL_LR 333
    INPUT_VEH_SLOWMO_UD 334
    INPUT_VEH_SLOWMO_UP_ONLY 335
    INPUT_VEH_SLOWMO_DOWN_ONLY 336
    INPUT_VEH_HYDRAULICS_CONTROL_TOGGLE 337
    INPUT_VEH_HYDRAULICS_CONTROL_LEFT 338
    INPUT_VEH_HYDRAULICS_CONTROL_RIGHT 339
    INPUT_VEH_HYDRAULICS_CONTROL_UP 340
    INPUT_VEH_HYDRAULICS_CONTROL_DOWN 341
    INPUT_VEH_HYDRAULICS_CONTROL_LR 342
    INPUT_VEH_HYDRAULICS_CONTROL_UD 343
    INPUT_SWITCH_VISOR 344 F11
    INPUT_VEH_MELEE_HOLD 345
    INPUT_VEH_MELEE_LEFT 346
    INPUT_VEH_MELEE_RIGHT 347
    INPUT_MAP_POI 348
    INPUT_REPLAY_SNAPMATIC_PHOTO 349
    INPUT_VEH_CAR_JUMP 350
    INPUT_VEH_ROCKET_BOOST 351
    INPUT_VEH_PARACHUTE 352
    INPUT_VEH_BIKE_WINGS 353
    INPUT_VEH_FLY_BOMB_BAY 354
    INPUT_VEH_FLY_COUNTER 355
    INPUT_VEH_TRANSFORM 356 0

    Source1, Source2


    Beachtet bei der Verwendung, dass sich die Tastenbelegung bei Nutzern unterscheiden kann, wenn diese ihre Inputs selbst umgestellt haben.

    Bei Verwendung eines Controllers werden die gleichen Inputs getriggert, da bei einem Kontroller die Tasten meist doppelt belegt sind, können hier ungewünschte Nebeneffekte auftreten!



    Nutzbar mit folgenden Methoden:

    C
    1. //Wen eine Taste gedrückt wird:
    2. API.IsControlJustPressed(0, 175);
    3. //Wenn eine Taste losgelassen wird:
    4. API.IsControlJustReleased(0, 175);
    5. //Solange eine Taste gedrückt wird:
    6. API.IsControlPressed(0, 175);
    7. //Solange ein Taste nicht gedrückt wird:
    8. API.IsControlReleased(0, 175);

    All diese Methoden sollten in jedem Frame aufgerufen werden, damit sie richtig funktionieren.