hlmod.hu
https://hlmod.hu/

PreThink, PostThink: mi a különbség?
https://hlmod.hu/viewtopic.php?f=9&t=9588
Oldal: 1 / 1

Szerző:  Gatshow [2013.07.18. 19:36 ]
Hozzászólás témája:  PreThink, PostThink: mi a különbség?

Halo
Nos, az lenne a kérdésem, melyik mit csinál és mi a különbség?? :D

SMA Forráskód: [ Mindet kijelol ]
  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. }
  9.  
  10. new bool:falling[33];
  11.  
  12. public client_PreThink(id) {
  13. new falldamage = 0
  14. if(falldamage && is_user_alive(id) && is_user_connected(id)) {
  15. if(entity_get_float(id, EV_FL_flFallVelocity) >= FALL_VELOCITY) {
  16. falling[id] = true;
  17. } else {
  18. falling[id] = false;
  19. }
  20. }
  21. }
  22.  
  23. public client_PostThink(id) {
  24. new falldamage = 0
  25. if(falldamage && is_user_alive(id) && is_user_connected(id)) {
  26. if(falling[id]) {
  27. entity_set_int(id, EV_INT_watertype, -3);
  28. }
  29. }
  30. }
  31.  

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