Raised This Month: $ Target: $400
 0% 

prethink


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wonsae
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
Old 04-30-2006 , 19:44   prethink
Reply With Quote #1

hi i'm trying to prethink attack so it honks but it doesn't seem to work

Code:
public client_PreThink(id)     {     if(incar[id] != 0)         {         new bufferstop = entity_get_int(id,EV_INT_button)                 if(bufferstop != 0) {             entity_set_int(id,EV_INT_button,bufferstop & ~IN_ATTACK & ~IN_ATTACK2 & ~IN_ALT1 & ~IN_USE)         }                 if((bufferstop & IN_JUMP) && (entity_get_int(id,EV_INT_flags) & ~FL_ONGROUND & ~FL_DUCKING)) {             entity_set_int(id,EV_INT_button,entity_get_int(id,EV_INT_button) & ~IN_JUMP)         }         if(get_user_button(id) &IN_ATTACK){             honk(id)         }         if(equali(carmodel[id],"car_police")){             if(get_user_button(id) &IN_ATTACK2){                 siren(id)             }         }         if(get_user_button(id) &IN_JUMP){             uncar(id)         }         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE }

and heres the honk part

Code:
public honk(id) {     if(incar[id] != 1) return PLUGIN_HANDLED     emit_sound(id, CHAN_ITEM, "carmod/car_horn.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     return PLUGIN_HANDLED }
wonsae is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 04-30-2006 , 21:43  
Reply With Quote #2

Code:
if(bufferstop != 0) {
            entity_set_int(id,EV_INT_button,bufferstop & ~IN_ATTACK & ~IN_ATTACK2 & ~IN_ALT1 & ~IN_USE)
        }
here you are removing attack, attack2 and 2 more so
Code:
if(get_user_button(id) &IN_ATTACK)
and
Code:
if(get_user_button(id) &IN_ATTACK2)
is always false
__________________
alias White Panther
karlos 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 10:29.


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