hlmod.hu
https://hlmod.hu/

Magas helyről leugrás
https://hlmod.hu/viewtopic.php?f=9&t=25354
Oldal: 1 / 1

Szerző:  Khemo [ 2016.07.01. 23:52 ]
Hozzászólás témája:  Magas helyről leugrás

Sziasztok,valaki tudna 1 olyan plugint adni/írni hogy amikor 1 magas helyről leugrok ne sebezzen le?Előre is köszönöm.

Szerző:  pixxa112 [ 2016.07.01. 23:58 ]
Hozzászólás témája:  Re: Magas helyről leugrás

  1. #include <amxmodx>
  2. #include <engine>
  3.  
  4. #define FALL_VELOCITY 350.0
  5.  
  6. public plugin_init() {
  7.   register_plugin("No fall damage", "0.2", "v3x");
  8.   if(!cvar_exists("mp_falldamage")) {
  9.     register_cvar("mp_falldamage", "0");
  10.   }
  11. }
  12.  
  13. new bool:falling[33];
  14.  
  15. public client_PreThink(id) {
  16.   if(get_cvar_num("mp_falldamage") == 0
  17.   && is_user_alive(id)
  18.   && is_user_connected(id)) {
  19.     if(entity_get_float(id, EV_FL_flFallVelocity) >= FALL_VELOCITY) {
  20.       falling[id] = true;
  21.     } else {
  22.       falling[id] = false;
  23.     }
  24.   }
  25. }
  26.  
  27. public client_PostThink(id) {
  28.   if(get_cvar_num("mp_falldamage") == 0
  29.   && is_user_alive(id)
  30.   && is_user_connected(id)) {
  31.     if(falling[id]) {
  32.       entity_set_int(id, EV_INT_watertype, -3);
  33.     }
  34.   }
  35. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/