Raised This Month: $ Target: $400
 0% 

How to detect Game_Commencing in CSS


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tramp
Senior Member
Join Date: Aug 2005
Old 03-16-2009 , 18:23   How to detect Game_Commencing in CSS
Reply With Quote #1

Hi,

In CS 1.6 it was easy. There were such event to register in plugin init. But how to detect it in CSS?

I found one function but i'm not sure if it is okay.

http://docs.sourcemod.net/api/index....d=show&id=897&

Code:
public Action:GameLogHook("Game_Commencing");{
// some code on Game_Commencing event
}
Will it work?

#########
EDIT
#########

Ok, i found GetEventInt(event, "reason") == 16
so my problem is solved.

but how can i use GameLogHook, could somebody give me example?
Thanks
__________________
STER-Gaming.pl - The Best Multigaming Club, CS 1.6, CS:S, ET, COD 2 more and more ! Check forum forum.ster-gaming.pl

amxmodx - Polish support about amxx.

Last edited by Tramp; 03-16-2009 at 21:20.
Tramp is offline
grif_ssa
BANNED
Join Date: Apr 2008
Old 03-17-2009 , 02:15   Re: How to detect Game_Commencing in CSS
Reply With Quote #2

does it helps?

Code:
public OnPluginStart()
{
...
AddGameLogHook(LogEvent);
...
}

public Action:LogEvent(const String:message[]) {
...
if(blabla)
   return Plugin_Handled;
...

return Plugin_Continue;
}
grif_ssa is offline
Send a message via ICQ to grif_ssa
Tramp
Senior Member
Join Date: Aug 2005
Old 03-17-2009 , 19:16   Re: How to detect Game_Commencing in CSS
Reply With Quote #3

Thanks bro
__________________
STER-Gaming.pl - The Best Multigaming Club, CS 1.6, CS:S, ET, COD 2 more and more ! Check forum forum.ster-gaming.pl

amxmodx - Polish support about amxx.
Tramp 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 06:54.


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