// ---------------- // ThePwned # Dodge ball script // ---------------- // // By // STK # Dr.Silver // Pandora The Explorer // Lego Bro // STK # Sebastian // AcidTongue // Stang73 // Noname // Crasher // Fredrica // Trexx // Waffles // 3z // ThePwned.com community // // ---------------- // Original idea // ---------------- // // Gain/Drain Script. (WidowMkR) (KaT.FisH) // // ---------------- // Current scripts // ---------------- // // STKI - STK # Information // TPH - TP # Hosties // TPS - TP Seizure // TPDB - TP # Dodgeball // // ---------------- // Upcomming scripts // ---------------- // // TPR - TP # Radio // TPP - TP # Spawn Protection // TPMD - TP Model Script // // //---------------- // Blocks //---------------- block tpdb_config { //********************************************************************** // SCRIPT CONFIGURATIONS //********************************************************************** // Game type - 1 = Team fight es_xset tpdb_gametype 1 // Round announce. es_xset tpdb_roundannouncement 1 // Ignite flashbangs es_xset tpdb_igniteflashbangs 1 // Player speed es_xset tpdb_playerspeed 1 // Explosion on player death es_xset tpdb_explosion 1 // Turn bouncing on/off es_xset tpdb_nobouncing 0 // Remove weapons at spawn es_xset tpdb_noweapons 1 // Sparks flashbangs es_xset tpdb_sparks 1 // Delay between throwing a nade and get a new one es_xset tpdb_throwingdelay 1 //********************************************************************** // DON'T PUBLISH ANY OTHER VERSIONS, WITHOUT THE AUTHORS PREMISSION! // Contact steam account: Sebastiankw // DON'T EDIT UNDER THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING! //********************************************************************** } // Executes when the script is loaded. block load { // Execute the config block. es_xdoblock tpdb/tpdb_config // Execute the popup block. es_xdoblock tpdb/tpdb_popup // Execute the settings block. es_xdoblock tpdb/tpdb_settings // Announce script loading. es_msg #multi #greenTPDB # #defaultDodgeball version#green server_var(tpdb_version) #defaultloaded! } // Executes when the script is unloaded. block unload { // Announce script unloading. es_msg #multi #greenTPDB # #defaultDodgeball version#green server_var(tpdb_version) #defaultunloaded! } block tpdb_settings { // Convert the game type. if (server_var(tpdb_gametype) == 1) then es_xset tpdb_gamename "Team fight" // Set current version es_xset tpdb_version 1.2d // Set noisy 1 eventscripts_noisy 1 // Declare 1vs1 variable es_xset tpdb_1vs1 0 // Declare alive_t variable es_xset tpdb_alive_t 0 // Declare alive_ct variable es_xset tpdb_alive_ct 0 } block tpdb_popup { // Load popup es_xload popup // Create a popup with the name tpdb_dbhelp popup create tpdb_dbhelp // Add text to the popup popup addline tpdb_dbhelp "ThePwned.com' Dodge Ball" popup addline tpdb_dbhelp "Help" popup addline tpdb_dbhelp " " popup addline tpdb_dbhelp " " popup addline tpdb_dbhelp "You have to hit the opposite" popup addline tpdb_dbhelp "team with flashbangs." popup addline tpdb_dbhelp "Each flashbang hits 100 damage." popup addline tpdb_dbhelp "You cannot pick any guns up," popup addline tpdb_dbhelp "you cannot get blinded and you" popup addline tpdb_dbhelp "have unlimited flashbangs." popup addline tpdb_dbhelp " " popup addline tpdb_dbhelp "0. Exit" } block tpdb_noweapons { // Remove every glock from the game es_fire event_var(userid) weapon_glock kill // Remove every usp from the game es_fire event_var(userid) weapon_usp kill // Remove every compact from the game es_fire event_var(userid) weapon_compact kill // Remove every deagle from the game es_fire event_var(userid) weapon_deagle kill // Remove every elite from the game es_fire event_var(userid) weapon_elite kill // Remove every fiveseven from the game es_fire event_var(userid) weapon_fiveseven kill // Remove every p228 from the game es_fire event_var(userid) weapon_p228 kill // Remove every m3 from the game es_fire event_var(userid) weapon_m3 kill // Remove every xm1014 from the game es_fire event_var(userid) weapon_xm1014 kill // Remove every tmp from the game es_fire event_var(userid) weapon_tmp kill // Remove every mac10 from the game es_fire event_var(userid) weapon_mac10 kill // Remove every mp5nany from the game es_fire event_var(userid) weapon_mp5navy kill // Remove every ump45 from the game es_fire event_var(userid) weapon_ump45 kill // Remove every p90 from the game es_fire event_var(userid) weapon_p90 kill // Remove every galil from the game es_fire event_var(userid) weapon_galil kill // Remove every famas from the game es_fire event_var(userid) weapon_famas kill // Remove every ak47 from the game es_fire event_var(userid) weapon_ak47 kill // Remove every scout from the game es_fire event_var(userid) weapon_scout kill // Remove every sg550 from the game es_fire event_var(userid) weapon_sg550 kill // Remove every g3sg1 from the game es_fire event_var(userid) weapon_g3sg1 kill // Remove every sg552 from the game es_fire event_var(userid) weapon_sg552 kill // Remove every awp from the game es_fire event_var(userid) weapon_awp kill // Remove every aug from the game es_fire event_var(userid) weapon_aug kill // Remove every m4a1 from the game es_fire event_var(userid) weapon_m4a1 kill // Remove every m4249 from the game es_fire event_var(userid) weapon_m249 kill // Remove every hegrenade from the game es_fire event_var(userid) weapon_hegrenade kill // Remove every smokegrenade from the game es_fire event_var(userid) weapon_smokegrenade kill } block tpdb_sparks { // Creates sparks at every flashbang es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed .1 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed .2 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed .3 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed .4 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed .5 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed .6 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed .7 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed .8 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed .9 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed 1 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed 1.1 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed 1.2 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed 1.3 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks // Creates sparks at every flashbang es_delayed 1.4 es_fire event_var(userid) flashbang_projectile DispatchEffect ManhackSparks } block tpdb_giveknife { // Define a variable to hold the players property es_xset tpdb_isdead 0 // Get the players living status es playerget isdead tpdb_isdead event_var(userid) if (server_var(tpdb_isdead) == 0) do { // Give the player a knife es_delayed server_var(tpdb_throwingdelay) es_give event_var(userid) weapon_knife } } //---------------- // Events //---------------- // Executes when a round starts event round_start { // Announce dodge ball if roundannoucement is 1. if (server_var(tpdb_roundannouncement) == 1) then es_msg #multi #greenTPDB # #defaultYou are playing ThePwned # Dodgeball. Type #lightgreen!dbhelp #defaultfor help. // Define that it's not the round start after 0.3 seconds. es_xset tpdb_roundend 0 // Define that it's the round start. es_xset tpdb_roundstart 1 // Define that it's not the round start after 0.3 seconds. es_xdelayed .3 es_xset tpdb_roundstart 0 // Create the hudhint message (middle buttom). es_format tpdb_hudmsg "\nThePwned # Dodge ball\n%1\nType !dbhelp for help\nwww.thepwned.com" server_var(tpdb_gamename) // Set the hudhint message (middle buttom). foreach player allplayers #all "es usermsg hudhint server_var(allplayers) server_var(tpdb_hudmsg)" // Set the 1vs1 variable to 0 es_xset tpdb_1vs1 0 } // Executes when a round ends event round_end { // Create the hudhint message (middle buttom). es_format tpdb_hudmsg "\nThePwned # Dodge ball\n%1\nType !dbhelp for help\nwww.thepwned.com" server_var(tpdb_gamename) // Set the hudhint message (middle buttom). foreach player allplayers #all "es usermsg hudhint server_var(allplayers) server_var(tpdb_hudmsg)" // Define that it's the round start. es_xset tpdb_roundend 1 // Remove the players weapons if he/she got any. foreach player aliveplayers #alive "es_give server_var(aliveplayers) player_weaponstrip" foreach player aliveplayers #alive "es_fire server_var(aliveplayers) player_weaponstrip strip" } // Executes when a player spawns event player_spawn { if (server_var(tpdb_noweapons) == 1) do { // Execute the settings block. es_xdoblock tpdb/tpdb_noweapons } // If player team is Terrorist or higher. if (event_var(es_userteam) >= 2) do { // If player team is Counter terrorist or lower. if (event_var(es_userteam) <= 3) do { // Disables buzone for spawning player es_fire event_var(userid) func_buyzone disable // Remove the players armor if he/she got any. es playerset armor event_var(userid) 0 // Remove the players cash if he/she got any. es playerset cash event_var(userid) 0 // Set the players speed. es playerset speed event_var(userid) server_var(tpdb_playerspeed) // Remove the players weapons if he/she got any. es_give event_var(userid) player_weaponstrip es_fire event_var(userid) player_weaponstrip strip // Give the players a flashbang. es_delayed .1 es_give event_var(userid) weapon_flashbang // Set his flashbangs to 925 es_delayed .1 es_setplayerprop event_var(userid) CBasePlayer.localdata.m_iAmmo.012 925 } } } event player_disconnect { es_xgetlivingplayercount tpdb_alive_ct 3 if (server_var(tpdb_alive_ct) == 1) do { es_xgetlivingplayercount tpdb_alive_t 2 if (server_var(tpdb_alive_t) == 1) do { if (server_var(tpdb_1vs1) == 0) do { es_xset tpdb_1vs1 1 es_xmsg #multi #greenTPDB # #defaultIt is one versus one, flashbangs are full of sparks. } } } } // Executes when a player is taking damage. event player_hurt { // If the weapon used to damage was flashbang if (event_var(weapon) == flashbang) do { // Remove the players weapons if he/she got any. es_give event_var(userid) player_weaponstrip es_fire event_var(userid) player_weaponstrip strip // Create a variable called healthleft to store the health of the attacked person. es_xset healthleft 0 // Get the current health of the attacked player and store it in the variable healthleft. es playerget health healthleft event_var(userid) // Damage the attacked user with his health, attack type 32 (default) and the damage is taken from the attacker. es damage event_var(userid) server_var(healthleft) 32 event_var(attacker) // Set the attackers cash to 0 so he/she don't got money from the kill. es_delayed .1 es playerset cash event_var(attacker) 0 if (server_var(tpdb_explosion) == 1) do { // Create an explosion on the player es_fire event_var(userid) !self DispatchEffect Explosion // Explosion sound es_emitsound player event_var(userid) ^weapons\hegrenade\explode4.wav 1.0 0.5 } } } event player_death { es_xgetlivingplayercount tpdb_alive_ct 3 if (server_var(tpdb_alive_ct) == 1) do { es_xgetlivingplayercount tpdb_alive_t 2 if (server_var(tpdb_alive_t) == 1) do { if (server_var(tpdb_1vs1) == 0) do { es_xset tpdb_1vs1 1 es_xmsg #multi #greenTPDB # #defaultIt is one versus one, flashbangs are full of sparks. } } } } // Executes when an item is picked up. event item_pickup { // If it isn't the roundstart if (server_var(roundstart) == 0) do { // If the item which is picked up is flashbabg if (event_var(item) != flashbang) do { // Remove the players weapons if he/she got any. es_give event_var(userid) player_weaponstrip es_fire event_var(userid) player_weaponstrip strip // Give the players a flashbang. es_delayed .1 es_give event_var(userid) weapon_flashbang // Set his flashbangs to 925 es_delayed .1 es_setplayerprop event_var(userid) CBasePlayer.localdata.m_iAmmo.012 925 } } // If tpdb_roundend not equals 1 if (server_var(tpdb_roundend) == 1) do { // Remove the players weapons if he/she got any. es_give event_var(userid) player_weaponstrip es_fire event_var(userid) player_weaponstrip strip } } // Executes when a grenade bounces event grenade_bounce { if (server_var(tpdb_nobouncing) == 1) do { // Remove the flashbang from the game es_fire event_var(userid) flashbang_projectile kill } } // Executes when a player has chosen team (after the've connected). event player_activate { // Disable radio for the player. es_cexec event_var(userid) ignorerad } // Executes when a change team event player_team { // If joined team is terrorist if (event_var(team) == 2) do { // Set the team joined to terrorists es_xset tc_msg_3 "Terrorists" // Declare the message variable es_xset tc_msg_1 0 // Get the team changings players name es_getplayername tc_msg_1 event_var(userid) // Set and format message es_xsetinfo tc_msg_2 "TPDB # Player: %s1 has joined %s2" // Create the message es_xusermsg create tc_msg SayText2 // Write the team index of the joining player es_usermsg write byte tc_msg event_var(es_userindex) // ? es_xusermsg write byte tc_msg True // Set the message as the formatted message es_usermsg write string tc_msg server_var(tc_msg_2) // Set the player name of the team changing player es_usermsg write string tc_msg server_var(tc_msg_1) // Set the team that the team changing player joined es_usermsg write string tc_msg server_var(tc_msg_3) // Send the message to all players foreach player allplayers #all "es_usermsg send tc_msg server_var(allplayers)" // Delete the message es_xusermsg delete tc_msg // Send a center message to the team change player es_centertell event_var(userid) You have joined Terrorists // Send a center message to the team change player es_delayed 1 es_centertell event_var(userid) You have joined Terrorists // Fade the team changing players screen to red es usermsg fade event_var(userid) 2 1000 500 255 0 0 255 } // If joined team is counter-terrorist if (event_var(team) == 3) do { // Set the team joined to counter-terrorists es_xset tc_msg_3 "Counter-Terrorists" // Declare the message variable es_xset tc_msg_1 0 // Get the team changings players name es_getplayername tc_msg_1 event_var(userid) // Set and format message es_xsetinfo tc_msg_2 "TPDB # Player: %s1 has joined %s2" // Create the message es_xusermsg create tc_msg SayText2 // Write the team index of the joining player es_usermsg write byte tc_msg event_var(es_userindex) // ? es_xusermsg write byte tc_msg True // Set the message as the formatted message es_usermsg write string tc_msg server_var(tc_msg_2) // Set the player name of the team changing player es_usermsg write string tc_msg server_var(tc_msg_1) // Set the team that the team changing player joined es_usermsg write string tc_msg server_var(tc_msg_3) // Send the message to all players foreach player allplayers #all "es_usermsg send tc_msg server_var(allplayers)" // Delete the message es_xusermsg delete tc_msg // Send a center message to the team change player es_centertell event_var(userid) You have joined Counter-Terrorists // Send a center message to the team change player es_delayed 1 es_centertell event_var(userid) You have joined Counter-Terrorists // Fade the team changing players screen to blue es usermsg fade event_var(userid) 2 750 500 0 0 255 255 } } // Executes when a weapon is fired event weapon_fire { if (server_var(tpdb_igniteflashbangs) == 1) do { // Ignite the grenades thrown by the player. es_delayed .1 es_fire event_var(userid) flashbang_projectile ignite es_delayed .2 es_fire event_var(userid) flashbang_projectile ignite } // Give the players a knife. es_xdoblock tpdb/tpdb_giveknife // Destroy flasbangs after 1.6 seconds. es_xdelayed 1.45 es_remove flashbang_projectile // If tpdb_1vs1 is set to 1 if (server_var(tpdb_1vs1) == 1) do { // If tpdb_sparks is set to 1 if (server_var(tpdb_sparks) == 1) do { // Do tpdb_sparks block es_xdoblock tpdb/tpdb_sparks } } } // Executes when a flashbang explode event flashbang_detonate { // Remove blindness from all players foreach player allplayers #all "es playerset flash server_var(allplayers) CCSPlayer.m_flFlashDuration 0 8" } // Executes when a player types. event player_say { // If the message is !toggleradio if (event_var(text) == "!toggleradio") do { // Toggle the players radio. es_cexec event_var(userid) ignorerad } // If the message is !dbhelp if (event_var(text) == "!dbhelp") do { es popup send tpdb_dbhelp event_var(userid) } }