Raised This Month: $32 Target: $400
 8% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Lamphanger
Junior Member
Join Date: Dec 2010
Old 01-04-2011 , 17:21   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #581

Can you make something that I can disable the freekill sound. I'm getting lame of it xD
Lamphanger is offline
dataviruset
AlliedModders Donor
Join Date: Feb 2009
Location: Hong Kong
Old 01-04-2011 , 17:50   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #582

Quote:
Originally Posted by Lamphanger View Post
Can you make something that I can disable the freekill sound. I'm getting lame of it xD
Just set the convar to -1.
dataviruset is offline
Lamphanger
Junior Member
Join Date: Dec 2010
Old 01-04-2011 , 17:51   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #583

Quote:
Originally Posted by dataviruset View Post
Just set the convar to -1.
Omfgz me <3zz you :O
Lamphanger is offline
SpazShot
Senior Member
Join Date: Nov 2009
Old 01-04-2011 , 18:18   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #584

Quote:
Originally Posted by karil View Post
I've had those problems too, but stopped having them when I updated SDKtools. Try that. Of course I mean the gamedata files.
The last time I updated the gamedata for SDKHOOKS was when the valve update broke everything.
SpazShot is offline
dataviruset
AlliedModders Donor
Join Date: Feb 2009
Location: Hong Kong
Old 01-04-2011 , 19:15   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #585

Quote:
Originally Posted by Lamphanger View Post
Omfgz me <3zz you :O


Quote:
Originally Posted by SpazShot View Post
The last time I updated the gamedata for SDKHOOKS was when the valve update broke everything.
Please double check again, it should work...
dataviruset is offline
SpazShot
Senior Member
Join Date: Nov 2009
Old 01-05-2011 , 17:51   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #586

Quote:
Originally Posted by dataviruset View Post
Please double check again, it should work...
I have double checked, updated the SDK HOOKS gamedata file again still same results.
SpazShot is offline
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 01-06-2011 , 01:12   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #587

datavirusset, for the S4S OnGameFrame code.. what do you think about moving this to a weapon_fire event instead to ease things? I started re-coding this but will send this over to you if it tests out ok.
databomb is offline
dataviruset
AlliedModders Donor
Join Date: Feb 2009
Location: Hong Kong
Old 01-06-2011 , 11:19   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #588

Quote:
Originally Posted by databomb View Post
datavirusset, for the S4S OnGameFrame code.. what do you think about moving this to a weapon_fire event instead to ease things? I started re-coding this but will send this over to you if it tests out ok.
Good initiative, I know the S4S code needs optimization, but I remember I tried to use the weapon_fire event instead of coding the whole ammo part myself, but it somehow failed. I would be pleased to see what you've come up with, though
dataviruset is offline
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 01-07-2011 , 15:54   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #589

Quote:
Originally Posted by dataviruset View Post
Good initiative, I know the S4S code needs optimization, but I remember I tried to use the weapon_fire event instead of coding the whole ammo part myself, but it somehow failed. I would be pleased to see what you've come up with, though
First, thanks for writing this plugin dataviruset, this has the most LR choices I've ever seen and it took much ingenuity and time to build. So I re-did the OnGameFrame code in the weapon_fire event and so far testing looks good. One other change I made was to only give 1 bullet so you can't rebel during s4s.

PHP Code:
public Action:Event_WeaponFire(Handle:event, const String:name[], bool:dontBroadcast)
{
    if (
LRinprogress)
    {
        if ((
s4s_doubleshot_action != 0) && (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))
                {
                    
// take varying action against the perp based on convars
                    
S4SRebelAction(client);
                }
                
// firing weapon IS a deagle
                
else
                {
                    
// 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)
                    {
                        
S4SRebelAction(client);
                    }
                    
S4Slastshot client;
                    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 player 2s ammo
                        
new iWeapon GetEntDataEnt2(LRprogressplayer2FindSendPropInfo("CCSPlayer""m_hActiveWeapon"));
                        
SetEntData(iWeaponFindSendPropInfo("CBaseCombatWeapon""m_iClip1"), 1);
                        
LogMessage("gave player 2 another bullet");
                    }
                    else if (
client == LRprogressplayer2)
                    {
                        
// modify player 1s ammo
                        
new iWeapon GetEntDataEnt2(LRprogressplayer1FindSendPropInfo("CCSPlayer""m_hActiveWeapon"));
                        
SetEntData(iWeaponFindSendPropInfo("CBaseCombatWeapon""m_iClip1"), 1);
                        
LogMessage("gave player 1 another bullet");
                    }
                }                
            }
        } 
//end if LR s4s and punishment convar set
    
// end if LR in progress
    
return Plugin_Continue;
// end Event_WeaponFire 
And with the LaunchLR function I changed some code for the S4S case to make it more like the hot potato with a random starter

PHP Code:
            StripAllWeapons(LRprogressplayer1);
            
StripAllWeapons(LRprogressplayer2);

            
S4Slastshot 0;

            
// give knives and deagles
            
GivePlayerItem(LRprogressplayer1"weapon_knife");
            
GivePlayerItem(LRprogressplayer2"weapon_knife");
            new 
S4Sdeagle1 GivePlayerItem(LRprogressplayer1"weapon_deagle");
            new 
S4Sdeagle2 GivePlayerItem(LRprogressplayer2"weapon_deagle");

            
// set secondary ammo
            // randomize who starts first
            
new s4sPlayerFirst GetRandomInt(01);
            if (
s4sPlayerFirst == 0)
            {
                
SetEntData(S4Sdeagle1FindSendPropInfo("CBaseCombatWeapon""m_iClip1"), 0);
                
SetEntData(S4Sdeagle2FindSendPropInfo("CBaseCombatWeapon""m_iClip1"), 1);
                
LogMessage("gave bullet to deagle 2");        
            }
            else
            {
                
SetEntData(S4Sdeagle1FindSendPropInfo("CBaseCombatWeapon""m_iClip1"), 1);
                
SetEntData(S4Sdeagle2FindSendPropInfo("CBaseCombatWeapon""m_iClip1"), 0);            
                
LogMessage("gave bullet to deagle 1");
            } 
if I missed something I will send you the full SP file.
databomb is offline
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 01-07-2011 , 15:59   Re: [CSS] SM_Hosties (v1.11)
Reply With Quote #590

already I'm forgetful..

this is the S4SRebelAction function, I think I also had to add some lines in the translations file because I forgot to take out the MESS part.

PHP Code:
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;                
                    }

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 23:28.


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