Giter VIP home page Giter VIP logo

sm-hosties's Introduction

[CS:S/CS:GO] SM Hosties v2

by: databomb, dataviruset and DorCoMaNdO

Build Status: Build Status

Description:

This is a re-write of SM_Hosties v1.x from dataviruset. This allows support for multiple LRs occuring simultaneously as well as a plethora of additional last request games and new cvars for the most customizable Hosties yet. It opens up a new API for plugin developers to ask questions like if a player is a rebel as well as the ability to add third party last request games for each server independent of the Hosties plugin.

Features:

  • 33 Last Request Games included as default
  • Drunken Boxing
  • Most Jumps
  • Farthest Jump
  • Brink of Death
  • Race
  • Russian Roulette
  • Rebel
  • Low-Grav Knife Fight
  • Hi-Speed Knife Fight
  • Third Person Knife Fight
  • Drugged Knife Fight
  • Vintage (Normal) Knife Fight
  • Rock Paper Scissors
  • NoScope with any scoped weapon (4 choices)
  • Dodgeball
  • Hot Potato
  • Chicken Fight
  • Shot4Shot with any pistol (6 choices for CS:S, 7 for CS:GO)
  • Mag4Mag with any pistol (6 choices for CS:S, 7 for CS:GO)
  • Gun Toss
  • Third-party plugins for Custom Lastrequests
  • Check Players Command
  • Freekill Detection & Prevention
  • Game Description Override
  • Mute System with BaseComm Integration
  • No Block
  • Rules Command
  • Starting Weapons Payloads for CT & T
  • Round End Team Overlays

Hosties API (For developers):

  • For integration there are two natives provided: IsClientRebel and IsClientInLastRequest.
  • For adding custom LRs there are three natives provided: AddLastRequestToList, RemoveLastRequestFromList, and ProcessAllLastRequests.
  • Feel free to have a look at lastrequest_shotgunwars.sp and lastrequest_fruitninja.sp as they can be used as a reference to last request scripting.
  • ChangeRebelStatus is new in v2.1.0.

DorCoMaNdO developed an autostart feature which enables developers to add custom menus (on knife fight or Shot4Shot). Learn how by checking this example code: http://pastebin.com/1Ka9nRVS

General Chat Commands:

  • !rules
  • !lastrequest (also: !lr)
  • !checkplayers

Admin Commands:

  • !stoplr (also: !abortlr and !cancellr): Requires slay admin flag and will abort any and all active last requests.

Requirements:

  • SourceMod 1.7.0+

Needed for successful compilation:

Uses natives from these plugins if found:

Automatic Install Instructions:

  • The easiest way to install SM_Hosties v2 is this:

  • Be sure that your server meets the requirements for SM_Hosties v2 (see above)

  • Scroll down a bit on this page and download the ZIP file attached to this post (or from the mirror)

  • Extract all files from the ZIP file into the cstrike folder of your server (all directories should match up with the folders in the ZIP file)

  • Restart your server or let it change map

  • Configure settings in cfg/sourcemod/sm_hosties2.cfg

  • Done!

  • Manual Install Instructions: NOTE: Do not compile any individual file such as lastrequest.sp in the hosties/ directory, compiling sm_hosties.sp will include these files. If you'd like only lastrequest.sp then that is a separate discussion.

  • Copy all files in the scripting/hosties/ directory to addons/sourcemod/scripting/hosties/

  • Copy all files in the translation/ directory to addons/sourcemod/translations/

  • Copy the hosties.inc and lastrequest.inc files to addons/sourcemod/scripting/include/

  • Download sourcebans.inc, emitsoundany.inc and SteamWorks.inc from the links above and put them in addons/sourcemod/scripting/include/

  • Copy lastrequest_shotgunwars.sp, lastrequest_fruitninja.sp and sm_hosties.sp to addons/sourcemod/scripting/

  • If you are going to compile lastrequest_fruitninja, check that you have SMLIB in the include folder (all versions of SM_Hosties don't have it bundled), otherwise download it and put the include files in the addons/sourcemod/scripting/include/ folder.

  • Compile sm_hosties, lastrequest_shotgunwars and lastrequest_fruitninja and move SMX files to addons/sourcemod/plugins/

  • Run plugin for the first time and configure settings in cfg/sourcemod/sm_hosties2.cfg

Upgrade Instructions:

  • Rename your original sm_hosties2.cfg in cfg/sourcemod/ to sm_hosties2.backup.cfg
  • Let the new version of the plugin start for the first time and create the new cfg file.
  • Look at the sm_hosties2.backup.cfg and merge your original settings with the new one.

Changes to Existing Cvars:

  • A few of the existing cvar settings in SM_Hosties v1.x have changed slighlty in v2. The v2 config file has been given a new name intentionally.

  • Really, you should consider to redo all configuration if you're upgrading from 1.x.

  • sm_hosties_lr_ts_max: This now controls the number of Ts allowed to have LRs going at the same time.

  • sm_hosties_mute_immune: This now uses flag CHARACTERS instead of names. (E.g. use "z" instead of "root".)

  • sm_hosties_lr_hp_teleport: Added new option (2)- teleport and freeze players.

  • sm_hosties_ct_start and sm_hosties_t_start should now include "weapon_knife" in the list.

  • sm_hosties_lr_s4s_shot_taken now applies to Mag4Mag as well as Shot4Shot.

  • sm_hosties_roundend_overlay_ct & sm_hosties_roundend_overlay_t now must specify the VTF file only

  • sm_hosties_lr_ns_delay is now an integer instead of a float.

  • sm_hosties_lr_s4s_dblsht_action now determines if sm_lr_rebel_action is followed or not (0 - no punishment, 1 - follow rebel_action)

  • sm_hosties_lr_s4s_shot_taken now includes Mag4Mag announcement when magazines are emptied

Special Thanks for Version 2:

  • psychonic - Answering any question I've had with SourceMod plugin coding
  • johan123jo - The blocking LR damage code and various bug fixes
  • MomemtumMori - Hosting the SVN for SM_Hosties v2 while under development
  • Berni - For helping with hull traces
  • dvander - Pointing out some architectural flaws with the Hosties API
  • Crosshair - Inspiration
  • CoMaNdO - Helping out with the development of SM_Hosties 2.1.0+ and the support for CS:GO
  • Bara - Helping out fixing things for 2.2.0

Thanks to the servers willing to run beta versions of this (for all the problems you never had to deal with, thank them):

  • Groger, OnlyFriends
  • Silence, XenoGamers

Help The Cause:

SM_Hosties v2 is over 5,500 lines of code and growing. There are a variety of ways you could help the project. Firstly, we have a healthy list of new features that could be added if you have any experience with SourceMod and plugin development and would like to lend a hand. Also, with the addition of the Hosties API, we could make a custom LR game for your server in exchange for a small fee. AlliedMods is gracious enough to host all of this so, if you haven't already, make them a donation to support the hosting costs. Lastly, consider making a donation to us to help offset the cost of development and hosting. The barrage of DDoS attacks drives up the cost of hosting and without active servers, our interest in development would wither. Donations to Vintage Jailbreak or '][' E H //ARRiORS will be split amongst databomb and dataviruset, just be sure to reference this is for the Hosties project.

Alt text

Translations:

The translations file has been heavily updated and we are in need of translators! If you have a language to add, reply to this topic or get in touch with one of us.

sm-hosties's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sm-hosties's Issues

[Feature Request] Custom LR without selecting an oponent

Hello, I would like to request a new API function to allow custom LR games added with AddLastRequestToList() to be able to start immediately after the player chooses the game in the LR menu (without choosing an opponent) and if possible a "vs all" so it's not just a 1v1, similar to the LR_Rebel game that comes with the plugin.

I'm working on a Predator plugin where the player can type !predator if he is the last terrorist and he needs to kill all CTs to win. As you can see, if I use the provided function it will slay the terrorist if he attacks a CT other than the choosen opponent.

Right now my workaround was to add two functions to lastrequest.inc called "FakeStartLR" and "FakeStopLR" so the player cannot call !lr while the predator game is in progress, but I don't like this approach and I'd like to add the option Predator to the LR menu.

I would appreciate if you could add a function to solve this in the next iteration.

Thanks!

LR Issue after SM Update. (No Scope Battle)

Hello,

After the recent SM update which assists in preventing blacklists due to !ws / !knife, Last Request for No Scope Battle.

Error log:
L 03/08/2016 - 01:32:24: [SM] Native "SetEntProp" reported: Cannot set m_iItemDefinitionIndex with "FollowCSGOServerGuidelines" option enabled.
L 03/08/2016 - 01:32:24: [SM] Displaying call stack trace for plugin "jailbreak/sm_hosties.smx":
L 03/08/2016 - 01:32:24: [SM] [0] Line 5204, hosties/lastrequest.sp::Timer_Countdown()

1.8 Deprecated Functions

FindSendPropOffs is deprecated and causing errors on 1.8 branch of SM. Will need to fix these for future builds.

[CS:GO] Server Crash with Zeus

https://forums.alliedmods.net/showthread.php?t=298446

Appears as if Zeus is still present after the call to StripAllWeapons

https://github.com/dataviruset/sm-hosties/blob/master/addons/sourcemod/scripting/include/hosties.inc#L71
So one way to fix this is to fix StripAllWeapons to remove the Zeus.

Another possibility is to modify the SDK Hook for deciding weapon usage to stop anything but the knife and Shot4Shot weapons to be used during the LR.
https://github.com/dataviruset/sm-hosties/blob/master/addons/sourcemod/scripting/hosties/lastrequest.sp#L2020

[feature request] noscope cheat cvar

#Hey

I got a problem with the lr noscope. When a user starts the noscope he's able to run in the weapon spawner and pick up another weapon (e.g. m4a1) and use it.

greetz
caaine

[CS:GO] Lol error

L 07/27/2017 - 16:45:06: [SM] Exception reported: Property "m_iPrimaryReserveAmmoCount" not found (entity 620/weaponworldmodel)
L 07/27/2017 - 16:45:06: [SM] Blaming: sm_hosties.smx
L 07/27/2017 - 16:45:06: [SM] Call stack trace:
L 07/27/2017 - 16:45:06: [SM]   [0] SetEntProp
L 07/27/2017 - 16:45:06: [SM]   [1] Line 1879, hosties/lastrequest.sp::LastRequest_WeaponFire

Bugs - CSGO

Mute Ts for # of seconds only works sometimes. Only a handful of LRs work. Some LR games such as shot4shot kills the player who shoots first, tried with both CT and T. Dodgeball doesn't work period. etc..

I've disabled them most of them. Just wanted to report the bugs.

undefined symbol

//SourceMod Batch Compiler
// by the SourceMod Dev Team

//// sm_hosties.sp
//
// hosties/gamedescription.sp(61) : error 017: undefined symbol "SteamWorks_SetG
ameDescription"
// hosties/gamedescription.sp(73) : error 017: undefined symbol "SteamWorks_SetG
ameDescription"
// hosties/freekillers.sp(265) : error 017: undefined symbol "SBBanPlayer"
// hosties/gunsafety.sp(419) : error 017: undefined symbol "SBBanPlayer"
// hosties/gunsafety.sp(433) : error 017: undefined symbol "SBBanPlayer"
//
// 5 Errors.
//
// Compilation Time: 1,66 sec
// ----------------------------------------

Press enter to exit ...

Error, need help

L 07/23/2020 - 15:13:50: [SM] Call stack trace:
L 07/23/2020 - 15:13:50: [SM] [0] SetPackPosition
L 07/23/2020 - 15:13:50: [SM] [1] Line 1668, hosties/lastrequest.sp::LastRequest_PlayerJump
L 07/23/2020 - 15:13:54: [SM] Exception reported: Invalid data pack position, 120 is out of bounds (18)
L 07/23/2020 - 15:13:54: [SM] Blaming: sm_hosties.smx

Bug

I don't know how to call in title, so just wrote "bug",

It just started yesturday, before was everything ok. No new plugins added, nothing special changed, just translated texts. Now I get this error:

L 03/10/2017 - 20:10:23: SourceMod error session started
L 03/10/2017 - 20:10:23: Info (map "workshop/467648061/jb_buyukisyan_son") (file "errors_20170310.log")
L 03/10/2017 - 20:10:23: [SM] Exception reported: Handle 670e0872 is invalid (error 3)
L 03/10/2017 - 20:10:23: [SM] Blaming: sm_hosties.smx
L 03/10/2017 - 20:10:23: [SM] Call stack trace:
L 03/10/2017 - 20:10:23: [SM] [0] CloseHandle
L 03/10/2017 - 20:10:23: [SM] [1] Line 258, hosties/muteprisoners.sp::MutePrisoners_RoundEnd
L 03/10/2017 - 21:00:52: Error log file session closed.

It's happens sometimes, not all the time. Only a few times this show up.

Translation

I am interesting to translate from englisch to German. Write me a PM in AlliedModders under my nickname Chaya_

Problem with "FollowCSGOServerGuidelines"

 L 03/04/2016 - 21:38:56: [SM] Native "SetEntProp" reported: Cannot set m_iItemDefinitionIndex with "FollowCSGOServerGuidelines" option enabled.
L 03/04/2016 - 21:38:56: [SM] Displaying call stack trace for plugin "sm_hosties.smx":
L 03/04/2016 - 21:38:56: [SM]   [0]  Line 5204, D:\Matt\Documents\SourceMod\sm-hosties\hosties/lastrequest.sp::Timer_Countdown()

This Results in most LR's not beeing playable

kind regards

Error logs

L 10/11/2018 - 19:59:41: SourceMod error session started
L 10/11/2018 - 19:59:41: Info (map "jb_clouds_final5") (file "errors_20181011.log")
L 10/11/2018 - 19:59:41: [SM] Exception reported: Entity 269 (269) is invalid
L 10/11/2018 - 19:59:41: [SM] Blaming: sm_hosties.smx
L 10/11/2018 - 19:59:41: [SM] Call stack trace:
L 10/11/2018 - 19:59:41: [SM] [0] SetEntData
L 10/11/2018 - 19:59:41: [SM] [1] Line 1750, hosties/lastrequest.sp::LastRequest_WeaponFire
L 10/11/2018 - 20:04:25: Error log file session closed.

Hot Potato crashes server CSGO

As soon as a LRing players chooses a CT in hot potato, the server crash. It's been happening since the last CSGO update. Accelerator says 'This crash was caused by a plugin trying to spawn an incorrectly configured entity.'

Nothing in error logs or console.log

Anyone else experiencing this same issue or is it just my server?

sm_hosties_startweapons_on don't work

sm_hosties_startweapons_on worked only after reload sm_hosties

meta list

Listing 7 plugins:
  [01] SourceMod (1.8.0.6024) by AlliedModders LLC
  [02] CS Tools (1.8.0.6024) by AlliedModders LLC
  [03] SDK Tools (1.8.0.6024) by AlliedModders LLC
  [04] SteamWorks Extension (1.2.1) by Kyle Sanderson
  [05] SDK Hooks (1.8.0.6024) by AlliedModders LLC
  [06] PTaH (P Tools and Hooks) (1.0.6) by Phoenix (ه`Ϥ5=8:AϠ癩
  [07] TAU LIB (1.2) by Phoenix (ه`Ϥ5=8:AϠ癩

sm plugins list

[SM] Listing 100 plugins:
  01 "[VIP] Bhop" (1.1.0) by KOROVKA,BaFeR
  02 "[VIP] Invis" (1.0.0) by BaFeR (skype: barstis7)
  03 "[VIP] Regen HP" (1.1) by R1KO
  04 "[VIP] HP" (1.1) by R1KO,BaFeR
  05 "[VIP] Last Request (PRIVATE)" (1.1) by R1KO
  06 "[VIP] Gravity" (1.2.0) by R1KO (skype: vova.andrienko1),BaFeR
  07 "[VIP] Skins" (2.0) by R1KO (skype: vova.andrienko1)
  08 "[VIP] Vips Online" (1.0.1) by R1KO (skype: vova.andrienko1)
  09 "[VIP] Armor" (1.1) by R1KO (skype: vova.andrienko1)
  10 "[VIP] Core" (3.0 DEV #12) by R1KO (skype: vova.andrienko1)
  11 "[VIP] Stats" (2.0) by R1KO
  12 "[VIP] CHAT (cp)" (3.2) by R1KO
  13 "[VIP] Speed" (1.1.0) by R1KO (skype: vova.andrienko1)
  14 "SM_Hosties v2" (2.3.0) by databomb & dataviruset & comando
  15 "[CS:S / CS:GO] Throwing Knives Core" (1.2) by R1KO (original by meng, Bacardi)
  16 "Chat-Processor" (2.0.8) by Keith Warren (Drixevel)
  17 "Knife choice INTERFASE MONUL - �K1>@ =>60 ���#�, ��"� $��!�" (1.1) by Phonix - $5=8:A
  18 "Sound Commands" (1.8.0.6024) by AlliedModders LLC
  19 "[CS:GO/CS:S] Jailbreak Gangs Clan Tags" (1.1.9.1) by Headline
  20 "Jail Shop" (1.0) by AlexTheRegent,BaFeR
  21 "CT Bans (PRIVATE)" (1.1) by R1KO
  22 "[JWP] Freeday" (1.4) by White Wolf
  23 "JWP - Ratio(Original MyJailbreak)" (1.3) by shanapu, Addicted, BaFeR
  24 "[JWP] Speed" (1.4) by White Wolf
  25 "[JWP] Laser Beam" (1.8) by White Wolf
  26 "[JWP] Rebel" (1.7) by White Wolf
  27 "[JWP] On LR Started" (1.2) by White Wolf
  28 "[JWP] Noblock" (1.4) by White Wolf
  29 "[JWP] Skin" (1.7.2) by White Wolf
  30 "[JWP] Coloring" (1.3) by White Wolf
  31 "[JWP] Core" (1.1.5c) by White Wolf & TiBarification
  32 "JailBreak Otkaz" (1.4.1) by White Wolf
  33 "MyJailbreak - Ratio - CT Bans Support" (Beta 12.0.dev-ada58d8) by shanapu,Addicted, good_live
  34 "[JWP] Guns" (1.4) by White Wolf
  35 "[JWP] Shootguns" (1.0) by White Wolf
  36 "Arms Fix" (1.6) by NomisCZ (-N-)
  37 "[JWP] Manual Coloring" (1.1) by White Wolf
  38 "[ Menu Creator ]" (3.0.0.1) by AlexTheRegent
  39 "[JWP] Friendly Fire" (1.2) by White Wolf
  40 "[JWP] Point (PRIVATE)" (1.0.0) by 1mpulse (skype: potapovdima1)
  41 "[JWP] Questions (PRIVATE)" (1.0) by R1KO (HLModders LLC)
  42 "[JWP] Auto Door Open" (1.0.1) by 1mpulse & BaFeR
  43 "[JWP] Hint Info" (1.0.0) by 1mpulse,BaFeR
  44 "[JWP] CT Armor (PRIVATE)" (1.0.0) by 1mpulse (skype: potapovdima1)
  45 "[JWP] Warden health" (1.3) by White Wolf
  46 "[JWP] Prisoner Counter" (1.4) by White Wolf
  47 "[JWP] Door Control" (1.5) by White Wolf & Kailo97 (dev of doors plugin)
  48 "[JWP] Anti-AFK" (1.4.3) by Bristwex,BaFeR
  49 "[JWP] Admin Control" (1.5) by White Wolf
  50 "Rename Admin" (1.11) by PainteR (loginivan)
  51 "Mirror" (1.0) by Franc1sco franug and Nanochip
  52 "Basic Commands" (1.8.0.6024) by AlliedModders LLC
  53 "Maplister" (1.6.8) by theY4Kman
  54 "Client Preferences" (1.8.0.6024) by AlliedModders LLC
  55 "Weapon Skin" (2.3.5PRE REV 3 PRIVATE) by Phoenix (ه`Ϥ5=8:AϠ癩
  56 "[ANY] Blank Credits System" (1.1.9.1) by Headline
  57 "MapChooser Extended" (1.10.2) by Powerlord, Zuko, and AlliedModders LLC
  58 "[Shop] Money Distributor" (1.4.3) by FrozDark (HLModders LLC)
  59 "[Shop] Core" (2.1.0) by FrozDark
  60 "[Shop] Equipments" (2.1.1) by FrozDark
  61 "[Shop] Pets" (1.0) by Pheonix (ه`Ϥ5=8:AϠ癩 & Zephyrus
  62 "[Shop] Skins" (2.2.0) by FrozDark (arms by R1KO)
  63 "[Shop] Logs" (1.1) by R1KO (skype: vova.andrienko1)
  64 "[Shop] Top10 Function" (2.0.1) by FrozDark
  65 "[CS:GO] Spritetrail fix" (1.0.1) by FrozDark
  66 "SourceBans++: Main Plugin" (1.6.2) by SourceBans Development Team, SourceBans++ Dev Team
  67 "Basic Chat" (1.8.0.6024) by AlliedModders LLC
  68 "Thirdperson" (1.6 CS:GO edition) by shavit and Franc1sco franug
  69 "Player Commands" (1.8.0.6024) by AlliedModders LLC
  70 "Admin List" (1.0) by Someone
  71 "[CS:GO/CS:S] Jailbreak Gangs" (1.1.9.1) by Headline
  72 "Multiple player boost " (1.00) by boomix
  73 "Smart Jail Doors" (0.6.0-beta) by Maxim 'Kailo' Telezhenko
  74 "Basic Comm Control" (1.8.0.6024) by AlliedModders LLC
  75 "Knife choice CORE - �K1>@ =>60 /� �" (2.4.1) by Phoenix - $5=8:A
  76 "Fun Commands" (1.8.0.6024) by AlliedModders LLC
  77 "Default SM Text Replacer" (0.32.GO) by Mitch/Bacardi
  78 "Admin Menu" (1.8.0.6024) by AlliedModders LLC
  79 "[�8G=K9 �018=5B] Core [PRIVATE]" (3.2.1) by 1mpulse (skype:potapovdima1)
  80 "Chat Colors CSGO" (1.4) by Pheonix (ه`Ϥ5=8:AϠ癩
  81 "Token Auto Updater" (1.3.1) by ه`Ϥ5=8:AϠ癊  82 "Easy Downloader" (1.02) by Invex | Byte
  83 "[LK MODULE] �>:C?:0 �4<8=>: (REFORK)" (2.4) by 1mpulse (skype:potapovdima1)
  84 "[LK MODULE] Info Menu" (2.1) by 1mpulse (skype:potapovdima1)
  85 "[LK MODULE] �>:C?:0 GANGS :@548B>2" (2.0) by 1mpulse (skype:potapovdima1)
  86 "[LK MODULE] �5@52>4 �5=53" (2.1) by 1mpulse (skype:potapovdima1)
  87 "[LK MODULE] �>:C?:0 SHOP :@548B>2" (2.1) by 1mpulse (skype:potapovdima1)
  88 "[LK MODULE] �>:C?:0 VIP (VIP R1KO)" (2.2) by 1mpulse (skype:potapovdima1)
  89 "[LK MODULE] #?@02;5=85 4>ABC?><" (2.0) by 1mpulse (skype:potapovdima1)
  90 "[LK MODULE] �4<8= �5=N" (2.0) by 1mpulse (skype:potapovdima1)
  91 "Team Names" (1.1) by Internet Bully
  92 "Auto NAV file creator" (1.0) by shavit
  93 "Basic Info Triggers" (1.8.0.6024) by AlliedModders LLC
  94 "Remove Messages [CS:GO]" (2.5) by Fox1qqq
  95 "Player Cleaner" (1.0) by White Wolf (HLModders LLC)
  96 "HidePanel.smx"
  97 "Basic Votes" (1.8.0.6024) by AlliedModders LLC
  98 "Fun Votes" (1.8.0.6024) by AlliedModders LLC
  99 "Additional Commands" (1.0.1) by wS
  100 "Terrible Enable Full Alltalk" (0.02) by Sheepdude

Gravity Speed Error

In lr games:
-LR_KnifeFight_HiSpeed
-LR_KnifeFight_LowGrav
-LR_Dodgeball
Gravity or Speed work only for CT team

CloseHandle and lastrequest_gungolf

Hey
error log for me

L 08/17/2015 - 04:03:11: Info (map "ba_jail_minecraftparty_v6") (file "errors_20150817.log")
L 08/17/2015 - 04:03:11: [SM] Native "CloseHandle" reported: Handle cad906e9 is invalid (error 3)
L 08/17/2015 - 04:03:11: [SM] Displaying call stack trace for plugin "sm_hosties.smx":
L 08/17/2015 - 04:03:11: [SM] [0] Line 258, hosties/muteprisoners.sp::MutePrisoners_RoundEnd()

gungolf:
The Weapons has Ammo

shotgunwar:
add the other Shotguns = Mag-7, Nova and Sawed-off

greetz
Caaine

Jumping Contest Furthest Jump Distance

Knife fight menu is incorrect, eg. Meepmeep is grav and 3 person is meepmeep (Incorrect labels).

Jumping Contest (Furthest Jump) - It is a bit hard to describe but there are some issues in the way the distance calculations are being made.

Guntoss Lasers - When the gun is thrown it doesn't not appear at the exact point where the gun lands.

Issue with API

I'm trying to use the sm_hosties API, but I cannot get it work, seems like i've done all but the LR never starts.
The code:

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>
#include <hexstocks>
#include <emitsoundany>
#include <hosties>
#include <lastrequest>

#pragma newdecls required
#pragma semicolon 1


#define PLUGIN_AUTHOR "Hexah"
#define PLUGIN_VERSION "1.00"

//Handle
Menu WeapMenu = null;
Menu HPMenu = null;
Handle hTimer = null;

int LR_GunFight = 0;
int LRType = 0;
int LR_Guard = 0;
int LR_Terror = 0;
int iLRHealth = 0;
int iDelay = 4;

char sLRWeap[32];
char Sound[64][5];

public Plugin myinfo = 
{
	name = "GunFight LR", 
	author = PLUGIN_AUTHOR, 
	description = "", 
	version = PLUGIN_VERSION, 
	url = "csitajb.it"
};

//Startup
public void OnPluginStart()
{
	//Create menu for weapons
	WeapMenu = new Menu(hLRWeapon);
	WeapMenu.SetTitle("Choose your weapon!");
	WeapMenu.AddItem("awp", "AWP");
	WeapMenu.AddItem("m4a1", "M4A4");
	WeapMenu.AddItem("deagle", "Deagle");
	WeapMenu.AddItem("ak47", "AK47");
	SetMenuExitButton(WeapMenu, true);
	
	//Create menu for HPs
	HPMenu = new Menu(hLRHP);
	HPMenu.SetTitle("Choose the HP");
	HPMenu.AddItem("100", "100");
	HPMenu.AddItem("200", "200");
	HPMenu.AddItem("350", "350");
	HPMenu.AddItem("500", "500");
	SetMenuExitButton(HPMenu, true);
}

public void OnPluginEnd()
{
	//Remove LR on unload
	RemoveLastRequestFromList(OnLRStart, OnLREnd, "GunFight");
}


public void OnConfigsExecuted()
{
	//Add LR
	static bool bAddedLR = false;
	if (!bAddedLR)
	{
		LR_GunFight = AddLastRequestToList(OnLRStart, OnLREnd, "GunFight", false);
		bAddedLR = true;
	}
}

public void OnMapStart()
{
	//Precache all sounds
	PrecacheSoundAny("sound/sm_hosties/noscopestart1.mp3");
	for (int i = 1; i <= 5; i++)
	{
		Format(Sound[i - 1], sizeof(Sound[]), "sound/timeleft/en/unreal/%isec.mp3", i);
		PrecacheSoundAny(Sound[i - 1]);
	}
	
}


//Events
public int OnLRStart(Handle LR_Array, int ArrayIndex)
{
	LRType = GetArrayCell(LR_Array, ArrayIndex, view_as<int>(Block_LRType)); // get this lr from selection
	if (LRType == LR_GunFight)
	{
		LR_Guard = GetArrayCell(LR_Array, ArrayIndex, view_as<int>(Block_Guard)); //Get Guard index
		LR_Terror = GetArrayCell(LR_Array, ArrayIndex, view_as<int>(Block_Prisoner)); //Get Prisoner index
		
		CheckDataPack(LR_Array, ArrayIndex); //Check data pack?
		
		DisplayMenu(WeapMenu, LR_Terror, MENU_TIME_FOREVER); //Display the menu.
		
		PrintToChat(LR_Guard, "\x04[SM] \x01The player %N selected to you as a partner in his lastrequest.", LR_Terror);
	}
}


public void PreInitializeLR()
{
	for (int i = 1; i <= MaxClients; i++)
		EmitSoundToAllAny(Sound[4]); //Play first sound
	StripAllPlayerWeapons(LR_Guard); //Remove Guard Weapons
	StripAllPlayerWeapons(LR_Terror); //Remove Prisoner Weapons
	PrintToHud(LR_Guard, "5", 0.9, -1.0, -1.0, 255, 255, 100, 100); 
	PrintToHud(LR_Terror, "5", 0.9, -1.0, -1.0, 255, 255, 100, 100);
	PrintToChatAll("[SM] LR sta per iniziare!");
	GivePlayerItem(LR_Guard, "weapon_knife"); //Give Knife
	GivePlayerItem(LR_Terror, "weapon_knife"); //Give knife
	hTimer = CreateTimer(1.0, Timer_CountDown, _, TIMER_REPEAT); //Preparation timer
}

public Action Timer_CountDown(Handle timer)
{
	if (iDelay == 0)
	{
		//Real start LR
		EmitSoundToAllAny("sound/sm_hosties/noscopestart1.mp3");
		GivePlayerItem(LR_Guard, sLRWeap);
		GivePlayerItem(LR_Terror, sLRWeap);
		SetEntityHealth(LR_Guard, iLRHealth);
		SetEntityHealth(LR_Terror, iLRHealth);
		iDelay = 4;
		InitializeLR(LR_Terror);
		return Plugin_Stop;
	}
	char sDelay[8];
	IntToString(iDelay, sDelay, sizeof(sDelay));
	iDelay--;
	PrintToHud(LR_Guard, sDelay, 0.9, -1.0, -1.0, 255, 255, 100, 100);
	PrintToHud(LR_Terror, sDelay, 0.9, -1.0, -1.0, 255, 255, 100, 100);
	EmitSoundToAllAny(Sound[iDelay]);
	return Plugin_Continue;
}


//Reset variables on LR end
public int OnLREnd(int type, int prisioner, int guard)
{
	if (hTimer != null)
	{
		delete hTimer;
	}
	LR_GunFight = 0;
	LRType = 0;
	LR_Guard = 0;
	LR_Terror = 0;
	iLRHealth = 0;
	iDelay = 4;
	strcopy(sLRWeap, sizeof(sLRWeap), "");
}



void CheckDataPack(Handle LR_Array, int ArrayIndex)
{
	int LR_Pack_Value = GetArrayCell(LR_Array, ArrayIndex, view_as<int>(Block_Global1));
	switch (LR_Pack_Value)
	{
		case  - 1:
		{
			PrintToServer("no info included");
		}
	}
	
	SetArrayCell(LR_Array, ArrayIndex, 3, view_as<int>(Block_Global1));
}

//Menu
public int hLRWeapon(Menu menu, MenuAction action, int param1, int param2)
{
	if (action == MenuAction_Select)
	{
		menu.GetItem(param2, sLRWeap, sizeof(sLRWeap));
		Format(sLRWeap, sizeof(sLRWeap), "weapon_%s", sLRWeap);
		DisplayMenu(HPMenu, param1, MENU_TIME_FOREVER);
	}
}

public int hLRHP(Menu menu, MenuAction action, int param1, int param2)
{
	if (action == MenuAction_Select)
	{
		char info[16];
		menu.GetItem(param2, info, sizeof(info));
		iLRHealth = StringToInt(info);
		PreInitializeLR();
	}
}

PS: I've done a post on AM too (but I had no replies), check that for more infos: https://forums.alliedmods.net/showthread.php?t=299739

If you need any of the includes to help me I will give them.

Last Request error

I get this error when players do LR no scope battles. Some other last requests are bugged aswell

L 09/24/2016 - 18:35:09: [SM] Exception reported: Cannot set m_iItemDefinitionIn
dex with "FollowCSGOServerGuidelines" option enabled.
L 09/24/2016 - 18:35:09: [SM] Blaming: sm_hosties.smx()
L 09/24/2016 - 18:35:09: [SM] Call stack trace:
L 09/24/2016 - 18:35:09: [SM]   [0] SetEntProp
L 09/24/2016 - 18:35:09: [SM]   [1] Line 5185, hosties/lastrequest.sp::Timer_Countdown()

Rocket-tossing

So, i don't know quite how long this has been an issue but it's quite annoying and i've not been able to find a fix whilst searching.

Essentially, holding E whilst dropping a weapon would cause it to go flying forwards, same goes with pressing E to pick up weapons that are on the ground. Is there any part of the code which touches upon weapon pickup or may this be fixed in another manner?

Last Request Mag4Mag

Weapon: Glock-18
Bug: When emptying the Glock-18 with right-click, while Mag4Mag gets the next player no shots.

SourceMod 1.8.0.5954
"SM_Hosties v2" (2.2.3) by databomb & dataviruset & comando

greetz
Caaine

Strips weapons when disabled..

I think it's hosties on my server that strips weapons when round starts. A map I'm playing is supposed to have weapons in CT spawn (ba_jail_alpha) but they're not there. I've disabled strips on ban/kick/slay and no changes.

Launching the map on a local without any plugins (just default by typing "map " in console and the weapons are there.

Is there a command or something that I've missed??

DataPack operation is out of bounds.

Error log

[SM] Exception reported: DataPack operation is out of bounds.
[SM] Blaming: sm_hosties.smx
[SM] Call stack trace:
[SM]   [0] ReadPackCell
[SM]   [1] Line 3843, hosties/lastrequest.sp::InitializeGame
[SM]   [2] Line 3688, hosties/lastrequest.sp::MainAskHandler

Plugin version

sm plugins info sm_hosties
  Filename: sm_hosties.smx
  Title: SM_Hosties v2 (Hosties/jailbreak plugin for SourceMod)
  Author: databomb & dataviruset & comando
  Version: 2.3.0
  URL: http://forums.alliedmods.net/showthread.php?t=108810
  Status: running
  Timestamp: 08/14/2017 16:24:01
  Hash: d7df2475a41f5d350bafb2c7d2395c95

Suggestions CVARs and API

Need CVARs enable/disable for each LR in SM_Hosties. Example, some types Knife Fight LR is not working on CSGO, and the menu entries are not needed.

And it would be good to do API for adding new types Knife Fight, example, 50 HP.

csgo issues

the "Rules" smx using number 0 to exit the rules menu,but number 0 isnt be able to used in CSGO.
(At least I look like this. : ) )

Bug

In LastRequest_WeaponFire in hosties/lastrequest.sp

public LastRequest_WeaponFire(Handle:event, const String:name[], bool:dontBroadcast)
{
    ...
    else if (type == LR_Shot4Shot)
    {
        ...
        if (StrEqual(LR_WeaponName, FiredWeapon)) // This line
        {
            ...
        }
        ...
    {
    ...
}

In CSGO different weapons can have same class, like: revolver->deagle; usp_silencer->hkp2000. You can't play S4S using Revolver and USP-S — you will be killed after the first shot.

EventDay toggle Error, Need Help to fix it

L 07/23/2020 - 14:57:40: [MyJailbreak/eventday_toggle.smx] ConVar 'sm_afk_enable' not found! Can't set value '0' on Event Day start
L 07/23/2020 - 14:57:40: [eventday_toggle.smx] ConVar 'sm_afk_enable' not found! Can't set value '0' on Event Day start

IP Change

@dataviruset can you change the variable (B_FTP_HOST) on travis to "ftp.csgottt.com"? I plan a hosting change with a new ip (and a subdomain is one of the best solution).

Data packs in SM 1.10

Pls fix this

[SM] Exception reported: Invalid data pack position, 24 is out of bounds (18)
[SM] Blaming: sm_hosties.smx
[SM] Call stack trace:
[SM]   [0] SetPackPosition
[SM]   [1] Line 1627, hosties/lastrequest.sp::LastRequest_PlayerJump

Error trying to compile lastrequest.sp please help

Hello guys, i get this mensage when i try to compile lastrequest.sp.

//SourceMod Batch Compiler
// by the SourceMod Dev Team

//// lastrequest.sp
//
// C:\Users\ktm-t\Desktop\smod\addons\sourcemod\scripting\lastrequest.sp(283) : error 017: undefined symbol "MAX_DISPLAYNAME_SIZE"
// C:\Users\ktm-t\Desktop\smod\addons\sourcemod\scripting\lastrequest.sp(283) : error 009: invalid array size (negative, zero or out of bounds)
// C:\Users\ktm-t\Desktop\smod\addons\sourcemod\scripting\lastrequest.sp(669) : error 017: undefined symbol "TopMenuAction_DisplayOption"
// C:\Users\ktm-t\Desktop\smod\addons\sourcemod\scripting\lastrequest.sp(673) : error 017: undefined symbol "TopMenuAction_SelectOption"
// C:\Users\ktm-t\Desktop\smod\addons\sourcemod\scripting\lastrequest.sp(723) : error 017: undefined symbol "MAX_DISPLAYNAME_SIZE"
// C:\Users\ktm-t\Desktop\smod\addons\sourcemod\scripting\lastrequest.sp(723) : error 009: invalid array size (negative, zero or out of bounds)
// C:\Users\ktm-t\Desktop\smod\addons\sourcemod\scripting\lastrequest.sp(723) : error 036: empty statement
// C:\Users\ktm-t\Desktop\smod\addons\sourcemod\scripting\lastrequest.sp(723) : fatal error 190: too many error messages on one line
//
// Compilation aborted.
// 8 Errors.
//
// Compilation Time: 0,42 sec
// ----------------------------------------

Press enter to exit ..

Separation of cvar

sm_hosties_mute_immune-->
1)sm_hosties_mute_immune_death
2)sm_hosties_mute_immune_start_round

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.