Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

MYGO.pl

RSSy
  • Postów

    28100
  • Dołączył

  • Ostatnia wizyta

    nigdy
  • Wygrane w rankingu

    11

Treść opublikowana przez MYGO.pl

  1. Forum: Unapproved Plugins Posted By: 8livetipss Post Time: 04-18-2024 at 04:10Wyświetl pełny artykuł
  2. Trải Nghiệm Đa Dạng Cùng Cá Cược Trực Tuyến Bạn đã bao giờ tò mò về trải nghiệm cá cược trực tuyến tại Nhà cái cá cược bóng đá 8live chưa? Đây là nơi không chỉ mang đến các trận đấu bóng đá sôi động mà còn là điểm đến cho những trò chơi thú vị khác như xổ số, Live Casino, slot game và nhiều hơn nữa. Hãy cùng khám phá sự đa dạng và hấp dẫn tại 8Live ngay! Cá Cược Thể Thao Mùa giải bóng đá sắp đến với nhiều trận đấu hấp dẫn, và việc hợp tác với các nhà cung cấp cá cược thể thao như Saba Sports, Sbobet, United Gaming, CMD368,... mang lại cho bạn những lựa chọn tỷ lệ cược và kèo đa dạng, dễ dàng tham gia. Game Bài Trực Tuyến Trò chơi bài online đang ngày càng thu hút người chơi, đặc biệt là trong bối cảnh công nghệ phát triển mạnh mẽ. Với đa dạng về trò chơi và sự tiện lợi của việc chơi trực tuyến, bạn có thể tham gia mọi lúc, mọi nơi chỉ cần kết nối internet, từ Poker, Blackjack đến các trò chơi mới lạ, trí tuệ, mang đến không gian giải trí đa dạng và thú vị. Xổ Số Online Xổ số online đã trở thành hình thức giải trí phổ biến và tiện lợi, mang lại cơ hội chiến thắng lớn với những giải thưởng hấp dẫn. Với sự phát triển của công nghệ, việc tham gia xổ số online trở nên dễ dàng hơn bao giờ hết, giúp bạn trải nghiệm những cung bậc cảm xúc thú vị từ việc dự đoán kết quả xổ số. Live Casino Live Casino đang trở thành lựa chọn phổ biến của người chơi trực tuyến, mang lại trải nghiệm giống như ở sòng bạc truyền thống nhưng lại thoải mái hơn và tiện lợi hơn. Với sự kết hợp của công nghệ trực tiếp và trải nghiệm thực tế, bạn có thể tham gia các trò chơi như Blackjack, Roulette và Baccarat với độ chân thực cao ngay tại nhà. Slot Game và Game Bắn Cá Online Slot game và game bắn cá online mang đến không chỉ là cơ hội giải trí mà còn là cơ hội để trải nghiệm những phút giây đầy kịch tính và may mắn. Từ slot cổ điển đến các tựa game hiện đại, từ lối chơi đơn giản đến những trò chơi đa dạng, bạn sẽ tận hưởng không gian giải trí sôi động và hấp dẫn. Đá Gà Trực Tuyến Đá gà trực tuyến không chỉ mang lại cơ hội chiến thắng mà còn giúp bạn tận hưởng không khí sôi động và hấp dẫn của những trận đấu truyền thống, với sự kết hợp giữa công nghệ phát sóng trực tiếp và cách chơi truyền thống, bạn có thể tham gia đặt cược vào các trận đấu đá gà từ khắp nơi trên thế giới ngay tại nhà. Tòa nhà 542 Trần Hưng Đạo, Quận 5, TP.HCM, Việt Nam Email: [email protected] https://8live.tips/ #8live, #nhacai8live, #linkvao8live #dangky8live Wyświetl pełny artykuł
  3. Can anybody help me to find plugin that allow player to revive dead teammate when press and hold buton E? Przeczytaj cały wpis
  4. Hi i hope my post doesn't get deleted but if it does then at least i tried, so years ago many servers were experiencing a sudden crash in (Deathrun/Mg) maps this was not tied to the map but the entity that was being used in it. that entity being env_explosion and how it exactly used to happen? well when you hold the E button on your keyboard(to use the Parachute) while your in the air and go into a exploding object (explosive barrels in Deathrun maps for example) if you die through this way it can crash the server however its not that simple as the crash won't happen the first time you do this it usually has 15-25% chance to crash the server everytime you or any player in the server tries it(from my testing) the worst part of it is that it never explains in the server logs why this is happening its way too sneaky and that's why so many servers block the Explosive parts of the map using Blocker Passes, however this was 3.5 yrs ago i don't know if it happens today but if it does then this version should fix it for you. What changed in the code? well when the player dies now the game tries to set the parachute's color to (255, 255, 255, 0 = Invis) in the original version it used to RemoveEdict. Original Author: SWAT_88 Original Version: https://forums.alliedmods.net/showthread.php?p=580269 Attached Files Get Plugin or Get Source (sm_parachutefix.sp - 19.9 KB) Wyświetl pełny artykuł
  5. Descriptionkeep taking damage by hunter/jockey/charger/smoker attacker or be incapacitated, you can self escape from the skill and instantly kill the special infected. Cvars PHP Code: // keep take damage over than this value, self escape // - // Default: "60" // Minimum: "1.000000" self_escape_damage "60" // 1 = enable, 0 = disable. ignite si before kill? // - // Default: "1" self_escape_ignite "1" Forwards Spoiler PHP Code: /** * @brief Called when cleared special infected health to 1 before instantly kill it * * @param client client index * @param healthBefore how many health does the si have before clear * @param amout how many health cleared * @param owner survivor index who cause the health clear * * @noreturn */ forward void SelfEscape_OnClearedSpecialInfectedHealth(int client, int healthBefore, int amout, int owner); Change log Spoiler Code: 1.1 (2024-04-15: -for charger, only count pummel damage in. 1.0 (2024-04-15: -init public release. Attached Files self_escape.inc (810 Bytes) Get Plugin or Get Source (self_escape.sp - 9.7 KB) Wyświetl pełny artykuł
  6. Ultimate Break Message v1.1 Description:This plugin is inspired by Raheem. This plugin will print a message in the chat if the player breaks anything on the map. The print is done and appears only to the admin or even to all players depending on the options in the cvar. This may be useful in some cases for administrators to find out who is violating the rules. This program is also useful in zombie escape servers. The new thing here is that previous plugins did not show the player break messages that occur by throwing grenades. also ,The name of the thing that broke appears, and this is based on a data base that you will fill out during the game, and the player’s team appears Quote: [human] Player1 has broken a bridge [zombie] Fullserver has broken a wood bridge Cvars:ct_break_message_type 1 0 = Disabled | 1 = Admins only see | 2 =All player see ct_break_message_show_hint 0 0 = disable | 1 = show on all admins | 2 dont show hint beakable entity for all admin only by command say /brshow <on|off> Commands Usage: amx_cvar ct_break_message_show_hint 1 for show hint of all entity amx_cvar ct_break_message_show_hint 2 for show hint of all entity by say /brshow on command say /brshow on for show breakable entity info say /brshow off for disable show breakable entity info say /brmsg 28 a bridge for set name of entity say /brmsg 28 off for delete name of entity Installation & Instructions:Let's start learning how to install this plugin, So let's first start with what is the Requirements for this plugin? Simply install it like any plugin. Latest AMX Mod X 1.9+:for this plugins work you need AMX Mod X 1.9 or up , not using v1.8.2 Add Print Center Fix Module(optional):if center message not work u will do . First download Print Center Fix 2022-01-06, move the files into this folder, here addons\amxmodx\dlls and go here addons\metamod\plugins.ini , and add this line in windows server in the end of file : Code: win32 addons\amxmodx\dlls\printcenterfix_mm.dll or add this line in linux server in the end of file : Code: linux addons/amxmodx/dlls/printcenterfix_mm_i386.so plugin Installation:(Same as when you install plugin compile ".sma" and copy ".amxx" file form complied folder to plugins folder and go to plugins.ini and write it's name, also you need to define the module to run). Screenshots: Attached Files Get Plugin or Get Source (ultimate_break_message.sma - 6.1 KB) Get Plugin or Get Source (ultimate_break_message_hint.sma - 8.4 KB) addons.zip (230.6 KB) Przeczytaj cały wpis
  7. Hi! I'm politely requesting if anyone can modify this plugin https://forums.alliedmods.net/showthread.php?p=24875 so that you can bet frags instead of money using get_user_frags and set_user_frags. I want the menu to be like this: It's player1 vs player2! Place your bets! Who will win? 1. player1 (HP: 100, Armour: 0) 2. player2 (HP: 100, Armour: 0) Current bet: 10 frags 3. Bet 10 frags 4. Bet 20 frags 5. Bet 30 frags 6. Bet 40 frags 7. Bet 50 frags 0. I'm not a gambler If the player has less than 10 frags, don't show the menu and add a client_print_color that says "You don't have 10 frags to bet". And if, say, the player has only 30 frags, the 40 and 50 frag option should be transparent/grey (not avalaible). If the client betting bets 10 on player1 and player1 wins, client should be awarded 20 frags, but if player1 loses, client should lose said 10 frags. I'm even willing to pay via PayPal if the final result is good enough! PHP Code: #define PLUGINNAME "Last man bets" #define VERSION "0.9.4" #define AUTHOR "JGHG" /* Copyleft 2004-2005 AMX Mod X versions: http://www.amxmodx.org/forums/viewtopic.php?p=26590 Idea from miscstats' "Lastman" (by Olo?) LAST MAN BETS ============= When two people remain, one on each team, the other players will have the chance to bet a sum of money on who will win the round. You have to have a minimum of $100 (adjustable through a cvar) to place a bet, but then you can raise your bet as much as your wallet performs. If your bet wins, you win the other betters money. The more you bet, the more you win. If you win. :-) Everything is completely menu driven, no need to learn any commands or anything. Bots bet automatically. Pots: If no one bets on winning player, all failing bets will be added to the pot. The next player to win a bet (win the most money, if more win the same bet), gets the pot. If pot is not collected before map ends/server shuts down/crashes ;-) it will be there for next map. Example: If you bet $200 on the t player, and another person bets $100 on the t player, and the t player wins, you will receive 2/3rds of the total sum of money bet by all players. Winning over $16000: Win prizes (optional)! For the money you win over $16000, you receive something: For each You receive --------------------------- $1000 Xtra life (respawn as long as round did not end when you died, a note to all players go out that you respawned - and how many lives you have left) $100 Health boost (+100 health when spawning) $10 Assault suit (if you don't have 100 armour when spawning, you will be given a full assault suit) INSTALLATION ============ Before you install as usual, you might want to go through a couple of defines below. See "Adjust below settings to your liking". USAGE ===== No commands or anything. Betting is done through menus that pop up... There are three cvars: - lastmanbets_overridemenus Default value is 1. You can set this to 0 so that if a player already has a menu open (amxmodmenu, wc3 menu, etc) the bet menu should not open. Note, from version 0.9 this always overrides VGUI menus due to some bug with detection of those. - lastmanbets_defaultbet Default value is 100. This value is the amount of $ needed to be able to place the minimum bet. It also defines the base for increments when raising/lowering bets. - lastmanbets_bettime Default value is 20 (seconds). Defines how long time the bet menu will stay open - a timer counts down in center of screen. When it reaches 0 whoever still has the bet menu open will have it closed. VERSIONS ======== Released Version Comment 070820 0.9.4 Added menu option to bet all money in one go. 050218 0.9.3 Don't respawn as spectator if having extra lives. Thanks "peoplerpoop". 050130 0.9.2 Removed two tag mismatches... 040716 0.9.2 Made some easy-to-edit defines to change how much each prize will cost you. 040715 0.9.1 As betting progresses, a red/blue hud message displays how much money was bet on each player, and how many bets each player got so far. Hudchannels can be tweaked. 040616 0.9 Added menu timer + cvar. Fixed another bug that made the bet menu not show properly when lastmanbets_overridemenus was not set. Sometimes VGUI menu was detected as open on a player, however the player did not have any menu at all open. VGUI menus are now always overridden. 040613 0.81 Fixed override cvar - looks like it worked the opposite way. * Note that a typo in the cvar name itself was corrected: lastmanbets_overridemenus <--- 040612 0.8 Betting wouldn't work at all when prizes were disabled. :-) 040611 0.7 Moved around some code, it's possible now to compile it all without prizes by commenting a define. Can now also be compiled in debugmode. Debugmode should output (to server console) what players get the menu, and who doesn't and why they didn't. Possible bugfíx (didn't see the bug in action...): when someone respawns, it should now be impossible for the bettings to start because that player just died. Pot now saves to vault, so if it's not collected when map ends it will still be there for next map. 040607 0.6.1 Another try to fix the bug people are having with the menu never showing up (removed all uses of get_players) 040604 0.6 Bots supposedly didn't bet with lastmanbets_overridemenus set to 1. Fixed. Prizes added. Got some odd behaviour suddenly from a native (get_players) when bets were about to start, decided to scrap it and do things manually :-P. 040601 0.5 After round ended (bomb exploded, defused, hostages rescued etc), bets could still be started briefly if a 1vs1 situation appeared, ie if someone killed someone after round ended. Should be fixed. Other tweaks and bug fixes. Added two new options when betting for faster "wild" betting. Made cvar lastmanbets_defaultbet. 040531 0.4.2 Added lastmanbets_overridemenus cvar. 040530 0.4.1 If a user already has a menu open, no betting menu will open for that user. 040530 0.4 Bet menu should now close by itself when rounds end and you didn't place a bet fast enough. 040528 0.3 Added pot. Small bugfix, thx to Martel. 040518 0.2 At draw, it should pay any bet money back... (when do you get draws in CS btw?) A couple fixes here and there Bots do way cooler betting now. 040517 0.1 First version TO DO ===== - bet against the odds - redo the now IMO somewhat ugly menu - verbose output of bets, prizes, stats..? Keep history, like top-ten most rewarding wins? Ever, and for current map...? (And output who killed who etc :-) - max time, like 20 seconds, to bet, else menu closes - Johnny got his gun */ #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> // ---------- Adjust below settings to your liking --------------------------------------- //#define DEBUGMODE // remove this comment to compile in debugmode #define IWANTPRIZES // comment this if you don't want prizes #define XTRA_HEALTHBOOST 100 // how much extra health a health boost prize should give // When you win money over $16000, the plugin automatically "buys" you prizes for that money until that money is all used up. // You can change these values. Ie by default an extra life costs 1000, extra health 100 and armour 10. The plugin first tries to buy you as many extra lives // it can (ie until less than $1000 remains), then goes on to buy extra health, and then extra armour. With that said, make sure extra life is still the most expensive // and extra armour the cheapest prize, or you will run into trouble. #define PRIZEPRICE_EXTRALIFE 1000 #define PRIZEPRICE_EXTRAHEALTH 100 #define PRIZEPRICE_EXTRAARMOUR 10 #define HUDCHANNEL_T 2 // Hud channels. You probably don't need to change these, but you can if you find that some of hud-displaying plugins are interfered #define HUDCHANNEL_CT 3 // by the red/blue messages telling how much each player was bet on. #define HUDMESSAGE_HOLDTIME 25.0 // For how many seconds (after last placed bet) should the red/blue messages stay onscreen. Must be a float (end with a decimal) value. // __________________Bot settings here (you don't need to touch these)__________________ // A bot can be a "gambler", betting on the person with the lowest sum of HP and armour, else he's playing it "safe". To become a gambler // each bot needs to get a random value below a certain (individual) value. This value in turn is gotten by choosing a random value between BOTGAMBLERMIN and BOTGAMBLERMAX. // Ie the bot gamble value could end up as 0.3, and then it's a 30% chance that the bot will bet on the weaker remaining player. #define BOTGAMBLERMAX 0.4 #define BOTGAMBLERMIN 0.1 // A random float from 0.0 to 1.0 decides how much $ a bot will bet. A setting will be used if the random float ends at least this value. #define RATIO_HIGH 0.9 #define RATIO_MEDIUM 0.6 // Depending on ratio, this is how much of the bot's current money the bot will bet. MAXBET_LOW can at most let the bot set about one third of his total money sum. #define MAXBET_LOW 0.3 // about one third here #define MAXBET_MEDIUM 0.5 // half money maximum here #define MAXBET_HIGH 1.0 // bot could bet all of his money here // ---------- Adjust above settings to your liking --------------------------------------- #define MENUBUTTON1 (1<<0) #define MENUBUTTON2 (1<<1) #define MENUBUTTON3 (1<<2) #define MENUBUTTON4 (1<<3) #define MENUBUTTON5 (1<<4) #define MENUBUTTON6 (1<<5) #define MENUBUTTON7 (1<<6) #define MENUBUTTON8 (1<<7) #define MENUBUTTON9 (1<<8) #define MENUBUTTON0 (1<<9) #define MENUSELECT1 0 #define MENUSELECT2 1 #define MENUSELECT3 2 #define MENUSELECT4 3 #define MENUSELECT5 4 #define MENUSELECT6 5 #define MENUSELECT7 6 #define MENUSELECT8 7 #define MENUSELECT9 8 #define MENUSELECT0 9 #define TEAM_T 1 #define TEAM_CT 2 // Time in seconds (must be float) from 1vs1 situation appears until bettings start - if the player that died when it was 2vs1 has respawned, the betting will be called off. #define INITBETTINGSTIME 1.0 // Time in seconds (must be float) from a player dies until respawn, if having any extra lives. If round ended during this time, respawn will be called off. Must be lower than INITBETTINGSTIME. #define RESPAWNTIME 0.5 #define TASKID_RESPAWN 100 // just some value. don't change #define TASKID_BETTINGS 200 // don't change #define TASKID_BETTIMER 300 // don't change #define TASKID_BETTIMERDISPLAY 400 // don't change // Hud settings #define TRED 200 #define TGREEN 0 #define TBLUE 0 #define TX 0.25 #define CTRED 0 #define CTGREEN 0 #define CTBLUE 200 #define CTX 0.75 #define Y 0.35 #define EFFECTS 0 #define FXTIME 6.0 #define FADEINTIME 0.1 #define FADEOUTTIME 0.2 // Global vars below //new const CT[] = "CT" //new const T[] = "TERRORIST" new const OVERRIDEPREVIOUSMENU[] = "lastmanbets_overridemenus" new const CVAR_DEFAULTBET[] = "lastmanbets_defaultbet" new const CVAR_BETTIME[] = "lastmanbets_bettime" new const VAULTKEY_POT[] = "lastmanbets_pot" new g_names[3][33] new g_betperson[33] new g_betamount[33] new g_t new g_ct new bool:g_betting = false new g_pot = 0 new g_betmenu new bool:g_round enum BETSETTING {BET_LOW, BET_MEDIUM, BET_HIGH} #if defined IWANTPRIZES new g_extralives[33] = {0, ...} new g_extrahealth[33] = {0, ...} new g_extraarmour[33] = {0, ...} new bool:g_freezenewround[33] = {false, ...} // to prevent from giving prizes several times on newround (could happen ~2 times for some reason) #endif // Global vars above public death_event() { #if defined IWANTPRIZES new victim = read_data(2) // victim needed by IWANTPRIZES and DEBUGMODE, else not //client_print(0, print_chat, "death_event, victim: %d, g_round: %d, g_extralives[victim]: %d", victim, g_round, g_extralives[victim]) if (g_extralives[victim]) { new team = get_user_team(victim) if (team == TEAM_T || team == TEAM_CT) { new idd[1] idd[0] = victim set_task(RESPAWNTIME, "respawn", TASKID_RESPAWN + victim, idd, 1) // Return here. If victim died and can respawn, this means a 1vs1 has not happened yet. Victim will not respawn if round ended - and if round ended, bet shouldn't start anyway. //client_print(0, print_chat, "death_event, end 1") return PLUGIN_CONTINUE } } #endif // defined IWANTPRIZES if (!g_round) { //client_print(0, print_chat, "death_event, end 2") return PLUGIN_CONTINUE } new cts[32], ts[32], ctsnum = 0, tsnum = 0 new const MAXPLAYERS = get_maxplayers() for (new i = 1; i <= MAXPLAYERS; i++) { if (!is_user_connected(i) || !is_user_alive(i)) continue switch (cs_get_user_team(i)) { case TEAM_T: ts[tsnum++] = i case TEAM_CT: cts[ctsnum++] = i default: { // A user that is not alive but not on T _or_ CT, who is he anyway?? :-) return PLUGIN_CONTINUE } } if (tsnum > 1 || ctsnum > 1) { //client_print(0, print_chat, "Deathevent ends in loop, not 1vs1: cts: %d, ts: %d", ctsnum, tsnum) return PLUGIN_CONTINUE } } // (These two get_players had problems in earlier versions, they are now replaced by manual code finding players) //get_players(cts, ctsnum, "ae", CT) // match alive and team //get_players(ts, tsnum, "ae", T) // match alive and team if (ctsnum != 1 || tsnum != 1) { //client_print(0, print_chat, "death_event, end 3, cts: %d, ts: %d", ctsnum, tsnum) return PLUGIN_CONTINUE } get_user_name(ts[0], g_names[TEAM_T], 32) get_user_name(cts[0], g_names[TEAM_CT], 32) g_t = ts[0] g_ct = cts[0] #if defined DEBUGMODE new victimdebug = read_data(2) // victim needed by IWANTPRIZES and DEBUGMODE, else not new victimname[32] get_user_name(victimdebug, victimname, 31) log_amx("Betting will maybe start in %f seconds (if %s that just died does not respawn, or the round ends)", INITBETTINGSTIME, victimname) #endif set_task(INITBETTINGSTIME, "initbettings", TASKID_BETTINGS) return PLUGIN_CONTINUE } displaybetshud() { //client_print(0, print_chat, "%s bet $%d on %s.", name, g_betamount[id], g_names[g_betperson[id]]) new const MAXPLAYERS = get_maxplayers() // First calculate how much each player has been bet on. new betamounts[2] = {0, 0}, betcount[2] = {0, 0} // t, ct for (new i = 1; i <= MAXPLAYERS; i++) { if (!is_user_connected(i) // no one can win money from a player that has disconnected, even though he bet... || g_betperson[i] == 0) // this player didn't bet yet continue betamounts[g_betperson[i] - 1] += g_betamount[i] // -1 because person will be a team number, either 1 (t) or 2 (ct). betcount[g_betperson[i] - 1]++ } const MESSAGESIZE = 511 new tMessage[MESSAGESIZE + 1], ctMessage[MESSAGESIZE + 1] format(tMessage, MESSAGESIZE, "%s^n$%d from %d bets", g_names[TEAM_T], betamounts[0], betcount[0]) format(ctMessage, MESSAGESIZE, "%s^n$%d from %d bets", g_names[TEAM_CT], betamounts[1], betcount[1]) for (new i = 1; i <= MAXPLAYERS; i++) { if (!is_user_connected(i) || is_user_bot(i)) continue // display hud stuff to this person set_hudmessage(TRED, TGREEN, TBLUE, TX, Y, EFFECTS, FXTIME, HUDMESSAGE_HOLDTIME, FADEINTIME, FADEOUTTIME, HUDCHANNEL_T) show_hudmessage(i, tMessage) set_hudmessage(CTRED, CTGREEN, CTBLUE, CTX, Y, EFFECTS, FXTIME, HUDMESSAGE_HOLDTIME, FADEINTIME, FADEOUTTIME, HUDCHANNEL_CT) show_hudmessage(i, ctMessage) } } #if defined IWANTPRIZES // keeping all prizes-only functions within this big block, don't forget to move fns out of it when they are used by nonprize compiles public respawn(idd[1]) { new team = get_user_team(idd[0]) if (team != TEAM_T && team != TEAM_CT) return // Call any bets off. If we have a respawner, a 1vs1 situation is impossible. #if defined DEBUGMODE new name[32] get_user_name(idd[0], name, 31) log_amx("%s %s %s", name, g_round ? "respawns!" : "would've respawned if the round didn't just end... no respawn this time!", task_exists(TASKID_BETTINGS) ? "A betting was about to happen but will called off." : "A betting wasn't about to happen anyway, no action taken.") #endif if (task_exists(TASKID_BETTINGS)) // probably not entirely necessary remove_task(TASKID_BETTINGS) // this should be necessary, though if (!g_round) return g_extralives[idd[0]]-- spawn(idd[0]) new name2[32] get_user_name(idd[0], name2, 31) client_print(0, print_chat, "%s respawned, having %d li%s left!", name2, g_extralives[idd[0]], g_extralives[idd[0]] == 1 ? "fe" : "ves") } public client_connect(id) { resetprizes(id) return PLUGIN_CONTINUE } prize(id, moneyover16k) { new lives = 0, healths = 0, armours = 0, origmoney = moneyover16k while (moneyover16k >= PRIZEPRICE_EXTRALIFE) { g_extralives[id]++ moneyover16k -= PRIZEPRICE_EXTRALIFE lives++ } while (moneyover16k >= PRIZEPRICE_EXTRAHEALTH) { g_extrahealth[id]++ moneyover16k -= PRIZEPRICE_EXTRAHEALTH healths++ } while (moneyover16k >= PRIZEPRICE_EXTRAARMOUR) { g_extraarmour[id]++ moneyover16k -= PRIZEPRICE_EXTRAARMOUR armours++ } client_print(id, print_chat, "For winning $%d over $16000, you win these prizes: %d Xtra lives, %d health boosts, %d assault suits", origmoney, lives, healths, armours) } setprizes(id) { new bool:extrahealthused = false, bool:extraarmourused = false // Add extra health if (g_extrahealth[id] > 0) { g_extrahealth[id]-- new idd[1] idd[0] = id set_task(0.5, "delayedhealthboost", 0, idd, 1) extrahealthused = true } // Add extra armour new userarmour = get_user_armor(id) if (g_extraarmour[id] > 0 && userarmour < 100) { g_extraarmour[id]-- give_item(id, "item_assaultsuit") extraarmourused = true } if (g_extralives[id] + g_extrahealth[id] + g_extraarmour[id] != 0) client_print(id, print_chat, "Prizes remaining: %d Xtra lives, %d health boosts%s, %d assault suits%s", g_extralives[id], g_extrahealth[id], extrahealthused ? " (1 just used)" : "", g_extraarmour[id], extraarmourused ? " (1 just used)" : "") } public delayedhealthboost(idd[1]) { set_user_health(idd[0], get_user_health(idd[0]) + XTRA_HEALTHBOOST) } remove_respawntasks() { for (new i = 1; i < 33; i++) remove_task(TASKID_RESPAWN + i) } public unsetfreeze(idd[1]) { g_freezenewround[idd[0]] = false } public restartgame_event() { for (new i = 1; i < 33; i++) resetprizes(i) return PLUGIN_CONTINUE } resetprizes(id) { g_extralives[id] = 0 g_extrahealth[id] = 0 g_extraarmour[id] = 0 g_freezenewround[id] = false } #if defined DEBUGMODE public giveprize(id, level, cid) { if (!cmd_access(id, level, cid, 4)) { return PLUGIN_HANDLED } new giveto, theprize, prizes new buffer[10] read_argv(1, buffer, 9) giveto = str_to_num(buffer) read_argv(2, buffer, 9) theprize = str_to_num(buffer) read_argv(3, buffer, 9) prizes = str_to_num(buffer) switch (theprize) { case 1: { g_extralives[giveto] += prizes } case 2: { g_extrahealth[giveto] += prizes } case 3: { g_extraarmour[giveto] += prizes } default: { console_print(id, "Only 1-3 works...") return PLUGIN_HANDLED } } console_print(id, "Gave %d stuff of type %d to %d.", prizes, theprize, giveto) return PLUGIN_HANDLED } public giveprizeall(id, level, cid) { if (!cmd_access(id, level, cid, 3)) { return PLUGIN_HANDLED } new theprize, prizes new buffer[10] read_argv(1, buffer, 9) theprize = str_to_num(buffer) read_argv(2, buffer, 9) prizes = str_to_num(buffer) new const MAXCLIENTS = get_maxplayers() for (new i = 1; i <= MAXCLIENTS; i++) { if (!is_user_connected(i)) continue switch (theprize) { case 1: { g_extralives[i] = prizes } case 2: { g_extrahealth[i] = prizes } case 3: { g_extraarmour[i] = prizes } default: { console_print(id, "Only 1-3 works...") return PLUGIN_HANDLED } } } console_print(id, "Set %d stuff of type %d to all.", prizes, theprize) return PLUGIN_HANDLED } #endif // defined DEBUGMODE #endif // defined IWANTPRIZES public newround_event(id) { #if defined IWANTPRIZES if (g_freezenewround[id]) return PLUGIN_CONTINUE //log_amx("newround_event called for %d", id) g_freezenewround[id] = true new idd[1] idd[0] = id set_task(1.0, "unsetfreeze", 0, idd, 1) setprizes(id) #endif // defined IWANTPRIZES if (!g_round) g_round = true return PLUGIN_CONTINUE } hudtimerstarter() { new timeend[1] timeend[0] = get_systime() + get_cvar_num(CVAR_BETTIME) hudtimerdisplay(timeend) set_task(1.0, "hudtimerdisplay", TASKID_BETTIMERDISPLAY, timeend, 1, "b") } public hudtimerdisplay(timeend[1]) { new const MAXPLAYERS = get_maxplayers() new secondsleft = timeend[0] - get_systime() new msg[64] if (secondsleft > 0) { msg = "Bet menu closes in %d seconds" format(msg, 63, msg, secondsleft) } else msg = "You didn't bet fast enough..." new usermenu, userkeys, bool:nooneisinmenu = true for (new i = 1; i <= MAXPLAYERS; i++) { if (!is_user_connected(i) || is_user_alive(i) || is_user_bot(i)) continue else nooneisinmenu = false get_user_menu(i, usermenu, userkeys) // get user menu if (usermenu == g_betmenu) { // Display time left here client_print(i, print_center, msg) } } // End loops if no one is in menu... if (nooneisinmenu) { remove_task(TASKID_BETTIMER) remove_task(TASKID_BETTIMERDISPLAY) } } public initbettings() { if (!g_round) { // if round already ended, call bets off #if defined DEBUGMODE log_amx("Bettings was about to start, but the round ended, so no bettings will occur this time.") #endif return } // Start timer here set_task(get_cvar_float(CVAR_BETTIME), "closebetmenu", TASKID_BETTIMER) hudtimerstarter() new const DEFAULTBET = get_cvar_num(CVAR_DEFAULTBET) g_betting = true for (new i = 1; i < 33; i++) // Reset votes g_betperson[i] = 0 new bool:overridepreviousmenu, bool:bot, currentmenu, CsTeams:team, keys if (get_cvar_num(OVERRIDEPREVIOUSMENU)) overridepreviousmenu = true else overridepreviousmenu = false new const MAXPLAYERS = get_maxplayers() #if defined DEBUGMODE log_amx("Bettings will now start. This server supports %d players.", MAXPLAYERS) new name[32] #endif for (new i = 1; i <= MAXPLAYERS; i++) { if (!is_user_connected(i) || is_user_alive(i)) { // Online, dead players only #if defined DEBUGMODE if (!is_user_connected(i)) { //log_amx("Player #%d is not connected and will not be able to vote.", i) } else { get_user_name(i, name, 31) log_amx("Player #%d (%s) is alive and will not be able to vote.", i, name) } #endif continue } bot = bool:is_user_bot(i) if (!bot && !overridepreviousmenu) { // If already in a menu, don't bother. This isn't that important... get_user_menu(i, currentmenu, keys) // currentmenu should be 0 when user is in no menu, only then it's ok to show a bet menu :-] if (currentmenu > 0) { #if defined DEBUGMODE get_user_name(i, name, 31) log_amx("Player #%d (%s) is already in another menu (%d) - your %s cvar is defined to not show bet menu to ppl who already have a menu open. (Bet menu has id %d)", i, name, currentmenu, OVERRIDEPREVIOUSMENU, g_betmenu) #endif continue } } // Must be on T or CT team team = cs_get_user_team(i) if (team != CS_TEAM_T && team != CS_TEAM_CT) { #if defined DEBUGMODE get_user_name(i, name, 31) log_amx("Player #%d (%s) is not on team 1 (T) or 2 (CT). Actually the player is on team %d and thus can't bet.", i, name, int:team) #endif continue } // Must have at least DEFAULTBET dollars to participate... if (cs_get_user_money(i) < DEFAULTBET) { #if defined DEBUGMODE get_user_name(i, name, 31) log_amx("Player #%d (%s) does only have $%d, which is below the $%d needed to be able to vote.", i, name, cs_get_user_money(i), DEFAULTBET) #endif client_print(i, print_chat, "You don't have the minimum $%d needed to place a bet.", DEFAULTBET) continue } g_betamount[i] = DEFAULTBET if (bot) { // Bots "bet" //client_print(0, print_chat, "%d should vote and is a bot!", deadplayers[i]) new botid[1] botid[0] = i set_task(random_float(1.0, 5.0), "botbet", 0, botid, 1) #if defined DEBUGMODE get_user_name(i, name, 31) log_amx("Player #%d (%s) is a bot and will bet...", i, name) #endif } else { //client_print(deadplayers[i], print_chat, "starting bet for you") #if defined DEBUGMODE get_user_name(i, name, 31) log_amx("Player #%d (%s) is a normal player and IS shown the bet menu and thus gets the chance to bet this time...", i, name) #endif startbet(i) } } displaybetshud() } public botbet(botid[1]) { if (!g_betting || !is_user_connected(botid[0])) // bot may have been disconnected during the time... return PLUGIN_CONTINUE // Bot will bet. // Bot can bet any even $100 value... and should choose the player with most hp+armour, and possibly best frags/deaths ratio, and then it could turn all over to the other guy for // gambling purpose. // Gambling ratio could be set somewhere between 0.1 and 0.5... new const Float:GAMBLER_RATIO = random_float(BOTGAMBLERMIN, BOTGAMBLERMAX) new bool:gambler = false // this bot is not a gambler... yet if (random_float(0.0, 1.0) <= GAMBLER_RATIO) gambler = true // ok, this bot wants to be a gambler :-) new nongamblerschoice = getnongamblerschoice() new choice = gambler ? (nongamblerschoice == TEAM_T ? TEAM_CT : TEAM_T) : nongamblerschoice /*if (gambler) { if (nongamblerschoice == TEAM_T) choice = TEAM_CT else choice = TEAM_T }*/ new money = cs_get_user_money(botid[0]) money -= money % 100 // 553 - (553 % 100) would be 553 - (53) would be 500, ie even amount in hundreds... money = botbetmoney(money) if (money == 0) // Bot didn't bet this time... return PLUGIN_CONTINUE g_betamount[botid[0]] = money placebet(botid[0], choice) return PLUGIN_CONTINUE } // Decides how much money the will bot bet. botbetmoney(money) { // Low (0.0 > 0.6), medium (0.6 > 0.9), high (0.9 > 1.0) // Low == max 30% of money // Medium == max 50% of money // High == max 100% of money new const Float:RATIO = random_float(0.0, 1.0) new BETSETTING:betSetting = BET_LOW if (RATIO >= RATIO_HIGH) betSetting = BET_HIGH else if (RATIO >= RATIO_MEDIUM) betSetting = BET_MEDIUM new Float:pctOfMoneyToBet switch (betSetting) { case BET_LOW: pctOfMoneyToBet = random_float(0.0, MAXBET_LOW) // MAXBET_LOW 0.3 case BET_MEDIUM: pctOfMoneyToBet = random_float(0.0, MAXBET_MEDIUM) // MAXBET_MEDIUM 0.5 //case BET_HIGH: pctOfMoneyToBet = random_float(0.0, MAXBET_HIGH) // MAXBET_HIGH 1.0 default: pctOfMoneyToBet = random_float(0.0, MAXBET_HIGH) // MAXBET_HIGH 1.0 } money = floatround(money * pctOfMoneyToBet) money -= money % 100 // to have equal 100s... return money } getnongamblerschoice() { new choice new t_hp = get_user_health(g_t), ct_hp = get_user_health(g_ct), t_armour = get_user_armor(g_t), ct_armour = get_user_armor(g_ct) if (t_hp + t_armour > ct_hp + ct_armour) choice = TEAM_T else if (t_hp + t_armour < ct_hp + ct_armour) choice = TEAM_CT else // They're equal choice = random_num(TEAM_T, TEAM_CT) return choice } startbet(id) { if (!g_betting) { client_print(id, print_center, "Your bet is too late!") return } new menuBody[512], flags = MENUBUTTON1|MENUBUTTON2|MENUBUTTON0, money = cs_get_user_money(id) new t_hp = get_user_health(g_t), ct_hp = get_user_health(g_ct), t_armour = get_user_armor(g_t), ct_armour = get_user_armor(g_ct) new len = format(menuBody, 511, "It's \y%s\w vs. \y%s\w! Place your bets! Who will win?^n^n1. %s (HP: %d, Armour: %d)^n2. %s (HP: %d, Armour: %d)^n^nCurrent bet: $\y%d\w^n", g_names[TEAM_T], g_names[TEAM_CT], g_names[TEAM_T], t_hp, t_armour, g_names[TEAM_CT], ct_hp, ct_armour, g_betamount[id]) if (g_pot > 0) len += format(menuBody[len], 511 - len, "^nCurrent pot is $\y%d\w^n", g_pot) new const DEFAULTBET = get_cvar_num(CVAR_DEFAULTBET) // +1x if (money >= g_betamount[id] + DEFAULTBET) { flags |= MENUBUTTON3 len += format(menuBody[len], 511 - len, "\w") } else len += format(menuBody[len], 511 - len, "\d") len += format(menuBody[len], 511 - len, "3. Raise bet by $%d^n", DEFAULTBET) // +10x if (money >= g_betamount[id] + DEFAULTBET * 10) { flags |= MENUBUTTON4 len += format(menuBody[len], 511 - len, "\w") } else len += format(menuBody[len], 511 - len, "\d") len += format(menuBody[len], 511 - len, "4. Raise bet by $%d^n", DEFAULTBET * 10) // -1x if (g_betamount[id] - DEFAULTBET >= DEFAULTBET) { flags |= MENUBUTTON5 len += format(menuBody[len], 511 - len, "\w") } else len += format(menuBody[len], 511 - len, "\d") len += format(menuBody[len], 511 - len, "5. Lower bet by $%d^n", DEFAULTBET) // -10x if (g_betamount[id] - DEFAULTBET * 10 >= DEFAULTBET) { flags |= MENUBUTTON6 len += format(menuBody[len], 511 - len, "\w") } else len += format(menuBody[len], 511 - len, "\d") len += format(menuBody[len], 511 - len, "6. Lower bet by $%d^n\w", DEFAULTBET * 10) len += format(menuBody[len], 511 - len, "7. Bet all!") flags |= MENUBUTTON7 len += format(menuBody[len], 511 - len, "^n^n0. I'm not a gambler") show_menu(id, flags, menuBody) //client_print(id, print_chat, "Showing menu to you") } public menu_fn(id, key) { //client_print(id, print_chat, "You selected a menu option, key: %d", key) new bool:stayinmenu = true new const DEFAULTBET = get_cvar_num(CVAR_DEFAULTBET) switch (key) { case MENUSELECT1: { // bet on t placebet(id, TEAM_T) stayinmenu = false } case MENUSELECT2: { // bet on ct placebet(id, TEAM_CT) stayinmenu = false } case MENUSELECT3: { // raise bet alterbet(id, DEFAULTBET) } case MENUSELECT4: { // lower bet alterbet(id, DEFAULTBET * 10) } case MENUSELECT5: { // raise bet alterbet(id, -DEFAULTBET) } case MENUSELECT6: { // lower bet alterbet(id, -DEFAULTBET * 10) } case MENUSELECT7: { // bet all betall(id) } case MENUSELECT0: { // no bet if (g_betting) client_print(id, print_chat, "Sure, don't bet anything. See if I care!") stayinmenu = false } } if (stayinmenu) startbet(id) return PLUGIN_HANDLED } placebet(id, choice) { if (!is_user_connected(id)) return if (g_betting) { g_betperson[id] = choice altermoney(id, -g_betamount[id]) new name[33] get_user_name(id, name, 32) client_print(0, print_chat, "%s bet $%d on %s.", name, g_betamount[id], g_names[g_betperson[id]]) displaybetshud() } else client_print(id, print_center, "Your bet is too late!") } alterbet(id, money) { g_betamount[id] += money } betall(id) { g_betamount[id] = cs_get_user_money(id) } altermoney(id, money) { // calc 16000+ bonuses here? new newmoney = cs_get_user_money(id) + money #if defined IWANTPRIZES if (newmoney > 16000) prize(id, newmoney - 16000) #endif cs_set_user_money(id, newmoney, 1) } roundendtasks(const TEAM) { #if defined IWANTPRIZES remove_respawntasks() #endif g_round = false if (g_betting) { closebetmenu() remove_task(TASKID_BETTIMER) // stop the timer that will close the menu... remove_task(TASKID_BETTIMERDISPLAY) // stop the timer that displays the time left until menu closes... if (TEAM == TEAM_T || TEAM == TEAM_CT) calculatebets(TEAM) else // round ended in a draw... payback all bet money payback() } } public roundend_t_event() { roundendtasks(TEAM_T) } public roundend_ct_event() { roundendtasks(TEAM_CT) } public roundend_draw_event() { roundendtasks(0) } public closebetmenu() { new const MAXPLAYERS = get_maxplayers() new usermenu, userkeys for (new i = 1; i <= MAXPLAYERS; i++) { if (!is_user_connected(i) || is_user_alive(i) || is_user_bot(i)) continue get_user_menu(i, usermenu, userkeys) // get user menu if (usermenu == g_betmenu) // Hide it here! client_cmd(i, "slot10") // client_print(players[i], print_chat, "Hey, round's over and you didn't bet yet... close that menu!") } } payback() { // End betting here g_betting = false for (new i = 1; i < 33; i++) { if (i == g_t || i == g_ct || !is_user_connected(i) || g_betperson[i] == 0) // the remaining players didn't bet, and don't interact with disconnected players, and don't give anything to those who didn't bet continue altermoney(i, g_betamount[i]) client_print(i, print_chat, "Round ended in a draw. Here's your $%d back.", g_betamount[i]) } } calculatebets(result) { // End betting here g_betting = false // Find all who voted for right player, store how much they voted new totalrightbets = 0, overallbets = 0 for (new i = 1; i < 33; i++) { if (g_betperson[i] == result) totalrightbets += g_betamount[i] if (g_betperson[i] == TEAM_T || g_betperson[i] == TEAM_CT) overallbets += g_betamount[i] } // Did anyone make a bet at all? if (overallbets == 0) { client_print(0, print_chat, "No betting was done this round...") return } // Print total bets. client_print(0, print_chat, "Total bets: $%d ($%d on winning team)", overallbets, totalrightbets) // Now hand out money... new Float:wonmoney, name[33], Float:highestwonmoney = -1.0, nr_of_highestwinners = 0, highestwinners[32],CsTeams:team for (new i = 1; i < 33; i++) { if (i == g_t || i == g_ct || !is_user_connected(i)) // the remaining players didn't bet, and don't interact with disconnected players... continue team = cs_get_user_team(i) if (team != CS_TEAM_T && team != CS_TEAM_CT) // spectators don't get anything continue get_user_name(i, name, 32) if (totalrightbets > 0 && g_betperson[i] == result) { // Just to avoid divison by 0 (which shouldn't happen, but...) // This player should have money. How much? ((g_betamount[i] / totalrightbets) * overallbets) wonmoney = (float(g_betamount[i]) / float(totalrightbets)) * float(overallbets) client_print(i, print_chat, "You won the bet! You receive your bet, $%d, and an additional $%d!", g_betamount[i], floatround(wonmoney) - g_betamount[i]) server_print("%s won the bet and receives his original bet, $%d, and an additional $%d!", name, g_betamount[i], floatround(wonmoney) - g_betamount[i]) altermoney(i, floatround(wonmoney)) if (wonmoney - g_betamount[i] > highestwonmoney) { nr_of_highestwinners = 0 highestwinners[nr_of_highestwinners++] = i highestwonmoney = wonmoney - g_betamount[i] } else if (wonmoney - g_betamount[i] == highestwonmoney) { highestwinners[nr_of_highestwinners++] = i } } else if (g_betperson[i] == 0) { client_print(i, print_chat, "You didn't bet this time.") server_print("%s didn't place a bet this time...", name) } else { client_print(i, print_chat, "You lost your $%d bet!", g_betamount[i]) server_print("%s lost $%d on a betting...", name, g_betamount[i]) } } //statsworker(highestwinners, nr_of_highestwinners, highestwonmoney) if (nr_of_highestwinners == 0) { // Did anyone make the right bet? If not, move the bet money to the pot. client_print(0, print_chat, "No one won anything. $%d is added to the pot. Pot value: $%d", overallbets, g_pot += overallbets) set_vaultpot(g_pot) return } else if (nr_of_highestwinners == 1) { // Winner takes it all. get_user_name(highestwinners[0], name, 32) if (g_pot != 0) { client_print(0, print_chat, "%s won $%d with a $%d bet, thus also winning the pot, $%d!", name, floatround(highestwonmoney), g_betamount[highestwinners[0]], g_pot) give_pot(nr_of_highestwinners, highestwinners) } else { if (highestwonmoney >= 1.0) client_print(0, print_chat, "%s won $%d with a $%d bet, however the pot is empty.", name, floatround(highestwonmoney), g_betamount[highestwinners[0]]) } } else { // Winners share it all. new msg[128], len = 0 if (g_pot > 0) { len += format(msg[len], 127 - len, "Sharing the $%d pot: ", g_pot) give_pot(nr_of_highestwinners, highestwinners) } else len += format(msg[len], 127 - len, "Best winners: ") for (new i = 0; i < nr_of_highestwinners; i++) { get_user_name(highestwinners[i], name, 32) len += format(msg[len], 127 - len, "%s ", name) } } } /* statsworker(highestwinners[32], const NROFHIGHESTWINNERS, Float:highestwonmoney) { // Build result table of last bet } */ set_vaultpot(value) { new potstr[16] num_to_str(value, potstr, 15) set_vaultdata(VAULTKEY_POT, potstr) } give_pot(nr_of_winners, winners[32]) { new pot = g_pot g_pot = 0 set_vaultpot(0) // empty pot in vault if (nr_of_winners == 1) { altermoney(winners[0], pot) return } if (nr_of_winners == 0) { log_amx("%s: Error in script - division by zero error in give_pot! nr_of_winners: %d", nr_of_winners) return } new share = pot/nr_of_winners for (new i = 0; i < nr_of_winners; i++) altermoney(winners[i], share) } /* public killtest(id, level, cid) { if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED new const MAXPLAYERS = get_maxplayers() new bool:tSkonad = false, bool:ctSkonad = false, team for (new i = 1; i <= MAXPLAYERS; i++) { if (!is_user_connected(i) || !is_user_alive(i)) continue if (tSkonad && ctSkonad) { user_kill(i, 1) continue } team = cs_get_user_team(i) if (team == TEAM_T) { if (tSkonad || i == id) user_kill(i, 1) else tSkonad = true } else if (team == TEAM_CT) { if (ctSkonad || i == id) user_kill(i, 1) else ctSkonad = true } else { // Some odd team... just kill! user_kill(i, 1) } } return PLUGIN_HANDLED } */ public plugin_init() { register_plugin(PLUGINNAME, VERSION, AUTHOR) register_event("DeathMsg", "death_event", "a") register_event("SendAudio", "roundend_t_event", "a", "2&%!MRAD_terwin") register_event("SendAudio", "roundend_ct_event", "a", "2&%!MRAD_ctwin") register_event("SendAudio", "roundend_draw_event", "a", "2&%!MRAD_rounddraw") register_event("ResetHUD", "newround_event", "b") #if defined IWANTPRIZES register_event("TextMsg", "restartgame_event", "a", "2&#Game_C","2&#Game_w") register_event("TextMsg", "restartgame_event", "a", "2&#Game_will_restart_in") #if defined DEBUGMODE register_concmd("0gp", "giveprize", ADMIN_CFG, "<id> <1-3> <#> - give # 1-3 prizes to id") register_concmd("0gpa", "giveprizeall", ADMIN_CFG, "<1-3> <#> - give # 1-3 prizes to all") #endif #endif //register_clcmd("0killtest", "killtest", ADMIN_CFG, "- kills you and leaves two people alive on each team...") register_cvar(OVERRIDEPREVIOUSMENU, "1") register_cvar(CVAR_DEFAULTBET, "100") register_cvar(CVAR_BETTIME, "20") g_betmenu = register_menuid("It's") register_menucmd(g_betmenu, 1023, "menu_fn") if (vaultdata_exists(VAULTKEY_POT)) g_pot = get_vaultdata(VAULTKEY_POT) server_print("%s version %s initialized.", PLUGINNAME, VERSION) } Attachment 204079 Attached Files Get Plugin or Get Source (lastmanbets.sma - 38.0 KB) Przeczytaj cały wpis
  8. I'm using the predator lite mod https://forums.alliedmods.net/showthread.php?p=175993 but everytime someone turns into a predator the console spams "Cbuf AddText: Overflow" and it gets really laggy. Does anyone know how to solve this problem? Thanks! PHP Code: //---------------[INCLUDES]--------------- #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #include <engine> //---------------[PLASMA STUFF]--------------- new gExplosionModel new gTrailModel new msgtext //---------------[BLOOD STUFF]--------------- new blood_drop new blood_spray //---------------[BODYPARTS STUFF]--------------- new mdl_gib_flesh new mdl_gib_head new mdl_gib_legbone new mdl_gib_lung new mdl_gib_meat new mdl_gib_spine //---------------[MSG STUFF]--------------- new MsgSayText //---------------[PRECATCH SOUNDS]--------------- public plugin_precache() { precache_model("models/player/predator1/predator1.mdl") precache_model("models/claws.mdl") precache_model("models/rpgrocket.mdl") precache_model("models/v_knife.mdl") precache_sound("predator/crpredator.wav") precache_sound("predator/scpredator.wav") precache_sound("predator/depredator.wav") precache_sound("predator/plasma_shoot.wav") precache_sound("predator/explosion.wav") precache_sound("predator/bc_spithit2.wav") precache_sound("predator/suitchargeno1.wav") precache_sound("predator/smallmedkit2.wav") precache_sound("predator/button3.wav") precache_model("sprites/plasma.spr") gTrailModel = precache_model("sprites/laserbeam.spr") gExplosionModel = precache_model("sprites/plasma_explode.spr") blood_drop = precache_model("sprites/blood.spr") blood_spray = precache_model("sprites/bloodspray.spr") mdl_gib_flesh = precache_model("models/Fleshgibs.mdl") mdl_gib_head = precache_model("models/GIB_Skull.mdl") mdl_gib_legbone = precache_model("models/GIB_Legbone.mdl") mdl_gib_lung = precache_model("models/GIB_Lung.mdl") mdl_gib_meat = precache_model("models/GIB_B_Gib.mdl") mdl_gib_spine = precache_model("models/GIB_B_Bone.mdl") } //---------------[PLUGIN INIT]--------------- public plugin_init() { register_plugin("Predator_Mode_LITE","1.3","Haim") new keys = MENU_KEY_1|MENU_KEY_2 register_menucmd(register_menuid("Do you want to be a Predator?"),keys,"func_menu") register_event("ResetHUD","func_menuspawndelay","be") register_event("ResetHUD","startround","be") register_event("DeathMsg","unpredator","a") register_event("DeathMsg","death_blood","a") register_event("CurWeapon", "toggleclaws", "be", "1=1") register_event("Damage", "func_predatorpower", "b", "2!0") register_event("Damage","dmg_blood","b","2!0","3=0","4!0") register_cvar("admin_enable_predator","1") register_cvar("admin_frags_predator","20") register_cvar("admin_money_predator","16000") register_cvar("admin_plasma_predator","3") register_cvar("admin_frags_plasma","1") register_cvar("admin_frags_knife","2") register_cvar("admin_kill_money","300") register_cvar("admin_view_predator","0.4") register_cvar("admin_hp_predator","200") register_concmd("admin_predator","func_adminpredator",ADMIN_LEVEL_A,"[target] [plasma]") register_concmd("admin_addplasma","func_addplasma",ADMIN_LEVEL_A,"[target] [plasma]") register_concmd("admin_unpredator","func_adminunpredator",ADMIN_LEVEL_A,"[target]") register_concmd("admin_predator_custom","custom",ADMIN_LEVEL_A,"[target]") register_clcmd("dbinds","func_autobind") register_clcmd("ppfire","cmdShoot") register_clcmd("pcview","func_view") register_clcmd("say /predhelp","func_predhelp") register_clcmd("say /predcost","func_predcost") register_clcmd("say /predon","func_predon") register_touch("PlasmaBall","*","plasma_hit") msgtext = get_user_msgid("StatusText") MsgSayText = get_user_msgid("SayText") set_task(0.85,"lowhp_blood",0,"",0,"b") set_task(get_cvar_float("admin_view_predator"), "func_bodyheat", 0, "", 0, "b") } //---------------[THE PREDATOR GLOBAL VALUE]--------------- new ispredator[33] new delay[33] new plasma[33] new view[33] new onoroff[33] //---------------[SPAWN DELAY FOR MENU]--------------- public func_menuspawndelay(id) { if(ispredator[id]!=0) { set_task(1.0,"func_screen",id) } if(get_cvar_num("admin_enable_predator")!=1) { set_hudmessage(0,30,200,-1.0,0.4,0,3.0,10.0,0.15,0.5,1) show_hudmessage(id,"Predator Mode Is Off") return PLUGIN_HANDLED } new msg[51] format(msg,50,"^x01Say ^x04 /predhelp ^x01 for more info.") message_begin(MSG_ONE,MsgSayText,{0,0,0},id) write_byte(id) write_string(msg) message_end() if((ispredator[id]==0 || ispredator[id]==5) && delay[id]<1 && get_user_frags(id)>=get_cvar_num("admin_frags_predator") && cs_get_user_money(id)>=get_cvar_num("admin_money_predator") && cs_get_user_team(id)!=CS_TEAM_SPECTATOR) { set_task(1.5,"showMenu",id) server_cmd("sv_maxspeed 100000") server_cmd("sv_airaccelerate 500") } return PLUGIN_HANDLED } //---------------[PRADATOR GOT KILLED]--------------- public unpredator() { new id=read_data(2) if(ispredator[id]!=0) { ispredator[id]=5 plasma[id]=0 onoroff[id]=0 if(get_user_health(id)>100) { set_user_health(id,get_user_health(id)-(get_cvar_num("admin_hp_predetor")-100)) } cs_set_user_armor(id,0,CS_ARMOR_NONE) set_user_gravity(id,1.0) set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255) set_user_footsteps(id,0) set_user_maxspeed(id,350.0) client_cmd(id,"cl_forwardspeed 400") client_cmd(id,"cl_backspeed 400") client_cmd(id,"cl_sidespeed 400") client_cmd(id,"spk predator/depredator") message_begin(MSG_ONE, 98, {0,0,0}, id) write_short(1<<0) // fade lasts this long duration write_short(1<<0) // fade lasts this long hold time write_short(1<<2) // fade type HOLD write_byte(100) // fade red write_byte(0) // fade green write_byte(0) // fade blue write_byte(0) // fade alpha message_end() set_hudmessage(0,30,200,-1.0,0.75,0,3.0,10.0,0.15,0.5,1) show_hudmessage(id,"You are no longer a predator") if(view[id]!=0) { func_view(id) } new HUD[51] format(HUD,50,"") message_begin(MSG_ONE, msgtext, {0,0,0}, id) write_byte(0) write_string(HUD) message_end() } } //---------------[SHOW PREDATOR MENU]--------------- public showMenu(id) { new menu[192] new keys = MENU_KEY_1|MENU_KEY_2 format(menu,191,"\yDo you want to be a Predator?:^n^n\w1. Yes!^n2. No.") show_menu(id,keys,menu) return PLUGIN_HANDLED } //---------------[PREDATOR CHOOSE]--------------- public func_menu(id,key) { if(key==0) { set_user_frags(id,get_user_frags(id)-get_cvar_num("admin_frags_predator")) cs_set_user_money(id,cs_get_user_money(id)-get_cvar_num("admin_money_predator")) ispredator[id]=1 plasma[id]=get_cvar_num("admin_plasma_predator") set_user_health(id,get_cvar_num("admin_hp_predator")) cs_set_user_armor(id,500,CS_ARMOR_VESTHELM) set_user_gravity(id,0.5) set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,20) set_user_footsteps(id,1) cs_set_user_model(id,"predator1") client_cmd(id,"spk predator/crpredator") client_cmd(id,"dbinds") set_hudmessage(0,30,200,-1.0,0.75,0,3.0,10.0,0.15,0.5,1) show_hudmessage(id,"You are now a predator") cs_set_user_nvg(id,1) new HUD[51] format(HUD,50,"You got %i Plasma shots left.",plasma[id]) message_begin(MSG_ONE, msgtext, {0,0,0}, id) write_byte(0) write_string(HUD) message_end() } if(key==1) { delay[id]=3 set_hudmessage(0,30,200,-1.0,0.75,0,3.0,10.0,0.15,0.5,1) show_hudmessage(id,"You are NOT a predator. U will have to wait 3 rounds to be predator.") } } //---------------[ADMIN SET PREDATOR]--------------- public func_adminpredator(id,level,cid) { if (!cmd_access(id,level,cid,3)) { console_print(id, "sorry, ur admin level is too low to use that command") return PLUGIN_HANDLED } new arg[32] new pla[10] read_argv(1,arg,31) read_argv(2,pla,9) new plaf=str_to_num(pla) new player=cmd_target(id,arg,2) if(ispredator[player]==0) { ispredator[player]=1 plasma[player]=plaf set_user_health(player,get_cvar_num("admin_hp_predator")) cs_set_user_armor(player,500,CS_ARMOR_VESTHELM) set_user_gravity(player,0.5) set_user_rendering(player,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,20) set_user_footsteps(player,1) client_cmd(player,"spk predator/crpredator") client_cmd(player,"dbinds") cs_set_user_model(player,"predator1") set_hudmessage(0,30,200,-1.0,0.75,0,3.0,10.0,0.15,0.5,1) show_hudmessage(player,"You are now a predator") cs_set_user_nvg(player,1) console_print(id,"Success") new HUD[51] format(HUD,50,"You got %i Plasma shots left.",plasma[player]) message_begin(MSG_ONE, msgtext, {0,0,0}, player) write_byte(0) write_string(HUD) message_end() return PLUGIN_HANDLED } if(ispredator[player]!=0) { console_print(id,"That player is already a predator") return PLUGIN_HANDLED } return PLUGIN_HANDLED } //---------------[ADMIN REMOVE PREDATOR]--------------- public func_adminunpredator(id,level,cid) { if (!cmd_access(id,level,cid,2)) { console_print(id, "sorry, ur admin level is too low to use that command") return PLUGIN_HANDLED } new arg[32] read_argv(1,arg,31) new player=cmd_target(id,arg,2) if(ispredator[player]!=0) { ispredator[player]=0 plasma[player]=0 if(get_user_health(player)>100) { set_user_health(player,get_user_health(player)-100) } cs_set_user_armor(id,0,CS_ARMOR_NONE) set_user_gravity(player,1.0) set_user_rendering(player,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255) set_user_footsteps(player,0) set_user_maxspeed(player,250.0) client_cmd(player,"cl_forwardspeed 400") client_cmd(player,"cl_backspeed 400") client_cmd(player,"cl_sidespeed 400") client_cmd(player,"spk predator/depredator") cs_reset_user_model(player) set_hudmessage(0,30,200,-1.0,0.75,0,3.0,10.0,0.15,0.5,1) show_hudmessage(player,"You are no longer a predator") message_begin(MSG_ONE, 98, {0,0,0}, player) write_short(1<<0) // fade lasts this long duration write_short(1<<0) // fade lasts this long hold time write_short(1<<2) // fade type HOLD write_byte(100) // fade red write_byte(0) // fade green write_byte(0) // fade blue write_byte(0) // fade alpha message_end() console_print(id,"Success") if(view[player]!=0) { func_view(player) } onoroff[player]=0 cs_set_user_nvg(player,0) client_cmd(player,"spk predator/smallmedkit2") new HUD[51] format(HUD,50,"") message_begin(MSG_ONE, msgtext, {0,0,0}, player) write_byte(0) write_string(HUD) message_end() } else { console_print(id,"That player is not a predator") } return PLUGIN_HANDLED } //---------------[START ROUND]--------------- public startround(id) { if(ispredator[id]==0) { set_user_health(id,100) set_user_gravity(id,1.0) set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255) set_user_footsteps(id,0) onoroff[id]=0 } if(ispredator[id]==1) { plasma[id]=get_cvar_num("admin_plasma_predator") set_user_health(id,get_cvar_num("admin_hp_predator")) cs_set_user_armor(id,500,CS_ARMOR_VESTHELM) set_user_gravity(id,0.5) set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,20) set_user_footsteps(id,1) cs_set_user_model(id,"predator1") cs_set_user_nvg(id,1) new HUD[51] format(HUD,50,"You got %i Plasma shots left.",plasma[id]) message_begin(MSG_ONE, msgtext, {0,0,0}, id) write_byte(0) write_string(HUD) message_end() onoroff[id]=0 } if(ispredator[id]==5) { ispredator[id]=0 onoroff[id]=0 set_user_health(id,100) cs_set_user_armor(id,0,CS_ARMOR_VESTHELM) set_user_gravity(id,1.0) set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255) set_user_footsteps(id,0) cs_reset_user_model(id) func_view(id) } if(delay[id]>0) { delay[id]= delay[id]-1 } } //---------------[PREDATOR SPEED & KNIFE & PLASMACOUNT]--------------- public client_PreThink(id) { new clip,ammo if(ispredator[id]!=0) { entity_set_float(id,EV_FL_fuser2,0.0) set_user_maxspeed(id,475.0) client_cmd(id,"cl_forwardspeed 475;cl_backspeed 475;cl_sidespeed 475") if(get_user_weapon(id,clip,ammo)!=CSW_KNIFE && get_user_weapon(id,clip,ammo)!=CSW_C4) { client_cmd(id,"weapon_knife") } if(get_user_health(id)<101) { set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,225-(get_user_health(id)*2)) } } } //---------------[PREDATOR POWER]--------------- public func_predatorpower(id) { func_screen(id) new weapon, bodypart, attacker = get_user_attacker(id,weapon,bodypart) if(ispredator[attacker]!=0 && attacker!=id) { new iOrigin[3] new wpn[32] get_weaponname(attacker,wpn,31) new damage new victimhealth = get_user_health(id) damage = read_data(2) if(weapon==CSW_KNIFE) { damage = damage*2 } if (victimhealth - damage<1) { user_silentkill(id) if(ispredator[id]==0) { get_user_origin(id,iOrigin) // Effects fx_blood_red(iOrigin) fx_blood_red(iOrigin) fx_blood_red(iOrigin) fx_bleed_red(iOrigin) fx_bleed_red(iOrigin) fx_headshot_red(iOrigin) fx_blood_large_red(iOrigin,5) fx_blood_small_red(iOrigin,15) fx_trans(id,0) fx_gib_explode(iOrigin) // Hide body iOrigin[2] = iOrigin[2]-20 set_user_origin(id,iOrigin) } if(ispredator[id]!=0) { get_user_origin(id,iOrigin) // Effects fx_blood_green(iOrigin) fx_blood_green(iOrigin) fx_blood_green(iOrigin) fx_bleed_green(iOrigin) fx_bleed_green(iOrigin) fx_headshot_green(iOrigin) fx_blood_large_green(iOrigin,5) fx_blood_small_green(iOrigin,15) fx_trans(id,0) fx_gib_explode(iOrigin) // Hide body iOrigin[2] = iOrigin[2]-20 set_user_origin(id,iOrigin) } make_deathmsg(attacker,id,bodypart,wpn) set_user_frags(attacker,get_user_frags(attacker)+get_cvar_num("admin_frags_knife")) cs_set_user_money(attacker,cs_get_user_money(attacker)+get_cvar_num("admin_kill_money")) client_cmd(attacker,"spk predator/bc_spithit2") client_cmd(id,"spk predator/bc_spithit2") client_cmd(attacker,"spk predator/scpredator") client_cmd(id,"spk predator/scpredator") } else { set_user_health(id, victimhealth-damage) } } return PLUGIN_CONTINUE } //---------------[PREDATOR MODEL]--------------- public custom(id,level,cid) { new arg[32] new swi[2] read_argv(1,arg,31) read_argv(2,swi,1) new swit=str_to_num(swi) new player = cmd_target(id,arg,2) if(swit==1) { cs_set_user_model(player,"predator1") } if(swit==0) { cs_reset_user_model(player) } return PLUGIN_HANDLED } //---------------[PLASMA SHOOT]--------------- public cmdShoot(id) { if(plasma[id]>0 && ispredator[id]!=0 && ispredator[id]!=5) { plasma[id]=plasma[id]-1 new HUD[51] format(HUD,50,"You got %i Plasma shots left.",plasma[id]) message_begin(MSG_ONE, msgtext, {0,0,0}, id) write_byte(0) write_string(HUD) message_end() new origin[3], Float:fOrigin[3]//player origin... and float origin new Float:velocity[3] // speed of the entity to move get_user_origin(id,origin,1)//get user origin - int IVecFVec(origin, fOrigin)// convert the int into float new ePlasmaBall = create_entity("info_target") // create the plasma ball entity_set_string(ePlasmaBall, EV_SZ_classname, "PlasmaBall") //set name of the entity "PlasmaBall" new Float:posAdjust[3] //Used for adjusting the starting position velocity_by_aim(id, 70, posAdjust) //You can replace 50 with whatever , get origin of the AIM fOrigin[0] += posAdjust[0] fOrigin[1] += posAdjust[1] fOrigin[2] += posAdjust[2] entity_set_vector(ePlasmaBall, EV_VEC_origin,fOrigin)//set the shot's direction new Float:maxs[3] = {0.2,0.2,0.5} new Float:mins[3] = {-0.2,-0.2,-0.5} entity_set_size(ePlasmaBall,mins,maxs)//set size entity_set_int(ePlasmaBall,EV_INT_solid, SOLID_BBOX)//make solid entity_set_int(ePlasmaBall,EV_INT_movetype,MOVETYPE_FLYMISSILE)//set movetype entity_set_float(ePlasmaBall,EV_FL_framerate,1.0)//framerate entity_set_int(ePlasmaBall, EV_INT_rendermode, 5)//randermode entity_set_float(ePlasmaBall, EV_FL_renderamt, 255.0)//visable entity_set_float(ePlasmaBall, EV_FL_scale, 1.20)//dunno entity_set_model(ePlasmaBall, "sprites/plasma.spr")//model emit_sound(ePlasmaBall, CHAN_AUTO, "predator/plasma_shoot.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)//sound VelocityByAim(id,1150,velocity)//speed entity_set_vector(ePlasmaBall,EV_VEC_velocity,velocity)//set the shot's speed entity_set_edict(ePlasmaBall, EV_ENT_owner, id) // Create a trail... /* Broadcast to all players*/ message_begin(MSG_BROADCAST, SVC_TEMPENTITY) // TE_BEAMFOLLOW ( msg #22) create a line of decaying beam segments until entity stops moving write_byte(22) // msg id write_short(ePlasmaBall) // short (entity:attachment to follow) write_short(gTrailModel) // short (sprite index) write_byte(25) // byte (life in 0.1's) write_byte(7) // byte (line width in 0.1's) write_byte(42) // byte (color) write_byte(170) // byte (color) write_byte(255) // byte (color) write_byte(255) // byte (brightness) message_end() return PLUGIN_HANDLED } else { set_hudmessage(0,30,200,-1.0,0.75,0,3.0,10.0,0.15,0.5,1) show_hudmessage(id,"You are out of ammo") return PLUGIN_HANDLED } return PLUGIN_HANDLED } //---------------[PLASMA HIT]--------------- public plasma_hit(ePlasmaBall,other) { if(other == 0) { new Float:fOrigin[3] new iOrigin[3] // get origin.... entity_get_vector(ePlasmaBall, EV_VEC_origin, fOrigin) // changes a Float vector to an interger FVecIVec(fOrigin, iOrigin) // this sends out a server message ( from const.h ) message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(23) //TE_GLOWSPRITE write_coord(iOrigin[0]) write_coord(iOrigin[1]) write_coord(iOrigin[2]) write_short(gExplosionModel) // model write_byte(3) // life 0.x sec write_byte(12) // size write_byte(210) // brightness message_end() // our explosion sound... emit_sound(ePlasmaBall, CHAN_AUTO, "predator/explosion.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_entity(ePlasmaBall) // remove the entity } else if(is_user_connected(other)) { new attacker = entity_get_edict(ePlasmaBall,EV_ENT_owner) if(get_user_team(other)!=get_user_team(attacker)) { new bodypart,weapon[32] new iOriginp[3] user_silentkill(other) if(ispredator[other]==0) { get_user_origin(other,iOriginp) // Effects fx_blood_red(iOriginp) fx_blood_red(iOriginp) fx_blood_red(iOriginp) fx_bleed_red(iOriginp) fx_bleed_red(iOriginp) fx_headshot_red(iOriginp) fx_blood_large_red(iOriginp,10) fx_blood_small_red(iOriginp,20) fx_trans(other,0) fx_gib_explode(iOriginp) // Hide body iOriginp[2] = iOriginp[2]-20 set_user_origin(other,iOriginp) } if(ispredator[other]!=0) { get_user_origin(other,iOriginp) // Effects fx_blood_green(iOriginp) fx_blood_green(iOriginp) fx_blood_green(iOriginp) fx_bleed_green(iOriginp) fx_bleed_green(iOriginp) fx_headshot_green(iOriginp) fx_blood_large_green(iOriginp,10) fx_blood_small_green(iOriginp,20) fx_trans(other,0) fx_gib_explode(iOriginp) // Hide body iOriginp[2] = iOriginp[2]-20 set_user_origin(other,iOriginp) } make_deathmsg(attacker,other,bodypart,weapon) set_user_frags (attacker,get_user_frags(attacker)+get_cvar_num("admin_frags_plasma")) cs_set_user_money(attacker,cs_get_user_money(attacker)+get_cvar_num("admin_kill_money")) new Float:fOrigin[3] new iOrigin[3] // get origin.... entity_get_vector(ePlasmaBall, EV_VEC_origin, fOrigin) // changes a Float vector to an interger FVecIVec(fOrigin, iOrigin) // this sends out a server message ( from const.h ) message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(23) //TE_GLOWSPRITE write_coord(iOrigin[0]) write_coord(iOrigin[1]) write_coord(iOrigin[2]) write_short(gExplosionModel) // model write_byte(3) // life 0.x sec write_byte(12) // size write_byte(210) // brightness message_end() // our explosion sound... emit_sound(ePlasmaBall, CHAN_AUTO, "predator/explosion.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) client_cmd(other,"spk predator/bc_spithit2") client_cmd(attacker,"spk predator/bc_spithit2") remove_entity(ePlasmaBall) } else { new Float:fOrigin[3] new iOrigin[3] // get origin.... entity_get_vector(ePlasmaBall, EV_VEC_origin, fOrigin) // changes a Float vector to an interger FVecIVec(fOrigin, iOrigin) // this sends out a server message ( from const.h ) message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(23) //TE_GLOWSPRITE write_coord(iOrigin[0]) write_coord(iOrigin[1]) write_coord(iOrigin[2]) write_short(gExplosionModel) // model write_byte(3) // life 0.x sec write_byte(12) // size write_byte(210) // brightness message_end() // our explosion sound... emit_sound(ePlasmaBall, CHAN_AUTO, "predator/explosion.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_entity(ePlasmaBall) } } else { new Float:fOrigin[3] new iOrigin[3] // get origin.... entity_get_vector(ePlasmaBall, EV_VEC_origin, fOrigin) // changes a Float vector to an interger FVecIVec(fOrigin, iOrigin) // this sends out a server message ( from const.h ) message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(23) //TE_GLOWSPRITE write_coord(iOrigin[0]) write_coord(iOrigin[1]) write_coord(iOrigin[2]) write_short(gExplosionModel) // model write_byte(3) // life 0.x sec write_byte(12) // size write_byte(210) // brightness message_end() // our explosion sound... emit_sound(ePlasmaBall, CHAN_AUTO, "predator/explosion.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_entity(ePlasmaBall) // remove the entity } } public func_addplasma(id,level,cid) { if (!cmd_access(id,level,cid,3)) { console_print(id, "sorry, ur admin level is too low to use that command") return PLUGIN_HANDLED } new arg[32] new am[10] read_argv(1,arg,31) read_argv(2,am,9) new amf=str_to_num(am) new player = cmd_target(id,arg,2) if(ispredator[player]!=0 && ispredator[player]!=5) { plasma[player]=plasma[player]+amf new HUD[51] format(HUD,50,"You got %i Plasma shots left.",plasma[player]) message_begin(MSG_ONE, msgtext, {0,0,0}, player) write_byte(0) write_string(HUD) message_end() } return PLUGIN_HANDLED } //---------------[PUBLIC ON CONNECT FUNCTION]--------------- public client_disconnect(id) { ispredator[id]=0 plasma[id]=0 onoroff[id]=0 } //---------------[PREDATOR BLUE SCREEN EVERY NEW ROUND]--------------- public func_screen(id) { if(is_user_alive(id)) { if(view[id]==1 && ispredator[id]!=0) { onoroff[id]=1 client_cmd(id,"spk predator/suitchargeno1") message_begin(MSG_ONE, 98, {0,0,0}, id) write_short(1<<0) // fade lasts this long duration write_short(1<<0) // fade lasts this long hold time write_short(1<<2) // fade type HOLD write_byte(0) // fade red write_byte(0) // fade green write_byte(255) // fade blue write_byte(130) // fade alpha message_end() } if(view[id]==2 && ispredator[id]!=0) { onoroff[id]=2 client_cmd(id,"spk predator/suitchargeno1") message_begin(MSG_ONE, 98, {0,0,0}, id) write_short(1<<0) // fade lasts this long duration write_short(1<<0) // fade lasts this long hold time write_short(1<<2) // fade type HOLD write_byte(25) // fade red write_byte(25) // fade green write_byte(25) // fade blue write_byte(210) // fade alpha message_end() } } } //---------------[PREDATOR CLAWS]--------------- public toggleclaws(id) { new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) new model[32] entity_get_string(id,EV_SZ_viewmodel,model,31) if(ispredator[id]!=0 && !equali(model,"models/claws.mdl") && !equali(model,"models/v_c4.mdl")) { entity_set_string(id, EV_SZ_viewmodel,"models/claws.mdl") } if(ispredator[id]==0 && wpnid == CSW_KNIFE && !equali(model,"models/v_knife.mdl")) { entity_set_string(id, EV_SZ_viewmodel,"models/v_knife.mdl") } } //---------------[PREDATOR VIEW]--------------- public func_view(id) { if(ispredator[id]!=0 && ispredator[id]!=5) { if(view[id]==0) { view[id]=1 onoroff[id]=1 client_cmd(id,"spk predator/suitchargeno1") console_print(id,"view is normal with mask") message_begin(MSG_ONE, 98, {0,0,0},id) write_short(1<<0) // fade lasts this long duration write_short(1<<0) // fade lasts this long hold time write_short(1<<2) // fade type HOLD write_byte(0) // fade red write_byte(0) // fade green write_byte(255) // fade blue write_byte(120) // fade alpha message_end() return PLUGIN_HANDLED } if(view[id]==1) { view[id]=2 onoroff[id]=2 client_cmd(id,"spk predator/suitchargeno1") console_print(id,"predator view mode") message_begin(MSG_ONE, 98, {0,0,0},id) write_short(1<<0) // fade lasts this long duration write_short(1<<0) // fade lasts this long hold time write_short(1<<2) // fade type HOLD write_byte(25) // fade red write_byte(25) // fade green write_byte(25) // fade blue write_byte(210) // fade alpha message_end() return PLUGIN_HANDLED } if(view[id]==2) { view[id]=3 client_cmd(id,"spk predator/smallmedkit2") console_print(id,"view is 3d person mode") set_view(id,CAMERA_3RDPERSON) onoroff[id]=0 message_begin(MSG_ONE, 98, {0,0,0},id) write_short(1<<0) // fade lasts this long duration write_short(1<<0) // fade lasts this long hold time write_short(1<<2) // fade type HOLD write_byte(0) // fade red write_byte(0) // fade green write_byte(0) // fade blue write_byte(0) // fade alpha message_end() return PLUGIN_HANDLED } if(view[id]==3) { view[id]=0 client_cmd(id,"spk predator/button3") console_print(id,"view is normal") set_view(id,CAMERA_NONE) return PLUGIN_HANDLED } } if(ispredator[id]==0 && view[id]!=0) { set_view(id,CAMERA_NONE) view[id]=0 onoroff[id]=0 set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255) return PLUGIN_HANDLED } return PLUGIN_HANDLED } //======================================================================================= //=====================================[BLOOD STUFF]===================================== //======================================================================================= //---------------[MAKE MODEL INVISABLE IN EXPLOTION]--------------- static fx_trans(player,amount) { set_user_rendering(player,kRenderFxNone,0,0,0,kRenderTransAlpha,amount) return PLUGIN_CONTINUE } //---------------[BLOOD EVERY HIT (HUAMN)]--------------- public fx_blood_red(origin[3]) //hit blood human { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(115) //TE_BLOODSPRITE in const.h write_coord(origin[0]+random_num(-20,20)) write_coord(origin[1]+random_num(-20,20)) write_coord(origin[2]+random_num(-20,20)) write_short(blood_spray) write_short(blood_drop) write_byte(248) // color index write_byte(15) // size message_end() } //---------------[BLOOD EVERY HIT (PREDATOR)]--------------- public fx_blood_green(origin[3]) //hit blood predator { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(115) //TE_BLOODSPRITE in const.h write_coord(origin[0]+random_num(-20,20)) write_coord(origin[1]+random_num(-20,20)) write_coord(origin[2]+random_num(-20,20)) write_short(blood_spray) write_short(blood_drop) write_byte(192) // color index write_byte(15) // size message_end() } //---------------[DIEING BLEEDING HUMAN]--------------- public fx_bleed_red(origin[3]) //blood sprays on low hp { // Blood spray message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(101) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]+10) write_coord(random_num(-100,100)) // x write_coord(random_num(-100,100)) // y write_coord(random_num(-10,10)) // z write_byte(70) // color write_byte(random_num(50,100)) // speed message_end() } //---------------[DIEING BLEEDING PREDATOR]--------------- public fx_bleed_green(origin[3]) //blood sprays on low hp green { // Blood spray message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(101) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]+10) write_coord(random_num(-100,100)) // x write_coord(random_num(-100,100)) // y write_coord(random_num(-10,10)) // z write_byte(192) // color write_byte(random_num(50,100)) // speed message_end() } //---------------[HEADSHOT BLOOD HUMAN]--------------- public fx_headshot_red(origin[3]) { // Blood spray, 5 times for (new i = 0; i < 5; i++) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(101) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]+30) write_coord(random_num(-20,20)) // x write_coord(random_num(-20,20)) // y write_coord(random_num(50,300)) // z write_byte(70) // color write_byte(random_num(100,200)) // speed message_end() } } //---------------[HEADSHOT BLOOD PREDATOR]--------------- public fx_headshot_green(origin[3]) { // Blood spray, 8 times for (new i = 0; i < 8; i++) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(101) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]+30) write_coord(random_num(-20,20)) // x write_coord(random_num(-20,20)) // y write_coord(random_num(50,300)) // z write_byte(192) // color write_byte(random_num(100,200)) // speed message_end() } } //---------------[BLOOD DECALS SMALL RED]--------------- static fx_blood_small_red(origin[3],num) //red blood decals [small] { // Blood decals static const blood_small[7] = {190,191,192,193,194,195,197} // Small splash for (new j = 0; j < num; j++) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(116) //TE_WORLDDECAL from const.h write_coord(origin[0]+random_num(-100,100)) write_coord(origin[1]+random_num(-100,100)) write_coord(origin[2]-36) write_byte(blood_small[random_num(0,6)]) // index message_end() } } //---------------[BLOOD DECALS BIG RED]--------------- static fx_blood_large_red(origin[3],num) //red blood decals [ big] { // Blood decals static const blood_large[2] = {204,205} // Large splash for (new i = 0; i < num; i++) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(116) //TE_WORLDDECAL from const.h write_coord(origin[0]+random_num(-50,50)) write_coord(origin[1]+random_num(-50,50)) write_coord(origin[2]-36) write_byte(blood_large[random_num(0,1)]) // index message_end() } } //---------------[BLOOD DECALS SMALL GREEN]--------------- static fx_blood_small_green(origin[3],num) //green blood decals [small] { // Blood decals static const blood_small[6] = {3,4,5,6,7,8} // Small splash for (new j = 0; j < num; j++) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(116) //TE_WORLDDECAL from const.h write_coord(origin[0]+random_num(-65,65)) write_coord(origin[1]+random_num(-65,65)) write_coord(origin[2]-36) write_byte(blood_small[random_num(0,5)]) // index message_end() } } //---------------[BLOOD DECALS BIG GREEN]--------------- static fx_blood_large_green(origin[3],num) //green blood decals [ big] { // Blood decals static const blood_large[2] = {26,27} // Large splash for (new i = 0; i < num; i++) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(116) //TE_WORLDDECAL from const.h write_coord(origin[0]+random_num(-45,45)) write_coord(origin[1]+random_num(-45,45)) write_coord(origin[2]-36) write_byte(blood_large[random_num(0,1)]) // index message_end() } } //---------------[GRANADE EXPLOTION BODYPARTS MODELS]--------------- static fx_gib_explode(origin[3]) { new flesh[3] flesh[0] = mdl_gib_flesh flesh[1] = mdl_gib_meat flesh[2] = mdl_gib_legbone // Gib explosion // Head message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(106) //TR_MODEL write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]) write_coord(random_num(-100,100)) write_coord(random_num(-100,100)) write_coord(random_num(100,200)) write_angle(random_num(0,360)) write_short(mdl_gib_head) write_byte(0) // bounce write_byte(500) // life message_end() // Spine message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(106) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]) write_coord(random_num(-100,100)) write_coord(random_num(-100,100)) write_coord(random_num(100,200)) write_angle(random_num(0,360)) write_short(mdl_gib_spine) write_byte(0) // bounce write_byte(500) // life message_end() // Lung for(new i = 0; i < random_num(1,2); i++) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(106) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]) write_coord(random_num(-100,100)) write_coord(random_num(-100,100)) write_coord(random_num(100,200)) write_angle(random_num(0,360)) write_short(mdl_gib_lung) write_byte(0) // bounce write_byte(500) // life message_end() } // Parts, 5 times for(new i = 0; i < 5; i++) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(106) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]) write_coord(random_num(-100,100)) write_coord(random_num(-100,100)) write_coord(random_num(100,200)) write_angle(random_num(0,360)) write_short(flesh[random_num(0,2)]) write_byte(0) // bounce write_byte(500) // life message_end() } } //===========================================[FUNCTIONS]=========================================== //---------------[PLAYER HIT BLOOD]--------------- public dmg_blood() { new id=read_data(0) if(is_user_alive(id)) { new origin[3] get_user_origin(id,origin) if(ispredator[id]==0) { fx_blood_red(origin) fx_blood_small_red(origin,3) } if(ispredator[id]!=0) { fx_blood_green(origin) fx_blood_small_green(origin,3) } } } //---------------[PLAYER BLEED ON LOW HP]--------------- public lowhp_blood() { new iPlayer, iPlayers[32], iNumPlayers, iOrigin[3] get_players(iPlayers,iNumPlayers,"a") for (new i = 0; i < iNumPlayers; i++) { iPlayer = iPlayers[i] if(get_user_health(iPlayer)< 20) { if (ispredator[iPlayer]==0) { get_user_origin(iPlayer,iOrigin) fx_bleed_red(iOrigin) fx_blood_small_red(iOrigin,5) } if (ispredator[iPlayer]!=0) { get_user_origin(iPlayer,iOrigin) fx_bleed_green(iOrigin) fx_blood_small_green(iOrigin,5) } } } } //---------------[DEATH BLOOD EFFECTS (HEADSHOT/GRANADE EXPLOTION)]--------------- public death_blood() { new iOrigin[3] new sWeapon[32] new id = read_data(2) new iHeadshot = read_data(3) read_data(4,sWeapon,31) if (iHeadshot) { if(ispredator[id]==0) { get_user_origin(id,iOrigin) fx_headshot_red(iOrigin) fx_blood_large_red(iOrigin,2) fx_blood_small_red(iOrigin,5) } if(ispredator[id]!=0) { get_user_origin(id,iOrigin) fx_headshot_green(iOrigin) fx_blood_large_green(iOrigin,2) fx_blood_small_green(iOrigin,5) } } else if (equal(sWeapon,"grenade")) { if(ispredator[id]==0) { get_user_origin(id,iOrigin) // Effects fx_blood_red(iOrigin) fx_blood_red(iOrigin) fx_blood_red(iOrigin) fx_bleed_red(iOrigin) fx_bleed_red(iOrigin) fx_headshot_red(iOrigin) fx_trans(id,0) fx_gib_explode(iOrigin) fx_blood_large_red(iOrigin,10) fx_blood_small_red(iOrigin,25) // Hide body iOrigin[2] = iOrigin[2]-20 set_user_origin(id,iOrigin) } if(ispredator[id]!=0) { get_user_origin(id,iOrigin) // Effects fx_blood_green(iOrigin) fx_blood_green(iOrigin) fx_blood_green(iOrigin) fx_bleed_green(iOrigin) fx_bleed_green(iOrigin) fx_headshot_green(iOrigin) fx_trans(id,0) fx_gib_explode(iOrigin) fx_blood_large_green(iOrigin,10) fx_blood_small_green(iOrigin,25) // Hide body iOrigin[2] = iOrigin[2]-20 set_user_origin(id,iOrigin) } } if(ispredator[id]==0) { fx_blood_small_red(iOrigin,12) fx_blood_large_red(iOrigin,5) } if(ispredator[id]!=0) { fx_blood_small_green(iOrigin,12) fx_blood_large_green(iOrigin,5) } } //---------------[AUTO BIND SYSTEM]--------------- public func_autobind(id) { client_cmd(id,"bind p pcview") client_cmd(id,"bind mouse3 ppfire") console_print(id,"Key Defaults are bound. ENJOY!") return PLUGIN_HANDLED } //---------------[BODY HEAT SYSTEM CONNECT]--------------- public client_connect(id) { onoroff[id] = 0 ispredator[id]=0 plasma[id]=0 } //---------------[BODY HEAT AND LIGHTSIGHT SYSTEM]--------------- public func_bodyheat() { new players[32] new pnum,origin[3] new idheat,id get_players(players,pnum,"a") for (new i = 0; i < pnum; i++) { id = players[i] if(ispredator[id]!=0 && ispredator[id]!=5) { if (onoroff[id]==1 && is_user_alive(id)) { for (new j = 0; j < pnum; j++) { idheat = players[j] if (idheat != id && ispredator[idheat]==0 && is_user_alive(idheat)) { get_user_origin(idheat,origin,0) message_begin(MSG_ONE,SVC_TEMPENTITY,origin,id) write_byte(21) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]+30) write_short(gTrailModel) write_byte(0) write_byte(1) write_byte(6) write_byte(60) write_byte(1) write_byte(250) // red write_byte(60) // green write_byte(0) // blue write_byte(255) //brightness write_byte(0) message_end() } } } if (onoroff[id]==2 && is_user_alive(id)) { for (new j = 0; j < pnum; j++) { idheat = players[j] if (idheat != id && ispredator[idheat]!=0 && is_user_alive(idheat)) { get_user_origin(idheat,origin,0) message_begin(MSG_ONE,SVC_TEMPENTITY,origin,id) write_byte(21) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]+30) write_short(gTrailModel) write_byte(0) write_byte(1) write_byte(6) write_byte(60) write_byte(1) write_byte(255) // red write_byte(255) // green write_byte(255) // blue write_byte(255) //brightness write_byte(0) message_end() } } } } } } //======================================================================================= //======================================[Info Area]====================================== //======================================================================================= //---------------[Predator Help]--------------- public func_predhelp(id) { show_motd(id,"/addons/amxmodx/plugins/predhelp.txt","Predator Help") } //---------------[Predator Cost Check]--------------- public func_predcost(id) { new msg[101] format(msg,100,"^x01You need ^x04%d frags ^x01 and ^x04%d money ^x01 to be a predator.",get_cvar_num("admin_frags_predator"),get_cvar_num("admin_money_predator")) message_begin(MSG_ONE,MsgSayText,{0,0,0},id) write_byte(id) write_string(msg) message_end() } //---------------[Predator On or Off check]--------------- public func_predon(id) { new msg[101] if(get_cvar_num("admin_enable_predator")==1) { format(msg,100,"^x01Predator Mode is ^x03 On.") } if(get_cvar_num("admin_enable_predator")==0) { format(msg,100,"^x01Predator Mode is ^x03 Off.") } message_begin(MSG_ONE,MsgSayText,{0,0,0},id) write_byte(id) write_string(msg) message_end() } Przeczytaj cały wpis
  9. Hi does anyone has a simple warmup plugin? i know theres a few around but didnt quite find it the way i want 1 - all players have knives 2 - the rounds resets in X seconds "cvar" 3 - all players has 35hp during warmup, after the restart goes back to normal 4 - increase player speed by 25% only during warmup too, can be set by cvar 5 - Hud with countdown for restart thanks guys Przeczytaj cały wpis
  10. Please tell me this call of duty weapon plugin Can it be modified in normal mode? Thanks Attached Files Get Plugin or Get Source (codperk_bfg10000.sma - 9.0 KB) Przeczytaj cały wpis
  11. Hey, modding guys, I'd like to request a client-sided mod/plugin/addon or anything else, that will bring match ready ACCEPT popup. And if you know how to queue for unofficial servers, please also let me know. Thanks. Przeczytaj cały wpis
  12. Cvars PHP Code: // 1 = enable, 0 = disable. only respawn players if there exsit at least 1 none-incapacitated survivor? // - // Default: "1" survivor_auto_respawn_alright "1" // godframe time after respawn. 0.0 or lower = remove godframe // - // Default: "2.0" survivor_auto_respawn_godframe_time "2.0" // how many health will get after respawn, 0 or lower = incap // - // Default: "30" survivor_auto_respawn_health "30" // 1 = enable, 0 = disable. idle after respawn? // - // Default: "1" survivor_auto_respawn_idle "1" // print type. 1 = center text, 2 = hint text // - // Default: "2" // Minimum: "1.000000" // Maximum: "2.000000" survivor_auto_respawn_print_type "2" // how long time need to respawn // - // Default: "20" // Minimum: "0.000000" survivor_auto_respawn_time "20" Forwards Spoiler PHP Code: /** * @brief Called when a survivor has been respawned * * @param client client index * * @noreturn */ forward void SurvivorAutoRespawn_OnRespawned(int client); Change log Spoiler Code: 1.6 (2024-04-09: -init public release. Attached Files Get Plugin or Get Source (survivor_auto_respawn.sp - 11.6 KB) survivor_auto_respawn.phrases.txt (248 Bytes) survivor_auto_respawn.inc (611 Bytes) Wyświetl pełny artykuł
  13. HUD Display Manager Left 4 Dead 2 has a hard limit of how many players can display in the HUD at the same time, the real hard limit is 4 (Not counting you) but this is rather buggy. It will always show the first actors of the campaign. This plugin manipulates the data sent to the clients, displaying its nearest 3 teammates instead. Here's a GIF preview of how it looks in game, if it doesn't load click here. ConVarssm_l4d2_hud_display_enabledEnables the plugin.Default: 1 sm_l4d2_hud_display_query_timeDetermines the time between position checks. Less is smoother, but may lead to increased overhead. 3.0 is my personal recommended value but you can adjust it as needed.Default: 3 Changelog1.0.0Initial Release DependenciesSendProxy ManagerI provide Binaries for Left 4 Dead 2 Linux here. Supported Games Left 4 Dead 2 Theoretically can work on Left 4 Dead 1 but it is untested. Download and Source Code: Download from AlliedModders: You need to download the .sp file and compile the plugin yourself as the AlliedModders' forum compiler lacks the necessary includes to provide you with a working binary. Attached Files Get Plugin or Get Source (l4d2_hud_display_manager.sp - 9.3 KB) Wyświetl pełny artykuł
  14. Ive been searching for a good buymenu for so long, but i couldnt find one or either were broken. Im looking for something like this. https://imgur.com/a/geHOTW8 [Im not sure if it is this https://forums.alliedmods.net/showthread.php?t=317992 , but ive tried it and can't compile it] Przeczytaj cały wpis
  15. Ultimate Break Message V1 Description:This plugin is inspired by Raheem. This plugin will print a message in the chat if the player breaks anything on the map. The print is done and appears only to the admin or even to all players depending on the options in the cvar. This may be useful in some cases for administrators to find out who is violating the rules. This program is also useful in zombie escape servers. The new thing here is that previous plugins did not show the player break messages that occur by throwing grenades. also ,The name of the thing that broke appears, and this is based on a data base that you will fill out during the game, and the player’s team appears Don't worry, everything will be very easy. Quote: [human] Player1 has broken a bridge [zombie] Player2 has broken the bridge in the base Cvars:ct_break_message_type 1 0 = Disabled | 1 = Admins only see | 2 =All player see ct_break_message_show_hint 0 0 = dont show hint beakable entity for all admin only by command say /brshow <on|off> | 1 = show on all admins Commands Usage: say /brshow on for show breakable entity info say /brshow off for disable show breakable entity info say /brmsg 28 bridge for set name of entity say /brmsg 28 off for delete name of entity Installation & Instructions:Let's start learning how to install this plugin, So let's first start with what is the Requirements for this plugin? Simply install it like any plugin. Installing ReAPI Module:Ok very easy also just follow these steps. First download Latest Re-API, Ok after Un-ZIP it He will add files into this folders, here addons/amxmodx/modules and here addons/amxmodx/scripting/* Ok after that there is only one thing you need to do. Go to addons\amxmodx\configs folder and open modules.ini and then come at the end of the file and write: reapi and then close and save. addons\amxmodx\configs\modules.ini Code: ;regex ;nvault ;cstrike ;csx ;hamsandwich reapi Including CromChat Module:Ok very easy also just follow these steps. First download CromChat, move the file into this folder, here addons/amxmodx/scripting/include Add Print Center Fix Module(optional):if center message not work u will do . First download Print Center Fix 2022-01-06, move the files into this folder, here addons\amxmodx\dlls and go here addons\metamod\plugins.ini , and add this line in windows server in the end of file : Code: win32 addons\amxmodx\dlls\printcenterfix_mm.dll or add this line in linux server in the end of file : Code: linux addons/amxmodx/dlls/printcenterfix_mm_i386.so plugin Installation:(Same as when you install plugin copy ".amxx" file into plugins folder and go to plugins.ini and write it's name, also you need to define the module to run). Screenshots: Attached Thumbnails Attached Files addons.zip (627.0 KB) Get Plugin or Get Source (ultimate_break_message.sma - 6.1 KB) Get Plugin or Get Source (ultimate_break_message_hint.sma - 8.0 KB) ultimate_break_message.amxx (8.9 KB) ultimate_break_message_hint.amxx (10.9 KB) Przeczytaj cały wpis
  16. Forum: Unapproved Plugins Posted By: little_froy Post Time: 04-02-2024 at 12:07Wyświetl pełny artykuł
  17. Hello guys, I want to open a server cs 1.6 mod iind respawn and war3ft if an owner who had something like this open and would like to donate to me or I could offer a sum of money after I open the server you will receive full access to the server + forum, vip system, ranks, advertising, hud, skin, admin kit, everything related to that server, the server will open 05-05-2024 I'm waiting in private or Discord: florin1807 Przeczytaj cały wpis
  18. Hello. I would also like a furien plugin for the tero team, but I would like it to be furien as I wrote below. Furien: Invisible To climb walls JP 100 // I would like hp to regenerate hp back AP 100 Knife Speed Gravity Nighvision //I would like it to be on n LongJump //I would like the longjump to have a sound when it jumps Przeczytaj cały wpis
  19. Cvars PHP Code: // 1 = enable, 0 = disable. allow stagger in air? // - // Default: "0" stagger_on_friendly_fire_air "0" // 1 = enable, 0 = disable. include self as victim? // - // Default: "0" stagger_on_friendly_fire_include_self "0" // interval to stagger the same one again // - // Default: "0.5" // Minimum: "0.000000" stagger_on_friendly_fire_interval "0.5" // weapon bypass. split up with "," // - // Default: "inferno,fire_cracker_blast,pipe_bomb,grenade_launcher_projectile" stagger_on_friendly_fire_weapon_bypass "inferno,fire_cracker_blast,pipe_bomb,grenade_launcher_projectile" Change log Spoiler Code: 1.0 (2024-04-03: -init public release. Attached Files Get Plugin or Get Source (stagger_on_friendly_fire.sp - 7.4 KB) Wyświetl pełny artykuł
  20. Description Quick-switching as soon as the magazine hits the well will reload the weapon just like in CS 2 Install Click `Get Plugin` Notes Majority of code is taken from forum posts The time that it takes the reload animation to stop at the exact position when the magazine is fully in is calculated using Model Viewer. The current frame is divided by FPS to get precise time Image https://imgur.com/a/xmdFtrB https://imgur.com/a/SjfunlY Attached Files Get Plugin or Get Source (quickswitch_reload.sma - 4.3 KB) Przeczytaj cały wpis
  21. DescriptionI noticed that env_instructor_hint won't trigger beep sound at the beginning of each map for a period of time, so this plugin fix the issue. Cvars PHP Code: instructor_sound_fix_enable "1" Change log Spoiler Code: 1.0 (2024-04-03: -init public release. Attached Files Get Plugin or Get Source (instructor_sound_fix.sp - 1.7 KB) Wyświetl pełny artykuł
  22. Break Message and Grenades detector Description:This plugin is inspired by Raheem. This plugin will print a message in the chat if the player breaks anything on the map. The print is done and appears only to the admin or even to all players depending on the options in the cvar. This may be useful in some cases for administrators to find out who is violating the rules. This program is also useful in zombie escape servers. The new thing here is that previous plugins did not show the player break messages that occur by throwing grenades. Cvars:ct_break_message_type 1 0 = Disabled | 1 = Admins only see | 2 =All player see ct_break_message_bomb_only 0 0 =All message type appear by weapon or grenades | 1 = Only grenades breaking message appear Installation & Instructions:Let's start learning how to install this plugin, So let's first start with what is the Requirements for this plugin? Simply install it like any plugin. Installing ReAPI Module:Ok very easy also just follow these steps. First download Latest Re-API, Ok after Un-ZIP it He will add files into this folders, here addons/amxmodx/modules and here addons/amxmodx/scripting/* Ok after that there is only one thing you need to do. Go to addons\amxmodx\configs folder and open modules.ini and then come at the end of the file and write: reapi and then close and save. addons\amxmodx\configs\modules.ini Code: ;regex ;nvault ;cstrike ;csx ;hamsandwich reapi plugin Installation:(Same as when you install plugin copy ".amxx" file into plugins folder and go to plugins.ini and write it's name, also you need to define the module to run). Screenshots: Attached Files Get Plugin or Get Source (ct_spawn_break_message.sma - 5.4 KB) ct_spawn_break_message.amxx (5.0 KB) Przeczytaj cały wpis
  23. Descriptionyet another plugin remove death check untill everyone dead. to prevent force failed in c7m3, use stripper and see this config. Cvars PHP Code: death_check_required_not_ledge "0" Change log Spoiler Code: 1.0 (2024-04-01: -init public release. Attached Files Get Plugin or Get Source (death_check.sp - 4.8 KB) Wyświetl pełny artykuł
  24. Relies on Steamworks. for player achievement data. Player connects and enters commands !playertime prompts the player for the true length of the game. Can limit access to the game to players of a certain playertime. References this plugin. Basic testing didn't reveal any problems. First time writing a full plugin. Please feedback if you have problems. I'll try to find time to fix them. Attached Thumbnails Attached Files Get Plugin or Get Source (GetPlayerGametime.sp - 8.9 KB) GetPlayerGametime.phrases.txt (2.2 KB) Wyświetl pełny artykuł
  25. 4v4 PASS Time is a competitive basketball-like gamemode of TF2 focusing more on fast-paced, skillful gameplay than its casual counterpart. It challenges teams to use their mechanical skills (rocket jumps, airshots, trimps, surfs, etc) as well as solid teamwork and communication. The 4v4 PASS Time plugin focuses on ironing out the various bugs or issues that are part of the gamemode variant. For example, this plugin fixes the following: Bug where medics will not be able to pick up the JACK after ubering Block instantly respawning by changing classes under the effects of cvars that disable respawn timers Disables the blurry overlay after intercepting Stops the JACK from colliding with dropped ammo packs or weapons from dead players It also adds things like thorough event logging, a practice mode, end round statistics for each player, and more to enhance the experience but not majorly alter it. There are a team of mappers that work in conjunction with the plugin in order to provide logs to logging services like https://more.tf/. An example log is available here. The maps in question are available here. Most of these custom maps are required to be used in order for the plugin to work as intended. Using maps that the plugin is not meant for shouldn't cause any direct gameplay issues though. All future updates to the plugin will be posted to the GitHub. This plugin is mainly developed by myself, but contains snippets of code from Dr. Underscore, muddy, and sapphonie. The original plugin author is eaasye and this plugin was built off of those previous versions. When I started development, I knew nothing about SourcePawn, and I still have a lot to learn, so if you spot anything that can be improved, feel free to make a PR or just DM me about it. Attached Files p4sstime.smx (24.1 KB) Wyświetl pełny artykuł
×
×
  • Dodaj nową pozycję...