AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Events?!!? (https://forums.alliedmods.net/showthread.php?t=16858)

Obbin 08-21-2005 14:24

Events?!!?
 
i dont really get this width events! (I have readed the doc)

If i want to start a function every time a player respawns, dissconnects and connects, how do i do?

DahVid 08-21-2005 14:27

public client_spawn()
{
Shit
}

public client_connect()
{
Shit
}

public client_disconnect()
{
Shit
}

public client_putinserver() //happens when they are actually IN the server.
{
Shit
}

Obbin 08-21-2005 14:57

THX that worked!
+1karma for you

but how to start an function every new round

xeroblood 08-21-2005 15:11

Code:
#include <amxmodx> public plugin_init() {     register_logevent( "Event_RoundStart", 2, "0=World triggered", "1=Round_Start" );     register_logevent( "Event_RoundEnd",   2, "0=World triggered", "1=Round_End" ); } public Event_RoundStart() {     // Do Stuff..     return PLUGIN_CONTINUE; } public Event_RoundEnd() {     // Do Stuff..     return PLUGIN_CONTINUE; }

XxAvalanchexX 08-21-2005 15:14

Hmm, client_spawn is in ns.inc -- it would be better put to use in amxmodx.inc

xeroblood 08-21-2005 15:32

I would have to agree with you on that Avalanche! I just looked and I coulda swore I'd seen it in another include before, but I couldn't find it! Very weird I must say! :?

Twilight Suzuka 08-22-2005 04:53

Different mods have different spawn catches.

xeroblood 08-22-2005 11:52

:roll: Obviously..

algee2005 08-22-2005 14:08

when im not mistaken, spawning in cs is done via an event called ResetHud or something like this, i think i have seen it in wc3xp mod...

XxAvalanchexX 08-22-2005 15:17

Quote:

Originally Posted by Twilight Suzuka
Different mods have different spawn catches.

client_spawn just checks when the deadflag goes from something above 0 to 0, which I suppose could be done without a module, but it would be simpler to put it in the default amxmodx module as a forward.


All times are GMT -4. The time now is 14:28.

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