PDA

View Full Version : howto text on round start?



coolboy
01-02-08, 01:11
got a question :)
how the title says .....
well i found in client.dll the var "round_start". i tried to coding in this way. it doesnt work :( ... maybe i do a mistake or maybe it doesnt work in this way.
so i hope some1 can post the code what i search for.
ty

Helo
01-02-08, 02:08
i think you could make it with the game event manager ...
like:

base.m_pGameEventManager->AddListener( this, "round_start", false );

....

Helo

coolboy
01-02-08, 04:24
base.m_pGameEventManager->AddListener( this, "round_start", false );


what youre meaning with -this- ?
cant you post the complete code (with the say command)?
anyway ty

Helo
01-02-08, 05:44
learn coding ... you so noob ....

sry for that but.

Helo

STR
02-02-08, 01:49
base.m_pGameEventManager->AddListener( this, "round_start", false );
rofl

Helo
02-02-08, 11:40
he should use the game event manager i mean ... that?s not all src but there enought pubplic src?s to make that... like statsbox etc.
like mine:
http://img3.imagebanana.com/img/lnwj7z4z/thumb/statb.PNG (http://img3.imagebanana.com/view/lnwj7z4z/statb.PNG)

and with that game eventmanager you could make very many things
like: weapon_fire, bomb_begindefuse, round_start,player_hurt,door_moving,
flashbang_detonate,hegrenade_detonate,grenade_boun ce,
item_pickup,weapon_zoom,vip_killed,vip_escaped,hos tage_rescued_all,

that only a little part ... there are many more events...
then you could make autobuy, warning systems .... i don?t know so much...


Helo

coolboy
02-02-08, 01:12
ty but you write a long text ... why do you cant post that what i need?
like:
roundstart.cpp

TEXT
roundstart.h

TEXT

Helo
02-02-08, 02:42
because so easy it is?nt, and so you make perhaps c&p and you learn not so much ... look in all public src?s in some usefull parts.

Helo

coolboy
02-02-08, 05:55
yea i could do it but i dont find a source code with this function ...
maybe you know a hack source for css with it?
ty

Boss30
07-02-08, 05:32
If im not mistaken with the new 06 SDK i believe that the IGameEventManager is not to be used as it catches all events, you can use the new IGameEventManager2 to catch and register only the events you want server or client side.

STR
07-02-08, 06:32
css used 002 so obviously its not gonna work without 002. and you dont need to register any events unless you want player damage done etc, all you need to do is hook fireevent then check for round_start.

Boss30
07-02-08, 12:18
ty for clarification. Proofens as always...lol

coolboy
17-02-08, 11:01
i think you could make it with the game event manager ...
like:

base.m_pGameEventManager->AddListener( this, "round_start", false );

....

Helo

howto make it ? something like this?

if(mybase.m_pGameEventManager->AddListener( this, "round_start", false ))
mybase.m_pEngine->ClientCmd("say round started");

or howto?

ps: sry for replying this thread.

Helo
18-02-08, 04:19
hm k...

so first you must add a listener, that the hack listen for the gameevent ...



void Hookeventmanager::Register(void)
{

basename.m_pGameEventManager->AddListener( this, "round_start", false );
}


so now you must activate the event_recording



void Hookeventmanager::FireGameEvent( IGameEvent *event )
{
basename.m_pCEvents->do_event_recording(event);
}


then you must do something if the listener have found something...



void cEvents::do_event_recording( IGameEvent *event )
{
LPSTR eventName = (LPSTR)event->GetName();
const char* szEventName = event->GetName( );

if (eventName)
{

if(!strcmp( eventName, "round_start" ) )
{
basename.m_pEngine->ClientCmd("kp ...");
}
}
}


and here to call the listener...



void Hookeventmanager::InstallHooks(void)
{
gHookeventmanager.Register();
}


and don?t forget to make in the .h:
extern Hookeventmanager gGameEventManager;

for the gHookeventmanager.Register();


and now we must call the funktions,
do it once like FontInt .



basename.m_pHookeventmanager->InstallHooks();


so ready ... should be working.

i know that Fum1n have a src for that on his server, or just look in the SI Reborn Src there is all the stuff too.

Helo

coolboy
18-02-08, 04:49
ty very much for reply
rofl i must laugh about myself because all you say that its really simple to make that .... but i'm new at this "buessnis"^^
Which of these codes must i add to which file? oh ... please help because im really became crazy because i cant do that :((((((( helo and other members of this site youre my last hope :) i think its not wrong to help a newbie like me right?:)
ty

Sparky18m
19-02-08, 07:04
if u wanna "code" ur own roundsay u have to learn to code, theres no other way.
everything else is just "copy pasting"/stealing others codes.

coolboy
20-02-08, 04:43
k ive done it juhuu :) with an other source code... but ty helo