Raised This Month: $ Target: $400
 0% 

Use button


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-01-2010 , 09:09   Re: Use button
Reply With Quote #2

When doing a bit-operation, make sure to use the correct operator: && should be &. I highlighted the lines where this correction is needed.
Code:
public FwdCmdStart(id, uc_handle, seed) {     if(!is_user_alive(id))         return FMRES_IGNORED             new button = get_user_button(id)     new oldbutton = get_user_oldbutton(id)             if (zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_smoker)     {         if ((button & IN_USE) && (oldbutton && IN_USE))             drag_start(id)                 if ((!button & IN_USE) && (oldbutton & IN_USE))             drag_end(id)     }         if (zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_charger)     {         if ((button & IN_USE) && (oldbutton && IN_USE))         {             set_task(0.1, "charger_push", id)         }     }         new distance     get_user_aiming(id, aimed, body, distance);         if (zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_jockey)     {         if ((button & IN_USE) && (oldbutton && IN_USE))         {             if(distance < 25.0)             {                 if (is_user_alive(aimed) && zp_get_user_zombie(aimed))                 {                     set_user_health(aimed, get_user_health(aimed) + 500)                 }             }         }     } }
__________________
Bugsy is offline
 



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 00:16.


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