SHARE
TWEET

Untitled

a guest Apr 22nd, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public fw_PlayerPreThink(id)
  2. {
  3.     if(!is_user_alive(id) || !g_IsSlenderman[id])
  4.         return
  5.  
  6.     static Float:flGametime; flGametime = get_gametime();
  7.  
  8.     static Float:fvOrigin[3]; entity_get_vector(iEnt, EV_VEC_origin, fvOrigin);
  9.  
  10.     iTotalPlayers = find_sphere_class(iEnt, "player", SLENDER_RADIUS, iPlayers, 32, fvOrigin)
  11.  
  12.     //client_print(id, print_center, "JUGADORES EN EL RADIO: %d", iTotalPlayers);
  13.     if(iTotalPlayers)
  14.     {
  15.         static i, victim;
  16.  
  17.         if(flGametime > g_flLaughDelay[id])
  18.         {
  19.             emit_sound(id, CHAN_ITEM, g_szSlenderLaugh, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
  20.             g_flLaughDelay[id] = flGametime + SLENDER_L_DELAY
  21.         }
  22.         for(i = 0; i < iTotalPlayers; i++)
  23.         {
  24.             victim = iPlayers[i];
  25.  
  26.             if(!is_user_alive(victim) || !is_in_viewcone(victim, fvOrigin) || flGametime < g_flSlayDelay[id])
  27.                 continue;
  28.  
  29.             shake_user_screen(victim);
  30.             ExecuteHamB(Ham_TakeDamage, victim, id, id, 15.0, DMG_SHOCK)
  31.             g_flSlayDelay[victim] = flGametime + SLENDER_DELAY
  32.         }
  33.     }
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top