hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.09.18. 22:39



Jelenlévő felhasználók

Jelenleg 296 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 294 vendég

A legtöbb felhasználó (2883 fő) 2025.07.30. 16:00-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot], Majestic-12 [Bot]az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása Hozzászólás a témához  [6 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Quakesounds öngyilkosság
HozzászólásElküldve:2012.07.22. 12:26 
Offline
Őstag
Avatar

Csatlakozott:2012.02.14. 15:09
Hozzászólások:1423
Megköszönték neki: 2 alkalommal
Az advanced quake soundsban miért nem hallhatom azt amikor meghalok ? Mikor leesek DR mapon...
SUICIDE SOUNDS = QuakeSounds/suicide.wav , QuakeSounds/suicide2.wav , QuakeSounds/suicide3.wav , QuakeSounds/suicide4.wav
Ez szerintem rendben van...helyükön vannak a fájlok..

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Quakesounds öngyilkosság
HozzászólásElküldve:2012.07.22. 12:27 
Offline
Developer
Avatar

Csatlakozott:2011.06.01. 21:11
Hozzászólások:7966
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 537 alkalommal
Logot olvasd!!!!!!!!!!!!!!

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Quakesounds öngyilkosság
HozzászólásElküldve:2012.07.22. 16:30 
Offline
Őskövület
Avatar

Csatlakozott:2013.01.01. 17:48
Hozzászólások:2441
Megköszönt másnak: 18 alkalommal
Megköszönték neki: 21 alkalommal
Erre én annó még írtam egy kis plugint, ami kicseréli a hangokat amikor meghalsz. Pl bemondja csaj hangon hogy: Mission Aborted! Meg elkezd nevetni meg stb. Ha érdekel elküldhetem!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Quakesounds öngyilkosság
HozzászólásElküldve:2012.07.22. 18:28 
Offline
Őstag
Avatar

Csatlakozott:2012.02.14. 15:09
Hozzászólások:1423
Megköszönték neki: 2 alkalommal
L 07/22/2012 - 17:32:39: [AMXX] Displaying debug trace (plugin "quakesounds.amxx")
L 07/22/2012 - 17:32:39: [AMXX] Run time error 4: index out of bounds
L 07/22/2012 - 17:32:39: [AMXX] [0] 88495.attach::PlayerKilled (line 301)

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Quakesounds öngyilkosság
HozzászólásElküldve:2012.07.22. 18:57 
Offline
Őskövület
Avatar

Csatlakozott:2013.01.01. 17:48
Hozzászólások:2441
Megköszönt másnak: 18 alkalommal
Megköszönték neki: 21 alkalommal
SMA?


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Quakesounds öngyilkosság
HozzászólásElküldve:2012.07.22. 18:58 
Offline
Őstag
Avatar

Csatlakozott:2012.02.14. 15:09
Hozzászólások:1423
Megköszönték neki: 2 alkalommal
A hud üzeneteket töröltem a quakesound.ini ben..
Kód:
  1. // Really needed?

  2. //#pragma semicolon 1

  3.  

  4. #include < amxmodx >

  5.  

  6. // Variable for check if the plugin is enabled

  7. new g_iPluginEnabled;

  8.  

  9. // Variables for cache the onlykiller settings

  10. new g_iHeadshotOnlyKiller, g_iRevengeOnlyKiller;

  11.  

  12. // Variables for check if the events are enabled

  13. new g_iHeadshot, g_iSuicide, g_iNade, g_iTeamkill, g_iKnife, g_iFirstblood, g_iKillstreak, g_iRoundstart, g_iDoublekill, g_iHattrick, g_iFlawless, g_iRevenge;

  14.  

  15. // Variables for cache the colors you set

  16. new g_iRed, g_iGreen, g_iBlue, g_iRandomRed, g_iRandomGreen, g_iRandomBlue;

  17.  

  18. // Variable for cache the minimum required frags for the `Hattrick` event

  19. new g_iMinFragsForHattrick;

  20.  

  21. // The plugin arrays

  22. new Array: g_aHeadshot, Array: g_aSuicide, Array: g_aNade, Array: g_aTeamkill, Array: g_aKnife, Array: g_aFirstblood, Array: g_aRoundstart, Array: g_aDoublekill,

  23. Array: g_aHattrick, Array: g_aFlawless, Array: g_aRevenge, Array: g_aKillstreakSounds, Array: g_aKillstreakMessages, Array: g_aKillstreakRequiredKills;

  24.  

  25. // The arrays sizes

  26. new g_iHeadshotSize, g_iSuicideSize, g_iNadeSize, g_iTeamkillSize, g_iKnifeSize, g_iFirstbloodSize, g_iRoundstartSize, g_iDoublekillSize, g_iHattrickSize, g_iFlawlessSize,

  27. g_iRevengeSize, g_iKillstreakSoundsSize;

  28.  

  29. // The events strings

  30. new g_szHeadshot[ 256 ], g_szSuicide[ 256 ], g_szNade[ 256 ], g_szTeamkill[ 256 ], g_szKnife[ 256 ], g_szFirstblood[ 256 ], g_szRoundstart[ 256 ], g_szDoublekill[ 256 ],

  31. g_szHattrick[ 256 ], g_szFlawless[ 256 ], g_szRevenge[ 256 ], g_szRevenge2[ 256 ], g_szTEName[ 256 ], g_szCTName[ 256 ];

  32.  

  33. // Variables for check if there's the events messages enabled

  34. new g_iHeadshotMessage, g_iSuicideMessage, g_iNadeMessage, g_iTeamkillMessage, g_iKnifeMessage, g_iFirstbloodMessage, g_iRoundstartMessage, g_iDoublekillMessage,

  35. g_iHattrickMessage, g_iFlawlessMessage, g_iRevengeMessage, g_iRevenge2Message;

  36.  

  37. // The hudmessage handlers

  38. new g_hHudmessage, g_hHudmessage2, g_hHudmessage3;

  39.  

  40. // The `Firstblood` event variable

  41. new g_iFirstbloodVariable;

  42.  

  43. // Variables for cache the kills

  44. new g_iKills[ 33 ];

  45. new g_iKillsForHattrick[ 33 ];

  46.  

  47. // Variables for cache the `Doublekill` event weaponnames and the `Revenge` event playernames

  48. new g_szDoublekillVariable[ 33 ][ 24 ];

  49. new g_szRevengeKillVariable[ 33 ][ 32 ];

  50.  

  51. // Executed when map start

  52. public plugin_precache( )

  53. {

  54.         g_aHeadshot = ArrayCreate( 64 );

  55.         g_aSuicide = ArrayCreate( 64 );

  56.         g_aNade = ArrayCreate( 64 );

  57.         g_aTeamkill = ArrayCreate( 64 );

  58.         g_aKnife = ArrayCreate( 64 );

  59.         g_aFirstblood = ArrayCreate( 64 );

  60.         g_aRoundstart = ArrayCreate( 64 );

  61.         g_aDoublekill = ArrayCreate( 64 );

  62.         g_aHattrick = ArrayCreate( 64 );

  63.         g_aFlawless = ArrayCreate( 64 );

  64.         g_aRevenge = ArrayCreate( 64 );

  65.         g_aKillstreakSounds = ArrayCreate( 64 );

  66.         g_aKillstreakMessages = ArrayCreate( 192 );

  67.         g_aKillstreakRequiredKills = ArrayCreate( 3 );

  68.        

  69.         Func_LoadCustomizationsFromFile( );

  70.        

  71.         // Precache nothing

  72.         if( !g_iPluginEnabled )

  73.                 return;

  74.        

  75.         g_iHeadshotSize = ArraySize( g_aHeadshot );

  76.         g_iSuicideSize = ArraySize( g_aSuicide );

  77.         g_iNadeSize = ArraySize( g_aNade );

  78.         g_iTeamkillSize = ArraySize( g_aTeamkill );

  79.         g_iKnifeSize = ArraySize( g_aKnife );

  80.         g_iFirstbloodSize = ArraySize( g_aFirstblood );

  81.         g_iRoundstartSize = ArraySize( g_aRoundstart );

  82.         g_iDoublekillSize = ArraySize( g_aDoublekill );

  83.         g_iHattrickSize = ArraySize( g_aHattrick );

  84.         g_iFlawlessSize = ArraySize( g_aFlawless );

  85.         g_iRevengeSize = ArraySize( g_aRevenge );

  86.         g_iKillstreakSoundsSize = ArraySize( g_aKillstreakSounds );

  87.        

  88.         new i, szSound[ 64 ];

  89.        

  90.         if( g_iHeadshot )

  91.         {

  92.                 for( i = 0; i < g_iHeadshotSize; i++ )

  93.                 {

  94.                         ArrayGetString( g_aHeadshot, i, szSound, charsmax( szSound ) );

  95.                        

  96.                         precache_sound( szSound );

  97.                 }

  98.         }

  99.        

  100.         if( g_iSuicide )

  101.         {

  102.                 for( i = 0; i < g_iSuicideSize; i++ )

  103.                 {

  104.                         ArrayGetString( g_aSuicide, i, szSound, charsmax( szSound ) );

  105.                        

  106.                         precache_sound( szSound );

  107.                 }

  108.         }

  109.        

  110.         if( g_iNade )

  111.         {

  112.                 for( i = 0; i < g_iNadeSize; i++ )

  113.                 {

  114.                         ArrayGetString( g_aNade, i, szSound, charsmax( szSound ) );

  115.                        

  116.                         precache_sound( szSound );

  117.                 }

  118.         }

  119.        

  120.         if( g_iTeamkill )

  121.         {

  122.                 for( i = 0; i < g_iTeamkillSize; i++ )

  123.                 {

  124.                         ArrayGetString( g_aTeamkill, i, szSound, charsmax( szSound ) );

  125.                        

  126.                         precache_sound( szSound );

  127.                 }

  128.         }

  129.        

  130.         if( g_iKnife )

  131.         {

  132.                 for( i = 0; i < g_iKnifeSize; i++ )

  133.                 {

  134.                         ArrayGetString( g_aKnife, i, szSound, charsmax( szSound ) );

  135.                        

  136.                         precache_sound( szSound );

  137.                 }

  138.         }

  139.        

  140.         if( g_iFirstblood )

  141.         {

  142.                 for( i = 0; i < g_iFirstbloodSize; i++ )

  143.                 {

  144.                         ArrayGetString( g_aFirstblood, i, szSound, charsmax( szSound ) );

  145.                        

  146.                         precache_sound( szSound );

  147.                 }

  148.         }

  149.        

  150.         if( g_iRoundstart )

  151.         {

  152.                 for( i = 0; i < g_iRoundstartSize; i++ )

  153.                 {

  154.                         ArrayGetString( g_aRoundstart, i, szSound, charsmax( szSound ) );

  155.                        

  156.                         precache_sound( szSound );

  157.                 }

  158.         }

  159.        

  160.         if( g_iDoublekill )

  161.         {

  162.                 for( i = 0; i < g_iDoublekillSize; i++ )

  163.                 {

  164.                         ArrayGetString( g_aDoublekill, i, szSound, charsmax( szSound ) );

  165.                        

  166.                         precache_sound( szSound );

  167.                 }

  168.         }

  169.        

  170.         if( g_iHattrick )

  171.         {

  172.                 for( i = 0; i < g_iHattrickSize; i++ )

  173.                 {

  174.                         ArrayGetString( g_aHattrick, i, szSound, charsmax( szSound ) );

  175.                        

  176.                         precache_sound( szSound );

  177.                 }

  178.         }

  179.        

  180.         if( g_iFlawless )

  181.         {

  182.                 for( i = 0; i < g_iFlawlessSize; i++ )

  183.                 {

  184.                         ArrayGetString( g_aFlawless, i, szSound, charsmax( szSound ) );

  185.                        

  186.                         precache_sound( szSound );

  187.                 }

  188.         }

  189.        

  190.         if( g_iRevenge )

  191.         {

  192.                 for( i = 0; i < g_iRevengeSize; i++ )

  193.                 {

  194.                         ArrayGetString( g_aRevenge, i, szSound, charsmax( szSound ) );

  195.                        

  196.                         precache_sound( szSound );

  197.                 }

  198.         }

  199.        

  200.         if( g_iKillstreak )

  201.         {

  202.                 for( i = 0; i < g_iKillstreakSoundsSize; i++ )

  203.                 {

  204.                         ArrayGetString( g_aKillstreakSounds, i, szSound, charsmax( szSound ) );

  205.                        

  206.                         precache_sound( szSound );

  207.                 }

  208.         }

  209. }

  210.  

  211. // Executed after the `plugin_precache` forward

  212. public plugin_init( )

  213. {

  214.         register_plugin( "Quake Sounds", "4.0", "Hattrick" );

  215.        

  216.         register_cvar( "advanced_quake_sounds", "4.0", FCVAR_SERVER | FCVAR_EXTDLL | FCVAR_UNLOGGED | FCVAR_SPONLY );

  217.         set_cvar_float( "advanced_quake_sounds", 4.0 );

  218.        

  219.         // Stop here if the plugin isn't enabled

  220.         if( !g_iPluginEnabled )

  221.                 return;

  222.        

  223.         // This event for all games, I hooked it because I need to know if there's a headshot or not

  224.         // read_data( 1 ) == KillerIndex;

  225.         // read_data( 2 ) == VictimIndex;

  226.         // read_data( 3 ) == Headshot;          ( return 1 if there's a headshot, return 0 if there's not a headshot )

  227.         // read_data( 4 ) == WeaponName;        ( use as: read_data( 4, szWeaponName, charsmax( szWeaponName ) ) )

  228.         register_event( "DeathMsg", "PlayerKilled", "a" );

  229.        

  230.         new szModName[ 32 ];

  231.         get_modname( szModName, charsmax( szModName ) );

  232.        

  233.         if( equali( szModName, "cstrike" ) || equali( szModName, "czero" ) || equali( szModName, "csv15" ) || equali( szModName, "cs13" ) )

  234.         {

  235.                 // This logevents are only for Counter-Strike

  236.                 register_logevent( "RoundStart", 2, "1=Round_Start" );

  237.                 register_logevent( "RoundEnd", 2, "1=Round_End" );

  238.         }

  239.        

  240.         else if( equali( szModName, "dod" ) )

  241.         {

  242.                 // I think this is only for Day of Defeat (I can't make sure)

  243.                 register_event( "RoundState", "RoundStart", "a", "1=1" );

  244.                 register_event( "RoundState", "RoundEnd", "a", "1=3", "1=4" );

  245.                

  246.                 // Disable the `Flawless` event

  247.                 g_iFlawless = 0;

  248.         }

  249.        

  250.         else

  251.         {

  252.                 // If there's no roundstate events, disable the next features:

  253.                 g_iTeamkill = 0;

  254.                 g_iHattrick = 0;

  255.                 g_iFlawless = 0;

  256.                 g_iRoundstart = 0;

  257.                 g_iFirstblood = 0;

  258.         }

  259.        

  260.         // Hudmessage handlers

  261.         g_hHudmessage = CreateHudSyncObj( );

  262.         g_hHudmessage2 = CreateHudSyncObj( );

  263.         g_hHudmessage3 = CreateHudSyncObj( );

  264. }

  265.  

  266. // Executed after `plugin_init` forward

  267. public plugin_cfg( )

  268. {

  269.         g_iHeadshotMessage = g_szHeadshot[ 0 ] ? 1 : 0;

  270.         g_iSuicideMessage = g_szSuicide[ 0 ] ? 1 : 0;

  271.         g_iNadeMessage = g_szNade[ 0 ] ? 1 : 0;

  272.         g_iTeamkillMessage = g_szTeamkill[ 0 ] ? 1 : 0;

  273.         g_iKnifeMessage = g_szKnife[ 0 ] ? 1 : 0;

  274.         g_iFirstbloodMessage = g_szFirstblood[ 0 ] ? 1 : 0;

  275.         g_iRoundstartMessage = g_szRoundstart[ 0 ] ? 1 : 0;

  276.         g_iDoublekillMessage = g_szDoublekill[ 0 ] ? 1 : 0;

  277.         g_iHattrickMessage = g_szHattrick[ 0 ] ? 1 : 0;

  278.         g_iFlawlessMessage = g_szFlawless[ 0 ] ? 1 : 0;

  279.         g_iRevengeMessage = g_szRevenge[ 0 ] ? 1 : 0;

  280.         g_iRevenge2Message = g_szRevenge2[ 0 ] ? 1 : 0;

  281. }

  282.  

  283. // Executed when client disconnect

  284. public client_disconnect( iPlayer )

  285. {

  286.         g_iKills[ iPlayer ] = 0;

  287.         g_iKillsForHattrick[ iPlayer ] = 0;

  288.        

  289.         g_szRevengeKillVariable[ iPlayer ] = "";

  290.         g_szDoublekillVariable[ iPlayer ] = "";

  291. }

  292.  

  293. // Executed when a player is killed

  294. // This is not a forward. Is the `DeathMsg` event registered in `plugin_init`

  295. public PlayerKilled( )

  296. {

  297.         static iKiller, iVictim, iHeadshot, szWeapon[ 24 ], szName[ 32 ], szVictimName[ 32 ], i, szReq[ 100 ], szSound[ 64 ], szMessage[ 256 ];

  298.         iKiller = read_data( 1 );

  299.         iVictim = read_data( 2 );

  300.        

  301.         g_iKills[ iVictim ] = 0;

  302.        

  303.         if( !iKiller )

  304.                 return;

  305.        

  306.         iHeadshot = read_data( 3 );

  307.         read_data( 4, szWeapon, charsmax( szWeapon ) );

  308.         get_user_name( iKiller, szName, charsmax( szName ) );

  309.         get_user_name( iVictim, szVictimName, charsmax( szVictimName ) );

  310.        

  311.         if( g_iRandomRed )

  312.                 g_iRed = random_num( 0, 255 );

  313.        

  314.         if( g_iRandomGreen )

  315.                 g_iGreen = random_num( 0, 255 );

  316.        

  317.         if( g_iRandomBlue )

  318.                 g_iBlue = random_num( 0, 255 );

  319.        

  320.         set_hudmessage( g_iRed, g_iGreen, g_iBlue, -1.0, 0.24, 0, 6.0, 5.0 );

  321.        

  322.         g_iKills[ iKiller ]++;

  323.         g_iKillsForHattrick[ iKiller ]++;

  324.        

  325.         g_szRevengeKillVariable[ iVictim ] = szName;

  326.        

  327.         if( iVictim == iKiller )

  328.         {

  329.                 if( g_iSuicide )

  330.                 {

  331.                         if( g_iSuicideMessage )

  332.                                 ShowSyncHudMsg( 0, g_hHudmessage2, g_szSuicide, szName );

  333.                        

  334.                         client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aSuicide, random_num( 0, g_iSuicideSize - 1 ) ) );

  335.                 }

  336.                

  337.                 if( g_iHattrick )

  338.                         g_iKillsForHattrick[ iVictim ]--;

  339.         }

  340.        

  341.         else

  342.         {

  343.                 if( equal( szVictimName, g_szRevengeKillVariable[ iKiller ] ) && g_iRevenge )

  344.                 {

  345.                         g_szRevengeKillVariable[ iKiller ] = "";

  346.                        

  347.                         if( g_iRevengeMessage )

  348.                                 ShowSyncHudMsg( iKiller, g_hHudmessage2, g_szRevenge, szVictimName );

  349.                        

  350.                         if( g_iRevenge2Message && !g_iRevengeOnlyKiller )

  351.                                 ShowSyncHudMsg( iVictim, g_hHudmessage2, g_szRevenge2, szName );

  352.                        

  353.                         client_cmd( iKiller, "spk ^"%a^"", ArrayGetStringHandle( g_aRevenge, random_num( 0, g_iRevengeSize - 1 ) ) );

  354.                        

  355.                         if( !g_iRevengeOnlyKiller )

  356.                                 client_cmd( iVictim, "spk ^"%a^"", ArrayGetStringHandle( g_aRevenge, random_num( 0, g_iRevengeSize - 1 ) ) );

  357.                 }

  358.                

  359.                 if( iHeadshot && g_iHeadshot )

  360.                 {

  361.                         if( g_iHeadshotMessage )

  362.                                 ShowSyncHudMsg( 0, g_hHudmessage2, g_szHeadshot, szName, szVictimName );

  363.                        

  364.                         client_cmd( g_iHeadshotOnlyKiller ? iKiller : 0, "spk ^"%a^"", ArrayGetStringHandle( g_aHeadshot, random_num( 0, g_iHeadshotSize - 1 ) ) );

  365.                 }

  366.                

  367.                 g_iFirstbloodVariable++;

  368.                

  369.                 if( g_iFirstbloodVariable == 1 && g_iFirstblood )

  370.                 {

  371.                         if( g_iFirstbloodMessage )

  372.                                 ShowSyncHudMsg( 0, g_hHudmessage2, g_szFirstblood, szName );

  373.                        

  374.                         client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aFirstblood, random_num( 0, g_iFirstbloodSize - 1 ) ) );

  375.                 }

  376.                

  377.                 if( get_user_team( iVictim ) == get_user_team( iKiller ) && g_iTeamkill )

  378.                 {

  379.                         if( g_iTeamkillMessage )

  380.                                 ShowSyncHudMsg( 0, g_hHudmessage2, g_szTeamkill, szName );

  381.                        

  382.                         client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aTeamkill, random_num( 0, g_iTeamkillSize - 1 ) ) );

  383.                 }

  384.                

  385.                 if( szWeapon[ 1 ] == 'r' && g_iNade )

  386.                 {

  387.                         if( g_iNadeMessage )

  388.                                 ShowSyncHudMsg( 0, g_hHudmessage2, g_szNade, szName, szVictimName );

  389.                        

  390.                         client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aNade, random_num( 0, g_iNadeSize - 1 ) ) );

  391.                 }

  392.                

  393.                 if( szWeapon[ 0 ] == 'k' && g_iKnife )

  394.                 {

  395.                         if( g_iKnifeMessage )

  396.                                 ShowSyncHudMsg( 0, g_hHudmessage2, g_szKnife, szName, szVictimName );

  397.                        

  398.                         client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aKnife, random_num( 0, g_iKnifeSize - 1 ) ) );

  399.                 }

  400.                

  401.                 if( equal( g_szDoublekillVariable[ iKiller ], szWeapon ) && g_iDoublekill )

  402.                 {

  403.                         if( g_iDoublekillMessage )

  404.                                 ShowSyncHudMsg( 0, g_hHudmessage2, g_szDoublekill, szName, szVictimName );

  405.                        

  406.                         client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aDoublekill, random_num( 0, g_iDoublekillSize - 1 ) ) );

  407.                        

  408.                         g_szDoublekillVariable[ iKiller ] = "";

  409.                 }

  410.                

  411.                 else

  412.                 {

  413.                         g_szDoublekillVariable[ iKiller ] = szWeapon;

  414.                         set_task( 0.1, "Task_ClearKill", iKiller + 69113 );

  415.                 }

  416.                

  417.                 if( g_iKillstreak )

  418.                 {

  419.                         for( i = 0; i < g_iKillstreakSoundsSize; i++ )

  420.                         {

  421.                                 ArrayGetString( g_aKillstreakRequiredKills, i, szReq, charsmax( szReq ) );

  422.                                

  423.                                 if( g_iKills[ iKiller ] == str_to_num( szReq ) )

  424.                                 {

  425.                                         ArrayGetString( g_aKillstreakMessages, i, szMessage, charsmax( szMessage ) );

  426.                                         ArrayGetString( g_aKillstreakSounds, i, szSound, charsmax( szSound ) );

  427.                                        

  428.                                         Func_StreakDisplay( iKiller, szMessage, szSound );

  429.                                        

  430.                                         break;

  431.                                 }

  432.                         }

  433.                 }

  434.         }

  435. }

  436.  

  437. public RoundStart( )

  438. {

  439.         if( g_iFirstblood )

  440.                 g_iFirstbloodVariable = 0;

  441.        

  442.         if( g_iRoundstart )

  443.         {

  444.                 if( g_iRandomRed )

  445.                         g_iRed = random_num( 0, 255 );

  446.                

  447.                 if( g_iRandomGreen )

  448.                         g_iGreen = random_num( 0, 255 );

  449.                

  450.                 if( g_iRandomBlue )

  451.                         g_iBlue = random_num( 0, 255 );

  452.                

  453.                 set_hudmessage( g_iRed, g_iGreen, g_iBlue, -1.0, 0.27, 0, 6.0, 5.0 );

  454.                

  455.                 if( g_iRoundstartMessage )

  456.                         ShowSyncHudMsg( 0, g_hHudmessage, g_szRoundstart );

  457.                

  458.                 client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aRoundstart, random_num( 0, g_iRoundstartSize - 1 ) ) );

  459.         }

  460.        

  461.         if( g_iHattrick )

  462.         {

  463.                 static iPlayer;

  464.                

  465.                 for( iPlayer = 1; iPlayer < 33; iPlayer++ )

  466.                         g_iKillsForHattrick[ iPlayer ] = 0;

  467.         }

  468. }

  469.  

  470. public RoundEnd( )

  471. {

  472.         if( g_iHattrick )

  473.                 set_task( 2.8, "Task_Hattrick" );

  474.        

  475.         if( g_iFlawless )

  476.                 set_task( 1.2, "Task_Flawless" );

  477. }

  478.  

  479. public Task_Hattrick( )

  480. {

  481.         static iPlayer, szName[ 32 ];

  482.         iPlayer = Func_GetThisRoundLeader( );

  483.        

  484.         if( g_iRandomRed )

  485.                 g_iRed = random_num( 0, 255 );

  486.        

  487.         if( g_iRandomGreen )

  488.                 g_iGreen = random_num( 0, 255 );

  489.        

  490.         if( g_iRandomBlue )

  491.                 g_iBlue = random_num( 0, 255 );

  492.        

  493.         set_hudmessage( g_iRed, g_iGreen, g_iBlue, -1.0, 0.21, 0, 6.0, 5.0 );

  494.        

  495.         get_user_name( iPlayer, szName, charsmax( szName ) )

  496.        

  497.         if( g_iKillsForHattrick[ iPlayer ] >= g_iMinFragsForHattrick )

  498.         {

  499.                 if( g_iHattrickMessage )

  500.                         ShowSyncHudMsg( 0, g_hHudmessage3, g_szHattrick, szName );

  501.                

  502.                 client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aHattrick, random_num( 0, g_iHattrickSize - 1 ) ) );

  503.         }

  504. }

  505.  

  506. public Task_Flawless( )

  507. {

  508.         if( g_iRandomRed )

  509.                 g_iRed = random_num( 0, 255 );

  510.        

  511.         if( g_iRandomGreen )

  512.                 g_iGreen = random_num( 0, 255 );

  513.        

  514.         if( g_iRandomBlue )

  515.                 g_iBlue = random_num( 0, 255 );

  516.        

  517.         set_hudmessage( g_iRed, g_iGreen, g_iBlue, -1.0, 0.21, 0, 6.0, 5.0 );

  518.        

  519.         if( Func_GetCounterTerrorists( ) == Func_GetDeadCounterTerrorists( ) && Func_GetTerrorists( ) == Func_GetAliveTerrorists( ) )

  520.         {

  521.                 if( g_iFlawlessMessage )

  522.                         ShowSyncHudMsg( 0, g_hHudmessage3, g_szFlawless, "TERRORIST" );

  523.                

  524.                 client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aFlawless, random_num( 0, g_iFlawlessSize - 1 ) ) );

  525.         }

  526.        

  527.         else if( Func_GetTerrorists( ) == Func_GetDeadTerrorists( ) && Func_GetCounterTerrorists( ) == Func_GetAliveCounterTerrorists( ) )

  528.         {

  529.                 if( g_iFlawlessMessage )

  530.                         ShowSyncHudMsg( 0, g_hHudmessage3, g_szFlawless, "COUNTER-TERRORIST" );

  531.                

  532.                 client_cmd( 0, "spk ^"%a^"", ArrayGetStringHandle( g_aFlawless, random_num( 0, g_iFlawlessSize - 1 ) ) );

  533.         }

  534. }

  535.  

  536. public Task_ClearKill( iTask )

  537.         g_szDoublekillVariable[ iTask - 69113 ] = "";

  538.  

  539. Func_LoadCustomizationsFromFile( )

  540. {

  541.         new szConfigsDir[ 64 ], szFileName[ 128 ], szLineData[ 360 ], szKey[ 64 ], szValue[ 256 ], hFile, szNum[ 100 ], szType[ 32 ], \

  542.                 szMessage[ 256 ], szDummy[ 2 ], szReq[ 100 ], szSound[ 64 ];

  543.        

  544.         get_localinfo( "amxx_configsdir", szConfigsDir, charsmax( szConfigsDir ) );

  545.         format( szFileName, charsmax( szFileName ), "%s/quakesounds.ini", szConfigsDir );

  546.         hFile = fopen( szFileName, "rt" );

  547.        

  548.         while( hFile && !feof( hFile ) )

  549.         {

  550.                 fgets( hFile, szLineData, charsmax( szLineData ) );

  551.                 replace( szLineData, charsmax( szLineData), "^n", "" );

  552.                

  553.                 if( !szLineData[ 0 ] || szLineData[ 0 ] == ';' )

  554.                         continue;

  555.                

  556.                 strtok( szLineData, szKey, charsmax( szKey ), szValue, charsmax( szValue ), '=' );

  557.                

  558.                 trim( szKey );

  559.                 trim( szValue );

  560.                

  561.                 if( equal( szKey, "ENABLE/DISABLE PLUGIN" ) )

  562.                         g_iPluginEnabled = str_to_num( szValue );

  563.                

  564.                 else if( equal( szKey, "HEADSHOT ONLY KILLER" ) )

  565.                         g_iHeadshotOnlyKiller = str_to_num( szValue );

  566.                

  567.                 else if( equal( szKey, "MIN FRAGS FOR HATTRICK" ) )

  568.                         g_iMinFragsForHattrick = str_to_num( szValue );

  569.                

  570.                 else if( equal( szKey, "REVENGE ONLY FOR KILLER" ) )

  571.                         g_iRevengeOnlyKiller = str_to_num( szValue );

  572.                

  573.                 else if( equal( szKey, "HUDMSG RED" ) )

  574.                 {

  575.                         if( equal( szValue, "_" ) )

  576.                                 g_iRandomRed = 1;

  577.                        

  578.                         else

  579.                                 g_iRed = str_to_num( szValue );

  580.                 }

  581.                

  582.                 else if( equal( szKey, "HUDMSG GREEN" ) )

  583.                 {

  584.                         if( equal( szValue, "_" ) )

  585.                                 g_iRandomGreen = 1;

  586.                        

  587.                         else

  588.                                 g_iGreen = str_to_num( szValue );

  589.                 }

  590.                

  591.                 else if( equal( szKey, "HUDMSG BLUE" ) )

  592.                 {

  593.                         if( equal( szValue, "_" ) )

  594.                                 g_iRandomBlue = 1;

  595.                        

  596.                         else

  597.                                 g_iBlue = str_to_num( szValue );

  598.                 }

  599.                

  600.                 else if( equal( szKey, "SOUND" ) )

  601.                 {

  602.                         parse( szValue, szNum, charsmax( szNum ), szType, charsmax( szType ) );

  603.                        

  604.                         if( equal( szType, "REQUIREDKILLS" ) )

  605.                         {

  606.                                 parse( szValue, szNum, charsmax( szNum ), szType, charsmax( szType ), szReq, charsmax( szReq ), \

  607.                                         szDummy, charsmax( szDummy ), szSound, charsmax( szSound ) );

  608.                                

  609.                                 ArrayPushString( g_aKillstreakSounds, szSound );

  610.                                 ArrayPushString( g_aKillstreakRequiredKills, szReq );

  611.                         }

  612.                        

  613.                         else if( equal( szType, "MESSAGE" ) ) {

  614.                                 strtok( szValue, szType, charsmax( szType ), szMessage, charsmax( szMessage ), '@' );

  615.                                

  616.                                 trim( szType );

  617.                                 trim( szMessage );

  618.                                

  619.                                 ArrayPushString( g_aKillstreakMessages, szMessage );

  620.                         }

  621.                 }

  622.                

  623.                 else if( equal( szKey, "KILLSTREAK EVENT" ) )

  624.                         g_iKillstreak = str_to_num( szValue );

  625.                

  626.                 else if( equal( szKey, "REVENGE EVENT" ) )

  627.                         g_iRevenge = str_to_num( szValue );

  628.                

  629.                 else if( equal( szKey, "HEADSHOT EVENT" ) )

  630.                         g_iHeadshot = str_to_num( szValue );

  631.                

  632.                 else if( equal( szKey, "SUICIDE EVENT" ) )

  633.                         g_iSuicide = str_to_num( szValue );

  634.                

  635.                 else if( equal( szKey, "NADE EVENT" ) )

  636.                         g_iNade = str_to_num( szValue );

  637.                

  638.                 else if( equal( szKey, "TEAMKILL EVENT" ) )

  639.                         g_iTeamkill = str_to_num( szValue );

  640.                

  641.                 else if( equal( szKey, "KNIFE EVENT" ) )

  642.                         g_iKnife = str_to_num( szValue );

  643.                

  644.                 else if( equal( szKey, "FIRSTBLOOD EVENT" ) )

  645.                         g_iFirstblood = str_to_num( szValue );

  646.                

  647.                 else if( equal( szKey, "ROUNDSTART EVENT" ) )

  648.                         g_iRoundstart = str_to_num( szValue );

  649.                

  650.                 else if( equal( szKey, "DOUBLEKILL EVENT" ) )

  651.                         g_iDoublekill = str_to_num( szValue );

  652.                

  653.                 else if( equal( szKey, "HATTRICK EVENT" ) )

  654.                         g_iHattrick = str_to_num( szValue );

  655.                

  656.                 else if( equal( szKey, "FLAWLESS VICTORY" ) )

  657.                         g_iFlawless = str_to_num( szValue );

  658.                

  659.                 else if( equal( szKey, "HEADSHOT SOUNDS" ) )

  660.                 {

  661.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  662.                         {

  663.                                 trim( szKey );

  664.                                 trim( szValue );

  665.                                 ArrayPushString( g_aHeadshot, szKey );

  666.                         }

  667.                 }

  668.                

  669.                 else if( equal( szKey, "REVENGE SOUNDS" ) )

  670.                 {

  671.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  672.                         {

  673.                                 trim( szKey );

  674.                                 trim( szValue );

  675.                                 ArrayPushString( g_aRevenge, szKey );

  676.                         }

  677.                 }

  678.                

  679.                 else if( equal( szKey, "SUICIDE SOUNDS" ) )

  680.                 {

  681.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  682.                         {

  683.                                 trim( szKey );

  684.                                 trim( szValue );

  685.                                 ArrayPushString( g_aSuicide, szKey );

  686.                         }

  687.                 }

  688.                

  689.                 else if( equal( szKey, "NADE SOUNDS" ) )

  690.                 {

  691.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  692.                         {

  693.                                 trim( szKey );

  694.                                 trim( szValue );

  695.                                 ArrayPushString( g_aNade, szKey );

  696.                         }

  697.                 }

  698.                

  699.                 else if( equal( szKey, "TEAMKILL SOUNDS" ) )

  700.                 {

  701.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  702.                         {

  703.                                 trim( szKey );

  704.                                 trim( szValue );

  705.                                 ArrayPushString( g_aTeamkill, szKey );

  706.                         }

  707.                 }

  708.                

  709.                 else if( equal( szKey, "KNIFE SOUNDS" ) )

  710.                 {

  711.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  712.                         {

  713.                                 trim( szKey );

  714.                                 trim( szValue );

  715.                                 ArrayPushString( g_aKnife, szKey );

  716.                         }

  717.                 }

  718.                

  719.                 else if( equal( szKey, "FIRSTBLOOD SOUNDS" ) )

  720.                 {

  721.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  722.                         {

  723.                                 trim( szKey );

  724.                                 trim( szValue );

  725.                                 ArrayPushString( g_aFirstblood, szKey );

  726.                         }

  727.                 }

  728.                

  729.                 else if( equal( szKey, "ROUNDSTART SOUNDS" ) )

  730.                 {

  731.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  732.                         {

  733.                                 trim( szKey );

  734.                                 trim( szValue );

  735.                                 ArrayPushString( g_aRoundstart, szKey );

  736.                         }

  737.                 }

  738.                

  739.                 else if( equal( szKey, "DOUBLEKILL SOUNDS" ) )

  740.                 {

  741.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  742.                         {

  743.                                 trim( szKey );

  744.                                 trim( szValue );

  745.                                 ArrayPushString( g_aDoublekill, szKey );

  746.                         }

  747.                 }

  748.                

  749.                 else if( equal( szKey, "HATTRICK SOUNDS" ) )

  750.                 {

  751.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  752.                         {

  753.                                 trim( szKey );

  754.                                 trim( szValue );

  755.                                 ArrayPushString( g_aHattrick, szKey );

  756.                         }

  757.                 }

  758.                

  759.                 else if( equal( szKey, "FLAWLESS SOUNDS" ) )

  760.                 {

  761.                         while( szValue[ 0 ] != 0 && strtok( szValue, szKey, charsmax( szKey ), szValue, charsmax( szValue ), ',' ) )

  762.                         {

  763.                                 trim( szKey );

  764.                                 trim( szValue );

  765.                                 ArrayPushString( g_aFlawless, szKey );

  766.                         }

  767.                 }

  768.                

  769.                 else if( equal( szKey, "HEADSHOT HUDMSG" ) )

  770.                         g_szHeadshot = szValue;

  771.                

  772.                 else if( equal( szKey, "SUICIDE HUDMSG" ) )

  773.                         g_szSuicide = szValue;

  774.                

  775.                 else if( equal( szKey, "NADE HUDMSG" ) )

  776.                         g_szNade = szValue;

  777.                

  778.                 else if( equal( szKey, "TEAMKILL HUDMSG" ) )

  779.                         g_szTeamkill = szValue;

  780.                

  781.                 else if( equal( szKey, "KNIFE HUDMSG" ) )

  782.                         g_szKnife = szValue;

  783.                

  784.                 else if( equal( szKey, "FIRSTBLOOD HUDMSG" ) )

  785.                         g_szFirstblood = szValue;

  786.                

  787.                 else if( equal( szKey, "ROUNDSTART HUDMSG" ) )

  788.                         g_szRoundstart = szValue;

  789.                

  790.                 else if( equal( szKey, "DOUBLEKILL HUDMSG" ) )

  791.                         g_szDoublekill = szValue;

  792.                

  793.                 else if( equal( szKey, "HATTRICK HUDMSG" ) )

  794.                         g_szHattrick = szValue;

  795.                

  796.                 else if( equal( szKey, "FLAWLESS VICTORY HUDMSG" ) )

  797.                         g_szFlawless = szValue;

  798.                

  799.                 else if( equal( szKey, "REVENGE KILLER MESSAGE" ) )

  800.                         g_szRevenge = szValue;

  801.                

  802.                 else if( equal( szKey, "REVENGE VICTIM MESSAGE" ) )

  803.                         g_szRevenge2 = szValue;

  804.                

  805.                 else if( equal( szKey, "TERRO TEAM NAME" ) )

  806.                         g_szTEName = szValue;

  807.                

  808.                 else if( equal( szKey, "CT TEAM NAME" ) )

  809.                         g_szCTName = szValue;

  810.         }

  811.        

  812.         if( hFile )

  813.                 fclose( hFile );

  814. }

  815.  

  816. Func_StreakDisplay( iKiller, szMessage[ ], szSound[ ] )

  817. {

  818.         static szName[ 32 ];

  819.         get_user_name( iKiller, szName, charsmax( szName ) );

  820.        

  821.         if( g_iRandomRed )

  822.                 g_iRed = random_num( 0, 255 );

  823.        

  824.         if( g_iRandomGreen )

  825.                 g_iGreen = random_num( 0, 255 );

  826.        

  827.         if( g_iRandomBlue )

  828.                 g_iBlue = random_num( 0, 255 );

  829.        

  830.         set_hudmessage( g_iRed, g_iGreen, g_iBlue, -1.0, 0.27, 0, 6.0, 5.0 );

  831.         ShowSyncHudMsg( 0, g_hHudmessage, szMessage, szName );

  832.        

  833.         client_cmd( 0, "spk ^"%s^"", szSound )

  834. }

  835.  

  836. Func_GetCounterTerrorists( )

  837. {

  838.         static iPlayers[ 32 ], iNum;

  839.         get_players( iPlayers, iNum, "e", "CT" );

  840.        

  841.         return iNum;

  842. }

  843.  

  844. Func_GetDeadCounterTerrorists( )

  845. {

  846.         static iPlayers[ 32 ], iNum;

  847.         get_players( iPlayers, iNum, "be", "CT" );

  848.        

  849.         return iNum;

  850. }

  851.  

  852. Func_GetAliveCounterTerrorists( )

  853. {

  854.         static iPlayers[ 32 ], iNum;

  855.         get_players( iPlayers, iNum, "ae", "CT" );

  856.        

  857.         return iNum;

  858. }

  859.  

  860. Func_GetTerrorists( )

  861. {

  862.         static iPlayers[ 32 ], iNum;

  863.         get_players( iPlayers, iNum, "e", "TERRORIST" );

  864.        

  865.         return iNum;

  866. }

  867.  

  868. Func_GetDeadTerrorists( )

  869. {

  870.         static iPlayers[ 32 ], iNum;

  871.         get_players( iPlayers, iNum, "be", "TERRORIST" );

  872.        

  873.         return iNum;

  874. }

  875.  

  876. Func_GetAliveTerrorists( )

  877. {

  878.         static iPlayers[ 32 ], iNum;

  879.         get_players( iPlayers, iNum, "ae", "TERRORIST" );

  880.        

  881.         return iNum;

  882. }

  883.  

  884. Func_GetThisRoundLeader( )

  885. {

  886.         static iPlayers[ 32 ], iNum, i, iPlayer, iLeader, iFrags, iMax;

  887.         get_players( iPlayers, iNum );

  888.         iMax = 0;

  889.        

  890.         for( i = 0; i < iNum; i++ )

  891.         {

  892.                 iPlayer = iPlayers[ i ];

  893.                 iFrags = g_iKillsForHattrick[ iPlayer ];

  894.                

  895.                 if( iFrags > iMax )

  896.                 {

  897.                         iMax = iFrags;

  898.                         iLeader = iPlayer;

  899.                 }

  900.         }

  901.        

  902.         return iLeader;

  903. }

  904.  

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése: Rendezés 
Új téma nyitása Hozzászólás a témához  [6 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 10 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole