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

Fireevent for game over?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 11-14-2010 , 22:05   Fireevent for game over?
Reply With Quote #1

My brain is fried.....

Is there a way to fireevent in a way to end the map and force a mapchange, rather than using changelevel to change it? I couldnt think if that is possible or not....

Like how at the end of maptime, it displays the scoreboard and gives a slight delay before changing the map?
__________________
retsam is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 11-14-2010 , 22:11   Re: Fireevent for game over?
Reply With Quote #2

Firing the event game_over won't do anything as you guessed.

You can call CMultiplayRules::EndMultiplayerGame though and it will end the game, like gungame does. I happen to have some code to do it in linux:

Code:
    StartPrepSDKCall(SDKCall_GameRules);
    PrepSDKCall_SetSignature(SDKLibrary_Server, "@_ZN15CMultiplayRules18EndMultiplayerGameEv", 0);
    g_hEndGame = EndPrepSDKCall();
    if(g_hEndGame == INVALID_HANDLE)
    {
        SetFailState("Could not locate signature for CMultiplayRules::EndMultiplayerGame!");
        return;
    }
__________________
pheadxdll is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 11-14-2010 , 22:29   Re: Fireevent for game over?
Reply With Quote #3

Right. Ya I had already tried the fireevent game_over deal heh.

Ok cool. So...thats linux only huh? Happen to have sig for windows?

That is basically what I was looking for.
__________________
retsam is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 11-14-2010 , 23:08   Re: Fireevent for game over?
Reply With Quote #4

Try using these offsets, its a virtual function:

Windows: 118
Linux: 119

Edit: Just checked out gungame, it's exactly the same. It should work fine for you.
__________________

Last edited by pheadxdll; 11-14-2010 at 23:14.
pheadxdll is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 11-14-2010 , 23:15   Re: Fireevent for game over?
Reply With Quote #5

Thanks man, ill mess with it.
__________________
retsam is offline
Reply


Thread Tools
Display Modes

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 14:46.


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