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

TerminateRound trouble!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
I'mSane
Member
Join Date: Apr 2010
Location: SPb, Russia
Old 05-26-2011 , 06:34   TerminateRound trouble!
Reply With Quote #1

Hi all! I can't find out what's wrong!
Somehow my plugin can't terminate the round!

gamedata/sm-cstrike.games.txt:
PHP Code:
"Games"
{
    
"cstrike"
    
{
        
"Signatures"
        
{
            
"RoundRespawn"
            
{
                
"library"    "server"
                "windows"    "\x55\x8B\xEC\x51\x89\x2A\x2A\x8B\x2A\x2A\x8B\x10\x8B"
                "linux"        "@_ZN9CCSPlayer12RoundRespawnEv"
            
}
            
"SwitchTeam"
            
{
                
"library"    "server"
                "windows"    "\x55\x8B\xEC\x83\xEC\x2A\x89\x4D\x2A\x8B\x45\x2A\x50\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\x85\xC0\x74"
                "linux"        "@_ZN9CCSPlayer10SwitchTeamEi"
            
}
            
"TerminateRound"
            
{
                
"library"    "server"
                "windows"    "\x83\xEC\x18\x53\x55\x8B\xD9\x8B\x4C\x24\x28\x56\x57\x33\xF6\x8D"
                "linux"        "@_ZN12CCSGameRules14TerminateRoundEfi"
            
}
        }
    }

From plugin:
(OnPluginStart):
PHP Code:
g_hGameConf LoadGameConfigFile("sm_cstrike.games");
StartPrepSDKCall(SDKCall_GameRules);
PrepSDKCall_SetFromConf(g_hGameConfSDKConf_Signature"TerminateRound");
PrepSDKCall_AddParameter(SDKType_FloatSDKPass_Plain);
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain);
g_hTerminateRound EndPrepSDKCall(); 
Function:
PHP Code:
EndRound(reason)
{
    if(
g_hTerminateRound == INVALID_HANDLE) return;
    
SDKCall(g_hTerminateRound0reason);

__________________
Sorry for noob questions.
Sorry for bad english.
I'mSane is offline
Send a message via Skype™ to I'mSane
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 05-26-2011 , 09:43   Re: TerminateRound trouble!
Reply With Quote #2

try this sig:
\x83\xEC\x2A\x53\x8B\x5C\x2A\x2A\x55\x56\x57\ x33\xF6\x8B\xE9\x33
miniman is offline
I'mSane
Member
Join Date: Apr 2010
Location: SPb, Russia
Old 05-26-2011 , 13:44   Re: TerminateRound trouble!
Reply With Quote #3

Hmm... I run Linux
Ohhh I'm not really understand SDK calls... Help me please!
__________________
Sorry for noob questions.
Sorry for bad english.

Last edited by I'mSane; 05-26-2011 at 14:12.
I'mSane is offline
Send a message via Skype™ to I'mSane
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 05-27-2011 , 05:45   Re: TerminateRound trouble!
Reply With Quote #4

g_hGameConf = LoadGameConfigFile("sm_cstrike.games");
seems like different to me
gamedata/sm-cstrike.games.txt
anyway if that was just a typo add LogError on each invalid handle
miniman is offline
I'mSane
Member
Join Date: Apr 2010
Location: SPb, Russia
Old 05-27-2011 , 07:37   Re: TerminateRound trouble!
Reply With Quote #5

This is when I load the plugin:
PHP Code:
L 05/27/2011 15:25:23: [SMError parsing gameconfig file "/home/cs/srcds70/orangebox/cstrike/addons/sourcemod/gamedata/sm_cstrike.games.txt.txt":
L 05/27/2011 15:25:23: [SMError 1 on line 0col 0Stream failed to open
L 05
/27/2011 15:25:23: [SMNative "LoadGameConfigFile" reportedUnable to open sm_cstrike.games.txtFile could not be openedNo such file or directory
L 05
/27/2011 15:25:23: [SMDisplaying call stack trace for plugin "god-resp.smx":
L 05/27/2011 15:25:23: [SM]   [0]  Line 29C:\sv1\orangebox\cstrike\addons\sourcemod\scripting\god-resp.sp::OnPluginStart()
[
SMLoaded plugin god-resp.smx successfully

WT*?!
sm_cstrike.games without .txt:
PHP Code:
L 05/27/2011 15:27:35: [SMError parsing gameconfig file "/home/cs/srcds70/orangebox/cstrike/addons/sourcemod/gamedata/sm_cstrike.games.txt":
L 05/27/2011 15:27:35: [SMError 1 on line 0col 0Stream failed to open
L 05
/27/2011 15:27:35: [SMNative "LoadGameConfigFile" reportedUnable to open sm_cstrike.gamesFile could not be openedNo such file or directory
L 05
/27/2011 15:27:35: [SMDisplaying call stack trace for plugin "god-resp.smx":
L 05/27/2011 15:27:35: [SM]   [0]  Line 29C:\sv1\orangebox\cstrike\addons\sourcemod\scripting\god-resp.sp::OnPluginStart()
[
SMLoaded plugin god-resp.smx successfully
__________________
Sorry for noob questions.
Sorry for bad english.

Last edited by I'mSane; 05-27-2011 at 07:40.
I'mSane is offline
Send a message via Skype™ to I'mSane
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 05-27-2011 , 07:44   Re: TerminateRound trouble!
Reply With Quote #6

its sm-cstrike.games NOT sm_cstrike.games
miniman is offline
I'mSane
Member
Join Date: Apr 2010
Location: SPb, Russia
Old 05-27-2011 , 08:01   Re: TerminateRound trouble!
Reply With Quote #7

xD yeah, error)
__________________
Sorry for noob questions.
Sorry for bad english.
I'mSane is offline
Send a message via Skype™ to I'mSane
I'mSane
Member
Join Date: Apr 2010
Location: SPb, Russia
Old 05-27-2011 , 08:04   Re: TerminateRound trouble!
Reply With Quote #8

No errors, but it can't end the round...
__________________
Sorry for noob questions.
Sorry for bad english.
I'mSane is offline
Send a message via Skype™ to I'mSane
I'mSane
Member
Join Date: Apr 2010
Location: SPb, Russia
Old 05-27-2011 , 08:50   Re: TerminateRound trouble!
Reply With Quote #9

It ends the round! But it's strange. For example, when reason is 8 (counter-terrorists win) I can hear that "terrorist(!) win" sound, but:
1. Voice says only "Terr..."
2. Both Ts and CTs couldn't take any team scores, the score is not change.
__________________
Sorry for noob questions.
Sorry for bad english.
I'mSane is offline
Send a message via Skype™ to I'mSane
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 05-27-2011 , 10:21   Re: TerminateRound trouble!
Reply With Quote #10

most likely you are ending it too early try 2.0 or higher
miniman 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 10:02.


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