Raised This Month: $ Target: $400
 0% 

Use button


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vechta
Veteran Member
Join Date: Jun 2010
Old 08-01-2010 , 13:43   Re: Use button
Reply With Quote #1

Thanks, but the problem is on all classes if im pressing E nothing happens
Vechta is offline
G[o]Q
Member
Join Date: Jan 2010
Location: Poland (Malopolska)
Old 08-02-2010 , 05:24   Re: Use button
Reply With Quote #2

Code:
if ((button & IN_USE) && (oldbutton != IN_USE))
G[o]Q is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-02-2010 , 08:46   Re: Use button
Reply With Quote #3

Quote:
Originally Posted by G[o]Q View Post
Code:
if ((button & IN_USE) && (oldbutton != IN_USE))
Wrong.

Code:
if ((button & IN_USE) && !(oldbutton & IN_USE))
Quote:
Originally Posted by meTaLiCroSS View Post
PHP Code:
if (zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_jockey)
{
    if ((
button IN_USE) && (oldbutton && IN_USE))
    {
        static 
aimed body
        
if( get_user_aiming(idaimedbody25) > 0.0 )
        {
            if ( 
is_user_alive(aimed) && zp_get_user_zombie(aimed) )
            {
                
set_user_health(aimedget_user_health(aimed) + 500)
            }
        }
    }

You also need to correct the double ampersand in the bit comparison.

(oldbutton & IN_USE)
__________________

Last edited by Bugsy; 08-02-2010 at 08:53.
Bugsy 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 00:16.


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