Raised This Month: $12 Target: $400
 3% 

[CS:S/CS:GO] SM_Hosties (v2.2.0, 2015-08-15)


Post New Thread Reply   
 
Thread Tools Display Modes
dataviruset
AlliedModders Donor
Join Date: Feb 2009
Location: Hong Kong
Old 03-19-2011 , 11:25   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #761

Quote:
Originally Posted by Annihilator View Post
Would you consider adding a native to check if a person is a rebel in the next release?
That would be cool, it's one of the things I would have added in some kind of 2.0 release. I'm not sure if I'm going to continue to develop this, though.
dataviruset is offline
Annihilator
Senior Member
Join Date: Nov 2006
Location: Lithuania
Old 03-20-2011 , 08:27   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #762

Well, if you added the rebel native (and some others maybe) then plugin makers could expand Hosties without editing the main plugin, all you would need to do is keep it up to date and from time to time tweak it
With the native I can see a possibility to make a Jail rank plugin or a credit system
Annihilator is offline
spec172
Junior Member
Join Date: Nov 2010
Old 03-20-2011 , 13:52   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #763

rebel rank
spec172 is offline
Groger
Veteran Member
Join Date: Oct 2009
Location: Belgium
Old 03-21-2011 , 13:02   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #764

sourcemod_fatal.log
Code:
L 03/18/2011 - 18:18:22: [SM] MEMORY LEAK DETECTED IN PLUGIN (file "sm_hosties.smx")
L 03/18/2011 - 18:18:22: [SM] Unloading plugin to free 15263 handles.
L 03/18/2011 - 18:18:22: [SM] Contact the author(s) of this plugin to correct this error.
Groger is offline
dataviruset
AlliedModders Donor
Join Date: Feb 2009
Location: Hong Kong
Old 03-21-2011 , 13:05   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #765

Quote:
Originally Posted by Groger View Post
sourcemod_fatal.log
Code:
L 03/18/2011 - 18:18:22: [SM] MEMORY LEAK DETECTED IN PLUGIN (file "sm_hosties.smx")
L 03/18/2011 - 18:18:22: [SM] Unloading plugin to free 15263 handles.
L 03/18/2011 - 18:18:22: [SM] Contact the author(s) of this plugin to correct this error.
UuhuhH???
dataviruset is offline
Groger
Veteran Member
Join Date: Oct 2009
Location: Belgium
Old 03-21-2011 , 14:11   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #766

Indeed,

I guess its a very very rare bug.
Groger is offline
Paparazziv2
Senior Member
Join Date: Feb 2011
Location: Chile, La Serena
Old 03-22-2011 , 18:51   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #767

gracias / THANKS!
Paparazziv2 is offline
Send a message via MSN to Paparazziv2
SpazShot
Senior Member
Join Date: Nov 2009
Old 03-23-2011 , 22:25   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #768

Code:
L 03/20/2011 - 21:40:35: SourceMod error session started
L 03/20/2011 - 21:40:35: Info (map "ba_jail_blackout_v10") (file "errors_20110320.log")
L 03/20/2011 - 21:40:35: [SM] Native "GetEntProp" reported: Entity 14 (14) is invalid
L 03/20/2011 - 21:40:35: [SM] Displaying call stack trace for plugin "sm_hosties.smx":
L 03/20/2011 - 21:40:35: [SM]   [0]  Line 556, K:\Dokumentbackup\Oskar\Source SDK-stuff\SourceMod-scripting\include\entity_prop_stocks.inc::GetClientButtons()
L 03/20/2011 - 21:40:35: [SM]   [1]  Line 1510, sm_hosties.sp::OnGameFrame()
L 03/20/2011 - 22:28:24: Error log file session closed.
Any idea what this means?
SpazShot is offline
dataviruset
AlliedModders Donor
Join Date: Feb 2009
Location: Hong Kong
Old 03-24-2011 , 13:07   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #769

Quote:
Originally Posted by SpazShot View Post
...
Any idea what this means?
It's an error that's been around for a while, I haven't come to the conclusion that it makes any mess, though.
dataviruset is offline
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 03-25-2011 , 11:10   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #770

I'm not sure why that is happening but here is an updated version for you to try.

Changes from 1.11:
OnGameFrame() code is removed in place of a Weapon_Fire event which tracks s4s
StripAllWeapons() uses AcceptEntityInput kill

S4S is changed:
- The starter is chosen at random and given 1 bullet.
- The next player does not get his bullet until the first person fires.
- If you use a deagle/weapon that is not part of the S4S LR then you're considered a rebel.

Main code added:
PHP Code:
public Action:Event_WeaponFire(Handle:event, const String:name[], bool:dontBroadcast)
{
    if (
LRinprogress)
    {
        
// shot 4 shot
        
if (LRtype == 1)
        {
            new 
client GetClientOfUserId(GetEventInt(event"userid"));
        
            
// check if an LR player made the shot
            
if ((LRprogressplayer1 == client) || (LRprogressplayer2 == client))
            {
                
decl String:FiredWeapon[32];
                
GetEventString(event"weapon"FiredWeaponsizeof(FiredWeapon));
                
                
// if firing weapon isn't a deagle
                
if ((StrContains(FiredWeapon,"deagle",false) == -1) && (s4s_doubleshot_action != 0))
                {
                    
// take varying action against the perp based on convars
                    
S4SRebelAction(client);
                }
                
// firing weapon IS a deagle
                
else
                {
                    
// get the entity index of the active weapon
                    
new iClientWeapon GetEntDataEnt2(clientFindSendPropInfo("CCSPlayer""m_hActiveWeapon"));                
                    
// check for double shot situation (if they picked up another deagle with more ammo between shots)
                    // person who fired last is the same as person who fired now
                    
if (S4Slastshot == client)
                    {
                        
// check if entity index is for either deagle spawned for S4S
                        
if ((iClientWeapon != S4Sdeagle1) && (iClientWeapon != S4Sdeagle2) && (s4s_doubleshot_action != 0))
                        {
                            
S4SRebelAction(client);
                        }
                    }
                    else 
// if we didn't repeat
                    
{
                        
// check if we're still at 1 ammo
                        // new currentammo = GetEntData(iClientWeapon, FindSendPropInfo("CBaseCombatWeapon", "m_iClip1"));
                        // LogMessage("current ammo is %i",currentammo);
                            
                        
if (GetConVarInt(sm_hosties_lr_s4s_shot_taken) == 1)
                        {
                            
PrintToChatAll(MESS"S4S Shot Taken"client);
                        }
                        
                        
// give the opposite LR player 1 bullet in their deagle
                        
if (client == LRprogressplayer1)
                        {
                            
// modify deagle 2s ammo
                            
SetEntData(S4Sdeagle2FindSendPropInfo("CBaseCombatWeapon""m_iClip1"), 1);
                            
//SetEntData(S4Sdeagle1, FindSendPropInfo("CBaseCombatWeapon", "m_iClip1"), 0);
                        
}
                        else if (
client == LRprogressplayer2)
                        {
                            
// modify deagle 1s ammo
                            
SetEntData(S4Sdeagle1FindSendPropInfo("CBaseCombatWeapon""m_iClip1"), 1);
                            
//SetEntData(S4Sdeagle2, FindSendPropInfo("CBaseCombatWeapon", "m_iClip1"), 0);
                        
}                
                    
                        
// update the ammo immediately! (thanks psychonic)
                        
ChangeEdictState(S4Sdeagle1FindSendPropInfo("CBaseCombatWeapon""m_iClip1"));
                        
ChangeEdictState(S4Sdeagle2FindSendPropInfo("CBaseCombatWeapon""m_iClip1"));

                    }
                    
S4Slastshot client;
                }                
            }
        } 
//end if LR s4s and punishment convar set
    
// end if LR in progress
    
return Plugin_Continue;
// end Event_WeaponFire

S4SRebelAction(client)
{
    
// take varying action against the perp based on convars
    
if (s4s_doubleshot_action == 2)
    {
        
ForcePlayerSuicide(client);
        
PrintToChatAll(MESS"S4S Rebel Slayed"client);
    }
    else
    {
        
// strip weapons from offender
        
StripAllWeapons(client);
        
        
PrintToChatAll(MESS"S4S Rebel Aborted"client);
        
        if (
GetConVarInt(sm_hosties_lr_beacon) == 1)
        {
            
KillLRBeacons();
        }
        
        
LRinprogress false;
        
S4Slastshot 0;                
    }

Attached Files
File Type: sp Get Plugin or Get Source (sm_hosties.sp - 89 views - 92.4 KB)
__________________
databomb is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode