AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   detect changelevel (https://forums.alliedmods.net/showthread.php?t=60592)

Exolent[jNr] 09-07-2007 21:16

detect changelevel
 
ive searched and came up with some ideas,
but im still not certain.

heres what i got:

Style A:
Code:
#include <amxmodx> public plugin_init() {    register_srvcmd("changelevel", "srvcmd_changelevel"); }


Style B:
Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {    register_forward(FM_ChangeLevel, "fm_ChangeLevel", 0); }


Style C: (which i don't understand much of)
http://forums.alliedmods.net/showthread.php?t=54029


im not sure on which ones will work and if more than one does, which one is better...

help? :D

X-Script 09-07-2007 21:21

Re: detect changelevel
 
In my opinoin i'd used Fakemeta:
PHP Code:

 register_forward(FM_ChangeLevel"fm_ChangeLevel"0); 


Exolent[jNr] 09-07-2007 21:23

Re: detect changelevel
 
well id rather use fakemeta cause its hawt.

but my plugin doesnt use fakemeta so does the "register_srvcmd" one work?

X-Script 09-07-2007 21:25

Re: detect changelevel
 
What do you mean it doesn't use fakemeta?
Just include fakemeta in your #includes and use the function.

I don't know if the srvcmd will work, never tried it that way.

ConnorMcLeod 09-07-2007 22:00

Re: detect changelevel
 
I guess if you just want to catch it, you can use :
Code:
register_event("30", "changeMap", "a")

I you wana hook i don't know :P

X-Script 09-07-2007 22:01

Re: detect changelevel
 
Good connorr, yes you could use that withouth having to include any modules.


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

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