Raised This Month: $ Target: $400
 0% 

Problem SOLVED.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 08-05-2011 , 08:31   Problem SOLVED.
Reply With Quote #1

I'm editing XP mod, so i have problem, and i don't know how to solve it.
If player choose class (Marine, Assassin, Predator, Sniper, or he has item number 8, he should kill with one knife stab (right click, ATTACK2)
Code:
if(player_item[idattacker][0] == 8 || (player_class[idattacker] == Sniper && random_num(1,2) == 1) || player_class[idattacker] == Marine || player_class[idattacker] == Predator || player_class[idattacker] == Assassin && (get_user_button(idattacker) & IN_ATTACK2))
damage = float(health);
I registered that code in
Code:
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
The problem is, that they can kill with one left click, slash
Any idea where is the problem??
I even tried to add this
Code:
!(get_user_button(idattacker) & IN_ATTACK)
but it didn't helped.
Only Assassin kills with one knife stab, not slash

Last edited by Arkshine; 08-05-2011 at 10:23. Reason: Don't delete your posts, you are not alone, give the solution instead.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
 



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 03:31.


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