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=48614)

Toster v2.1 12-16-2006 11:34

Events
 
How can I get events like when someone jumps or reloads???

[ --<-@ ] Black Rose 12-17-2006 18:24

Re: Events
 
You could catch reload with CurWeapon

And cathing jump on prethink checking player btns for IN_JUMP

FatalisDK 12-18-2006 02:12

Re: Events
 
Code:
#include <amxmodx> #include <fakemeta> #define PLUGIN "New Plugin" #define VERSION "0.1" #define AUTHOR "FatalisDK" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);         register_forward(FM_PlayerPreThink, "fwdPlayerPreThink", 0); } public fwdPlayerPreThink(id) {     if( pev(id, pev_button)&IN_JUMP     && !(pev(id, pev_oldbuttons)&IN_JUMP)     && pev(id, pev_flags)&FL_ONGROUND )     {         // Player jumped     } }

Toster v2.1 02-03-2007 11:20

Re: Events
 
Thx


All times are GMT -4. The time now is 06:49.

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