Dabar yra 2019 Rgp 21 13:14




 Puslapis 11 [ 3 pranešimai(ų) ] 
Autorius Žinutė
 Pranešimo tema: Biski pakeisti plugina
Žinutės numeris: #1  StandartinėParašytas: 2010 Rgs 04 20:44 
O taip. Jis jau surinko 50 žinučių!

Užsiregistravo: 2010 Rgs 04 11:59
Pranešimai: 50
Karma: 0
  1. #include < amxmodx >
  2. #include < engine >
  3. #include < zombieplague >
  4.  
  5. new const zclass_name[ ] = "Boomer"
  6. new const zclass_info[ ] = "- bind [key] boomer_vomit"
  7. new const zclass_model[ ] = "zombie_boomer"
  8. new const zclass_clawmodel[ ] = "v_knife_boomer.mdl"
  9. const zclass_health = 500
  10. const zclass_speed = 200
  11. const Float:zclass_gravity = 1.0
  12. const Float:zclass_knockback = 0.5
  13.  
  14. new const vomit_sprite[ ] = "sprites/poison.spr"
  15. new const vomit_sounds[ 3 ][ ] =
  16. { "zombie_plague/male_boomer_vomit_01.wav",
  17. "zombie_plague/male_boomer_vomit_03.wav",
  18. "zombie_plague/male_boomer_vomit_04.wav" }
  19.  
  20. new const explode_sounds[ 3 ][ ] =
  21. { "zombie_plague/explo_medium_09.wav",
  22. "zombie_plague/explo_medium_10.wav",
  23. "zombie_plague/explo_medium_14.wav" }
  24.  
  25. new g_zclass_boomer, g_msgid_ScreenFade, g_iMaxPlayers, vomit, cvar_vomitdist, cvar_explodedist, cvar_wakeuptime, cvar_vomitcooldown, cvar_victimrender, cvar_inuse, cvar_boomer_reward
  26.  
  27. // Cooldown hook
  28. new Float:g_iLastVomit[ 33 ]
  29.  
  30. // Stupid spam when using IN_USE button
  31. new bool:g_iHateSpam[ 33 ]
  32.  
  33. public plugin_init( )
  34. {
  35.     register_plugin( "[ZP] Zombie Class: Boomer", "1.2 BETA", "Excalibur.007" )
  36.    
  37.     register_clcmd( "boomer_vomit", "clcmd_vomit" )
  38.    
  39.     register_event( "DeathMsg", "event_DeathMsg", "a" )
  40.    
  41.     cvar_vomitdist = register_cvar( "zp_boomer_vomit_dist", "300" )
  42.     cvar_explodedist = register_cvar( "zp_boomer_explode_dist", "300" )
  43.     cvar_wakeuptime = register_cvar( "zp_boomer_blind_time", "4" )
  44.     cvar_vomitcooldown = register_cvar( "zp_boomer_vomit_cooldown", "10.0" )
  45.     cvar_victimrender = register_cvar( "zp_boomer_victim_render", "1" )
  46.     cvar_inuse = register_cvar( "zp_boomer_in_use_bind", "1" )
  47.     cvar_boomer_reward = register_cvar( "zp_boomer_ap_reward", "2" )
  48.    
  49.     g_msgid_ScreenFade = get_user_msgid( "ScreenFade" )
  50.    
  51.     /* - We hook it at here to optimize the plugin a bit
  52.     since sv_maxplayers cvar CANNOT BE CHANGED during in-game - */
  53.     g_iMaxPlayers = get_maxplayers( )
  54. }
  55.  
  56. public plugin_precache( )
  57. {
  58.     g_zclass_boomer = zp_register_zombie_class( zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback )
  59.    
  60.     vomit = precache_model( vomit_sprite )
  61.    
  62.     for( new i = 0; i < sizeof vomit_sounds; i ++ )
  63.         precache_sound( vomit_sounds[ i ] )
  64.        
  65.     for( new i = 0; i < sizeof explode_sounds; i ++ )
  66.         precache_sound( explode_sounds[ i ] )
  67. }
  68.  
  69. public zp_user_infected_post( id, infector )
  70. {
  71.     if( zp_get_user_zombie_class( id ) == g_zclass_boomer && !zp_get_user_nemesis( id ) )
  72.     {
  73.         if( get_pcvar_num( cvar_inuse ) )
  74.         {
  75.             client_print( id, print_chat, "[ZP] Press your defuse/plant button(Default: E) to vomit!. Made by Excalibur.007" )
  76.         }
  77.         else
  78.         {
  79.             client_print( id, print_chat, "[ZP] To vomit, ^"bind [key] boomer_vomit^". Made by Excalibur.007" )
  80.         }
  81.     }
  82. }
  83.  
  84. public client_PreThink( id )
  85. {
  86.     if( !is_user_alive( id ) || !is_user_connected( id ) || !zp_get_user_zombie( id ) || zp_get_user_nemesis( id ) || zp_get_user_zombie_class( id ) != g_zclass_boomer || !get_pcvar_num( cvar_inuse ) || g_iHateSpam[ id ] )
  87.         return PLUGIN_HANDLED
  88.    
  89.     if( ( get_user_button( id ) & IN_USE ) )
  90.     {
  91.         g_iHateSpam[ id ] = true
  92.         clcmd_vomit( id )
  93.         set_task( 1.0, "StopSpam_XD", id )
  94.     }
  95.     return PLUGIN_HANDLED
  96. }
  97.  
  98. public clcmd_vomit( id )
  99. {
  100.     if( !is_user_alive( id ) || !is_user_connected( id ) || !zp_get_user_zombie( id ) || zp_get_user_nemesis( id ) || zp_get_user_zombie_class( id ) != g_zclass_boomer )
  101.         return PLUGIN_HANDLED
  102.    
  103.     if( get_gametime( ) - g_iLastVomit[ id ] < get_pcvar_float( cvar_vomitcooldown ) )
  104.     {
  105.         client_print( id, print_chat, "[ZP] You need to wait for %.f0 sec. to vomit again!", get_pcvar_float( cvar_vomitcooldown ) - ( get_gametime( ) - g_iLastVomit[ id ] ) )
  106.         return PLUGIN_HANDLED
  107.     }
  108.    
  109.     g_iLastVomit[ id ] = get_gametime( )
  110.    
  111.     new target, body, dist = get_pcvar_num( cvar_vomitdist )
  112.     get_user_aiming( id, target, body, dist )
  113.        
  114.     new vec[ 3 ], aimvec[ 3 ], velocityvec[ 3 ]
  115.     new length
  116.    
  117.     get_user_origin( id, vec )
  118.     get_user_origin( id, aimvec, 2 )
  119.    
  120.     velocityvec[ 0 ] = aimvec[ 0 ] - vec[ 0 ]
  121.     velocityvec[ 1 ] = aimvec[ 1 ] - vec[ 1 ]
  122.     velocityvec[ 2 ] = aimvec[ 2 ] - vec[ 2 ]
  123.     length = sqrt( velocityvec[ 0 ] * velocityvec[ 0 ] + velocityvec[ 1 ] * velocityvec[ 1 ] + velocityvec[ 2 ] * velocityvec[ 2 ] )
  124.     velocityvec[ 0 ] = velocityvec[ 0 ] * 10 / length
  125.     velocityvec[ 1 ] = velocityvec[ 1 ] * 10 / length
  126.     velocityvec[ 2 ] = velocityvec[ 2 ] * 10 / length
  127.    
  128.     new args[ 8 ]
  129.     args[ 0 ] = vec[ 0 ]
  130.     args[ 1 ] = vec[ 1 ]
  131.     args[ 2 ] = vec[ 2 ]
  132.     args[ 3 ] = velocityvec[ 0 ]
  133.     args[ 4 ] = velocityvec[ 1 ]
  134.     args[ 5 ] = velocityvec[ 2 ]
  135.    
  136.     set_task( 0.1, "create_sprite", 0, args, 8, "a", 3 )
  137.    
  138.     emit_sound( id, CHAN_STREAM, vomit_sounds[ random_num( 0, 2 ) ], 1.0, ATTN_NORM, 0, PITCH_HIGH )
  139.    
  140.     if( is_valid_ent( target ) && is_user_alive( target ) && is_user_connected( target ) && !zp_get_user_zombie( target ) && get_entity_distance( id, target ) <= dist )
  141.     {
  142.         message_begin( MSG_ONE_UNRELIABLE, g_msgid_ScreenFade, _, target )
  143.         write_short( get_pcvar_num( cvar_wakeuptime ) )
  144.         write_short( get_pcvar_num( cvar_wakeuptime ) )
  145.         write_short( 0x0004 )
  146.         write_byte( 79 )
  147.         write_byte( 180 )
  148.         write_byte( 61 )
  149.         write_byte( 255 )
  150.         message_end( )
  151.        
  152.         if( get_pcvar_num( cvar_victimrender ) )
  153.         {
  154.             set_rendering( target, kRenderFxGlowShell, 79, 180, 61, kRenderNormal, 25 )
  155.         }
  156.         set_task( get_pcvar_float( cvar_wakeuptime ), "victim_wakeup", target )
  157.        
  158.         if( !get_pcvar_num( cvar_boomer_reward ) )
  159.             return PLUGIN_HANDLED
  160.            
  161.         zp_set_user_ammo_packs( id, zp_get_user_ammo_packs( id ) + get_pcvar_num( cvar_boomer_reward ) )
  162.         client_print( id, print_chat, "[ZP] You've earned %i for vomiting on a human!", get_pcvar_num( cvar_boomer_reward ) )
  163.     }
  164.     return PLUGIN_HANDLED
  165. }
  166.  
  167. public create_sprite( args[ ] )
  168. {
  169.     message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
  170.     write_byte( 120 )
  171.     write_coord( args[ 0 ] )
  172.     write_coord( args[ 1 ] )
  173.     write_coord( args[ 2 ] )
  174.     write_coord( args[ 3 ] )
  175.     write_coord( args[ 4 ] )
  176.     write_coord( args[ 5 ] )
  177.     write_short( vomit )
  178.     write_byte( 8 )
  179.     write_byte( 70 )
  180.     write_byte( 100 )
  181.     write_byte( 5 )
  182.     message_end( )
  183.    
  184.     return PLUGIN_CONTINUE
  185. }
  186.  
  187. public victim_wakeup( id )
  188. {
  189.     if( !is_user_connected( id ) )
  190.         return
  191.    
  192.     message_begin( MSG_ONE_UNRELIABLE, g_msgid_ScreenFade, _, id )
  193.     write_short( ( 1<<12 ) )
  194.     write_short( 0 )
  195.     write_short( 0x0000 )
  196.     write_byte( 0 )
  197.     write_byte( 0 )
  198.     write_byte( 0 )
  199.     write_byte( 255 )
  200.     message_end( )
  201.    
  202.     if( get_pcvar_num( cvar_victimrender ) )
  203.     {
  204.         set_rendering( id )
  205.     }
  206. }
  207.  
  208. public StopSpam_XD( id )
  209. {
  210.     if( !is_user_connected( id ) )
  211.         return
  212.        
  213.     g_iHateSpam[ id ] = false
  214. }
  215. public event_DeathMsg( )
  216. {
  217.     new id = read_data( 2 )
  218.    
  219.     if( !is_user_connected( id ) || !zp_get_user_zombie( id ) || zp_get_user_nemesis( id ) || zp_get_user_zombie_class( id ) != g_zclass_boomer )
  220.         return
  221.        
  222.     emit_sound( id, CHAN_STREAM, explode_sounds[ random_num( 0, 2 ) ], 1.0, ATTN_NORM, 0, PITCH_HIGH )
  223.    
  224.     for( new i = 1; i <= g_iMaxPlayers; i ++ )
  225.     {
  226.         if( !is_valid_ent( i ) || !is_user_alive( i ) || !is_user_connected( i ) || zp_get_user_zombie( i ) || get_entity_distance( id, i ) > get_pcvar_num( cvar_explodedist ) )
  227.             return
  228.            
  229.         message_begin( MSG_ONE_UNRELIABLE, g_msgid_ScreenFade, _, i )
  230.         write_short( get_pcvar_num( cvar_wakeuptime ) )
  231.         write_short( get_pcvar_num( cvar_wakeuptime ) )
  232.         write_short( 0x0004 )
  233.         write_byte( 79 )
  234.         write_byte( 180 )
  235.         write_byte( 61 )
  236.         write_byte( 255 )
  237.         message_end( )
  238.        
  239.         if( get_pcvar_num( cvar_victimrender ) )
  240.         {
  241.             set_rendering( i, kRenderFxGlowShell, 79, 180, 61, kRenderNormal, 25 )
  242.         }
  243.        
  244.         set_task( get_pcvar_float( cvar_wakeuptime ), "victim_wakeup", i )
  245.        
  246.         if( !get_pcvar_num( cvar_boomer_reward ) )
  247.             return
  248.            
  249.         zp_set_user_ammo_packs( id, zp_get_user_ammo_packs( id ) + ( get_pcvar_num( cvar_boomer_reward ) * i ) )
  250.         client_print( id, print_chat, "[ZP] You've earned %i for exploding on %i humans!", ( get_pcvar_num( cvar_boomer_reward ) * i ), i )
  251.     }
  252. }
  253.  
  254. public sqrt( num )
  255. {
  256.     new div = num
  257.     new result = 1
  258.     while( div > result )
  259.     {
  260.         div = ( div + result ) / 2
  261.         result = num / div
  262.     }
  263.     return div
  264. }
  265.  

Gal kas gali perdaryti kad kai mirsta nepadarytu zalia ekrana o uzkrestu


Atsijungęs
 Aprašymas  
 
 Pranešimo tema: Re: Biski pakeisti plugina
Žinutės numeris: #2  StandartinėParašytas: 2010 Rgs 04 21:20 
Vyr. diskusijų administratorius
Vartotojo avataras

Užsiregistravo: 2010 Rgp 31 13:21
Pranešimai: 3891
Karma: 183
Apačioje.


Prikabinti failai:
plugin.sma [7.46 KiB]
Atsisiųsta 375 kartus(ų)

_________________
Palikau CS pasaulį ;/ . Nebepasiekiamas.
Atsijungęs
 Aprašymas  
 
 Pranešimo tema: Re: Biski pakeisti plugina
Žinutės numeris: #3  StandartinėParašytas: 2010 Rgs 05 13:50 
O taip. Jis jau surinko 50 žinučių!

Užsiregistravo: 2010 Rgs 04 11:59
Pranešimai: 50
Karma: 0
Kazkodel neveikia uzkretimas :(

+ dar dadejau kad butu apskritimas toksai ir kai i ji ilendi turetu tave uzkresti ( Kai boomeris mirsta )

  1. #include < amxmodx >
  2. #include < engine >
  3. #include <fakemeta>
  4. #include < zombieplague >
  5.  
  6. new const zclass_name[ ] = "Boomer"
  7. new const zclass_info[ ] = "bind [key] boomer_vomit"
  8. new const zclass_model[ ] = "zombie_boomer"
  9. new const zclass_clawmodel[ ] = "v_boomer_knife2.mdl"
  10. const zclass_health = 500
  11. const zclass_speed = 200
  12. const Float:zclass_gravity = 1.0
  13. const Float:zclass_knockback = 0.5
  14.  
  15. new g_exploSpr;
  16. new sprite_grenade_ring[64];
  17.  
  18. new const vomit_sprite[ ] = "sprites/poison.spr"
  19. new const vomit_sounds[ 3 ][ ] =
  20. { "zombie_plague/male_boomer_vomit_01.wav",
  21.     "zombie_plague/male_boomer_vomit_03.wav",
  22. "zombie_plague/male_boomer_vomit_04.wav" }
  23.  
  24. new const explode_sounds[ 3 ][ ] =
  25. { "zombie_plague/explo_medium_09.wav",
  26.     "zombie_plague/explo_medium_10.wav",
  27. "zombie_plague/explo_medium_14.wav" }
  28.  
  29. new g_zclass_boomer, g_msgid_ScreenFade, g_iMaxPlayers, vomit, cvar_vomitdist, cvar_explodedist, cvar_wakeuptime, cvar_vomitcooldown, cvar_victimrender, cvar_inuse, cvar_boomer_reward
  30.  
  31. // Cooldown hook
  32. new Float:g_iLastVomit[ 33 ]
  33.  
  34. // Stupid spam when using IN_USE button
  35. new bool:g_iHateSpam[ 33 ]
  36.  
  37. public plugin_init( )
  38. {
  39.     register_plugin( "[ZP] Zombie Class: Boomer", "1.2 BETA", "Excalibur.007" )
  40.    
  41.     register_clcmd( "boomer_vomit", "clcmd_vomit" )
  42.    
  43.     register_event( "DeathMsg", "event_DeathMsg", "a" )
  44.    
  45.     cvar_vomitdist = register_cvar( "zp_boomer_vomit_dist", "300" )
  46.     cvar_explodedist = register_cvar( "zp_boomer_explode_dist", "500" )
  47.     cvar_wakeuptime = register_cvar( "zp_boomer_blind_time", "4" )
  48.     cvar_vomitcooldown = register_cvar( "zp_boomer_vomit_cooldown", "10.0" )
  49.     cvar_victimrender = register_cvar( "zp_boomer_victim_render", "1" )
  50.     cvar_inuse = register_cvar( "zp_boomer_in_use_bind", "0" )
  51.     cvar_boomer_reward = register_cvar( "zp_boomer_ap_reward", "2" )
  52.    
  53.     g_msgid_ScreenFade = get_user_msgid( "ScreenFade" )
  54.    
  55.     /* - We hook it at here to optimize the plugin a bit
  56.     since sv_maxplayers cvar CANNOT BE CHANGED during in-game - */
  57.     g_iMaxPlayers = get_maxplayers( )
  58. }
  59.  
  60. public plugin_precache( )
  61. {
  62.     g_zclass_boomer = zp_register_zombie_class( zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback )
  63.    
  64.     vomit = precache_model( vomit_sprite )
  65.    
  66.     for( new i = 0; i < sizeof vomit_sounds; i ++ )
  67.         precache_sound( vomit_sounds[ i ] )
  68.    
  69.     for( new i = 0; i < sizeof explode_sounds; i ++ )
  70.         precache_sound( explode_sounds[ i ] )
  71.  
  72.     g_exploSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_ring)
  73. }
  74.  
  75. public zp_user_infected_post( id, infector )
  76. {
  77.     if( zp_get_user_zombie_class( id ) == g_zclass_boomer && !zp_get_user_nemesis( id ) )
  78.     {
  79.         if( get_pcvar_num( cvar_inuse ) )
  80.         {
  81.             client_print( id, print_chat, "[ZP] Press your defuse/plant button(Default: E) to vomit!" )
  82.         }
  83.         else
  84.         {
  85.             client_print( id, print_chat, "[ZP] To vomit, ^"bind [key] boomer_vomit^"" )
  86.         }
  87.     }
  88. }
  89.  
  90. public client_PreThink( id )
  91. {
  92.     if( !is_user_alive( id ) || !is_user_connected( id ) || !zp_get_user_zombie( id ) || zp_get_user_nemesis( id ) || zp_get_user_zombie_class( id ) != g_zclass_boomer || !get_pcvar_num( cvar_inuse ) || g_iHateSpam[ id ] )
  93.         return PLUGIN_HANDLED
  94.    
  95.     if( ( get_user_button( id ) & IN_USE ) )
  96.     {
  97.         g_iHateSpam[ id ] = true
  98.         clcmd_vomit( id )
  99.         set_task( 1.0, "StopSpam_XD", id )
  100.     }
  101.     return PLUGIN_HANDLED
  102. }
  103.  
  104. public clcmd_vomit( id )
  105. {
  106.     if( !is_user_alive( id ) || !is_user_connected( id ) || !zp_get_user_zombie( id ) || zp_get_user_nemesis( id ) || zp_get_user_zombie_class( id ) != g_zclass_boomer )
  107.         return PLUGIN_HANDLED
  108.    
  109.     if( get_gametime( ) - g_iLastVomit[ id ] < get_pcvar_float( cvar_vomitcooldown ) )
  110.     {
  111.         client_print( id, print_chat, "[ZP] You need to wait for %.f0 sec. to vomit again!", get_pcvar_float( cvar_vomitcooldown ) - ( get_gametime( ) - g_iLastVomit[ id ] ) )
  112.         return PLUGIN_HANDLED
  113.     }
  114.    
  115.     g_iLastVomit[ id ] = get_gametime( )
  116.    
  117.     new target, body, dist = get_pcvar_num( cvar_vomitdist )
  118.     get_user_aiming( id, target, body, dist )
  119.    
  120.     new vec[ 3 ], aimvec[ 3 ], velocityvec[ 3 ]
  121.     new length
  122.    
  123.     get_user_origin( id, vec )
  124.     get_user_origin( id, aimvec, 2 )
  125.    
  126.     velocityvec[ 0 ] = aimvec[ 0 ] - vec[ 0 ]
  127.     velocityvec[ 1 ] = aimvec[ 1 ] - vec[ 1 ]
  128.     velocityvec[ 2 ] = aimvec[ 2 ] - vec[ 2 ]
  129.     length = sqrt( velocityvec[ 0 ] * velocityvec[ 0 ] + velocityvec[ 1 ] * velocityvec[ 1 ] + velocityvec[ 2 ] * velocityvec[ 2 ] )
  130.     velocityvec[ 0 ] = velocityvec[ 0 ] * 10 / length
  131.     velocityvec[ 1 ] = velocityvec[ 1 ] * 10 / length
  132.     velocityvec[ 2 ] = velocityvec[ 2 ] * 10 / length
  133.    
  134.     new args[ 8 ]
  135.     args[ 0 ] = vec[ 0 ]
  136.     args[ 1 ] = vec[ 1 ]
  137.     args[ 2 ] = vec[ 2 ]
  138.     args[ 3 ] = velocityvec[ 0 ]
  139.     args[ 4 ] = velocityvec[ 1 ]
  140.     args[ 5 ] = velocityvec[ 2 ]
  141.    
  142.     set_task( 0.1, "create_sprite", 0, args, 8, "a", 3 )
  143.    
  144.     emit_sound( id, CHAN_STREAM, vomit_sounds[ random_num( 0, 2 ) ], 1.0, ATTN_NORM, 0, PITCH_HIGH )
  145.    
  146.     if( is_valid_ent( target ) && is_user_alive( target ) && is_user_connected( target ) && !zp_get_user_zombie( target ) && get_entity_distance( id, target ) <= dist )
  147.     {
  148.         message_begin( MSG_ONE_UNRELIABLE, g_msgid_ScreenFade, _, target )
  149.         write_short( get_pcvar_num( cvar_wakeuptime ) )
  150.         write_short( get_pcvar_num( cvar_wakeuptime ) )
  151.         write_short( 0x0004 )
  152.         write_byte( 79 )
  153.         write_byte( 180 )
  154.         write_byte( 61 )
  155.         write_byte( 255 )
  156.         message_end( )
  157.        
  158.         if( get_pcvar_num( cvar_victimrender ) )
  159.         {
  160.             set_rendering( target, kRenderFxGlowShell, 79, 180, 61, kRenderNormal, 25 )
  161.         }
  162.         set_task( get_pcvar_float( cvar_wakeuptime ), "victim_wakeup", target )
  163.        
  164.         if( !get_pcvar_num( cvar_boomer_reward ) )
  165.             return PLUGIN_HANDLED
  166.        
  167.         zp_set_user_ammo_packs( id, zp_get_user_ammo_packs( id ) + get_pcvar_num( cvar_boomer_reward ) )
  168.         client_print( id, print_chat, "[ZP] You've earned %i for vomiting on a human!", get_pcvar_num( cvar_boomer_reward ) )
  169.     }
  170.     return PLUGIN_HANDLED
  171. }
  172.  
  173. public create_sprite( args[ ] )
  174. {
  175.     message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
  176.     write_byte( 120 )
  177.     write_coord( args[ 0 ] )
  178.     write_coord( args[ 1 ] )
  179.     write_coord( args[ 2 ] )
  180.     write_coord( args[ 3 ] )
  181.     write_coord( args[ 4 ] )
  182.     write_coord( args[ 5 ] )
  183.     write_short( vomit )
  184.     write_byte( 8 )
  185.     write_byte( 70 )
  186.     write_byte( 100 )
  187.     write_byte( 5 )
  188.     message_end( )
  189.    
  190.     return PLUGIN_CONTINUE
  191. }
  192.  
  193. public StopSpam_XD( id )
  194. {
  195.     if( !is_user_connected( id ) )
  196.         return
  197.    
  198.     g_iHateSpam[ id ] = false
  199. }
  200.  
  201. public victim_wakeup( id )
  202. {
  203.     if( !is_user_connected( id ) )
  204.         return
  205.    
  206.     message_begin( MSG_ONE_UNRELIABLE, g_msgid_ScreenFade, _, id )
  207.     write_short( ( 1<<12 ) )
  208.     write_short( 0 )
  209.     write_short( 0x0000 )
  210.     write_byte( 0 )
  211.     write_byte( 0 )
  212.     write_byte( 0 )
  213.     write_byte( 255 )
  214.     message_end( )
  215.    
  216.     if( get_pcvar_num( cvar_victimrender ) )
  217.     {
  218.         set_rendering( id )
  219.     }
  220. }
  221.  
  222. public event_DeathMsg( )
  223. {
  224.     new id = read_data( 2 )
  225.    
  226.     if( !is_user_connected( id ) || !zp_get_user_zombie( id ) || zp_get_user_nemesis( id ) || zp_get_user_zombie_class( id ) != g_zclass_boomer )
  227.         return
  228.    
  229.     emit_sound( id, CHAN_STREAM, explode_sounds[ random_num( 0, 2 ) ], 1.0, ATTN_NORM, 0, PITCH_HIGH )
  230.    
  231.     for( new i = 1; i <= g_iMaxPlayers; i ++ )
  232.     {
  233.         if( !is_valid_ent( i ) || !is_user_alive( i ) || !is_user_connected( i ) || zp_get_user_zombie( i ) || get_entity_distance( id, i ) > get_pcvar_num( cvar_explodedist ) )
  234.             return
  235.  
  236.         new Float:originF[3]
  237.  
  238.         engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
  239.         write_byte(TE_BEAMCYLINDER) // TE id
  240.         engfunc(EngFunc_WriteCoord, originF[0]) // x
  241.         engfunc(EngFunc_WriteCoord, originF[1]) // y
  242.         engfunc(EngFunc_WriteCoord, originF[2]) // z
  243.         engfunc(EngFunc_WriteCoord, originF[0]) // x axis
  244.         engfunc(EngFunc_WriteCoord, originF[1]) // y axis
  245.         engfunc(EngFunc_WriteCoord, originF[2]+385.0) // z axis
  246.         write_short(g_exploSpr) // sprite
  247.         write_byte(0) // startframe
  248.         write_byte(0) // framerate
  249.         write_byte(4) // life
  250.         write_byte(60) // width
  251.         write_byte(0) // noise
  252.         write_byte(0) // red
  253.         write_byte(200) // green
  254.         write_byte(0) // blue
  255.         write_byte(200) // brightness
  256.         write_byte(0) // speed
  257.         message_end()
  258.        
  259.         zp_infect_user(i, id, 0, 1)
  260.        
  261.         if( !get_pcvar_num( cvar_boomer_reward ) )
  262.             return
  263.        
  264.         zp_set_user_ammo_packs( id, zp_get_user_ammo_packs( id ) + ( get_pcvar_num( cvar_boomer_reward ) * i ) )
  265.         client_print( id, print_chat, "[ZP] You've earned %i for exploding on %i humans!", ( get_pcvar_num( cvar_boomer_reward ) * i ), i )
  266.     }
  267. }
  268.  
  269. public sqrt( num )
  270. {
  271.     new div = num
  272.     new result = 1
  273.     while( div > result )
  274.     {
  275.         div = ( div + result ) / 2
  276.         result = num / div
  277.     }
  278.     return div
  279. }
  280. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  281. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1063\\ f0\\ fs16 \n\\ par }
  282. */
  283.  
  284.  


Atsijungęs
 Aprašymas  
 
Rodyti paskutinius pranešimus:  Rūšiuoti pagal  
 Puslapis 11 [ 3 pranešimai(ų) ] 


Dabar prisijungę

Vartotojai naršantys šį forumą: Registruotų vartotojų nėra ir 1 svečias


Jūs negalite kurti naujų temų šiame forume
Jūs negalite atsakinėti į temas šiame forume
Jūs negalite redaguoti savo pranešimų šiame forume
Jūs negalite trinti savo pranešimų šiame forume
Jūs negalite prikabinti failų šiame forume

Ieškoti:
Pereiti į:  

cron