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

[CS:GO] Zeus Round


Post New Thread Reply   
 
Thread Tools Display Modes
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 01-27-2013 , 11:43   Re: [CS:GO] Zeus Round
Reply With Quote #121

from what Miraculix said, bot_takeover event never fires, but I'll verify later today if you want.

I don't think I'm setting m_bIsControllingBot, i'm just retrieving the information:

PHP Code:
new g_bIsControllingBot = -1;

public 
OnPluginStart()
{
    
g_bIsControllingBot FindSendPropInfo("CCSPlayer""m_bIsControllingBot");
    
    if (
g_bIsControllingBot == -1)
    {
        
SetFailState("Unable to locate m_bIsControllingBot");
    }
}

/**
 * Check if a player is controlling a bot
 * @param    client    Player's ClientID
 * @return 1 if player is controlling a bot or 0 if player is not controlling a bot
 */
IsPlayerControllingBot(client)
{
    return 
GetEntData(clientg_bIsControllingBot1); 

Then all I do is check
PHP Code:
if (IsPlayerControllingBot(client)) 
__________________
View my Plugins | Donate
TnTSCS is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 01-27-2013 , 16:32   Re: [CS:GO] Zeus Round
Reply With Quote #122

No I didn't say you were changing it, I was just warning that it breaks the game in funny ways. =P

And I'm pretty sure bot_takeover still fires, I tested it last night.
__________________
Sheepdude is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 01-27-2013 , 23:54   Re: [CS:GO] Zeus Round
Reply With Quote #123

Yes, just tested... event bot_takeover fires. Depending on the desired end result, using the event or checking the value of m_bIsControllingBot works... for this plugin, checking the status of m_bIsControllingBot should suffice...

I'll have to do some checking to see what is faster:

1. Use client bool and set to true when event bot_takeover fires and reset to false when they die or respawn (start of new match). Check the status of that client bool before doing/allowing code

or

2. Check the value of m_bIsControllingBot before doing/allowing code

My guess is 2 would be faster to execute and simpler to work with (not having to track the client bool).
__________________
View my Plugins | Donate
TnTSCS is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 01-28-2013 , 03:39   Re: [CS:GO] Zeus Round
Reply With Quote #124

Very fun, great work TnTSCS!
hamilton5 is offline
eambielli
New Member
Join Date: Feb 2013
Old 02-05-2013 , 12:48   Re: [CS:GO] Zeus Round
Reply With Quote #125

Would there be any way to possibly make it so that you can always set the first round to be a zeus round?
eambielli is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 02-05-2013 , 15:12   Re: [CS:GO] Zeus Round
Reply With Quote #126

Quote:
Originally Posted by eambielli View Post
Would there be any way to possibly make it so that you can always set the first round to be a zeus round?

if only there was a cfg that exec every map change you could slip sm_zeusround 1 in there :rollseyes:
hamilton5 is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 02-05-2013 , 18:54   Re: [CS:GO] Zeus Round
Reply With Quote #127

teehee
__________________
View my Plugins | Donate
TnTSCS is offline
IcEWoLF
Senior Member
Join Date: Jul 2007
Old 02-05-2013 , 21:05   Re: [CS:GO] Zeus Round
Reply With Quote #128

I would love to see Zeus Round at the beginning of every map, then pistol rounds and then the normal rounds.
__________________
The 47 Ronin Gaming - http://www.47r-squad.com


IcEWoLF is offline
Nolongerinthegame
AlliedModders Donor
Join Date: Sep 2005
Old 02-06-2013 , 14:14   Re: [CS:GO] Zeus Round
Reply With Quote #129

Got this errror:

L 02/06/2013 - 19:12:44: SourceMod error session started
L 02/06/2013 - 19:12:44: Info (map "de_mirage_csgo") (file "errors_20130206.log")
L 02/06/2013 - 19:12:44: [SM] Native "AcceptEntityInput" reported: Entity 202 (202) is not a CBaseEntity
L 02/06/2013 - 19:12:44: [SM] Displaying call stack trace for plugin "zeusround.smx":
L 02/06/2013 - 19:12:44: [SM] [0] Line 967, C:\Sourcemod\TnTSCS\scripting\zeusround.sp::O nWeaponDrop()

Using 0.0.2.4.

I was not on the server, it happened a few mins ago.
Nolongerinthegame is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 02-06-2013 , 22:15   Re: [CS:GO] Zeus Round
Reply With Quote #130

nelioneil, thanks for this... I see this is the second time you've reported it.

I'm going to request that a more senior SourceMod plugin developer look at the below code and see why this would throw that error even though I check if the entity is valid

PHP Code:
public Action:OnWeaponDrop(clientweapon)
{
    if (
IsZeusRound && CleanUpZeus)
    {
        if (!
IsValidEntity(weapon))
        {
            return 
Plugin_Continue;
        }
        
        
decl String:sWeapon[MAX_WEAPON_STRING];
        
sWeapon[0] = '\0';
        
        
GetEntityClassname(weaponsWeaponsizeof(sWeapon));
        
        if (
StrEqual(sWeapon"weapon_taser"false))
        {
            
RemoveEdict(weapon);
            
AcceptEntityInput(weapon"kill"); // line 967
        
}
    }
    
    return 
Plugin_Continue;

Is there something different about weapon_taser when a client drops it? I know after it's fired it is auto dropped so unless there's another plugin or metamod plugin that is cleaning edicts, this error should not be thrown, right?
__________________
View my Plugins | Donate
TnTSCS 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 11:06.


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