Raised This Month: $ Target: $400
 0% 

trace question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-15-2007 , 03:30   Re: trace question
Reply With Quote #1

A little more complete.

Code:
    #include <amxmodx>     #include <fakemeta>         #define MAX_CLIENTS 32         new         g_iNormal_trace[ MAX_CLIENTS + 1 ],         g_iMaxClients;         public plugin_init()     {         register_forward( FM_TraceLine, "fwTraceline", 1 );         g_iMaxClients = global_get( glb_maxClients );     }         public client_connect( id )     {         g_iNormal_trace[id] = 0;     }     public client_disconnect( id )     {         g_iNormal_trace[id] = 0;     }       public fwTraceline( Float:start[3], Float:end[3], noMonsters, id, trace )     {         if( !( 1 <= id <= g_iMaxClients ) )             return FMRES_IGNORED;         if( !g_iNormal_trace[id] )         {             g_iNormal_trace[id] = trace;             return FMRES_IGNORED;         }         else if( trace == g_iNormal_trace[id] || !is_user_alive( id ) )             return FMRES_IGNORED;                 if( !pev( id, pev_button ) & IN_ATTACK ) )             return FMRES_IGNORED;                     // stuff                 return FMRES_IGNORED;     }


Also, you can look at this another method : http://forums.alliedmods.net/showthread.php?t=54887
__________________
Arkshine 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 01:12.


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