AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem with Call Of Duty Class. (https://forums.alliedmods.net/showthread.php?t=244014)

ViruSeQ 07-12-2014 16:43

Problem with Call Of Duty Class.
 
Hi. I have a problem with my class "Loki".
In this class ddnt work 1/1 of a knife.
This is new cod by qtm peyote
I define
PHP Code:

#include <hamsandwich> 
#define DMG_BULLET (1<<1) 

register
PHP Code:

    RegisterHam(Ham_TakeDamage"player","TakeDamage"); 

And public

PHP Code:

public TakeDamage(thisidinflictoridattackerFloat:damagedamagebits){
if(!
is_user_alive(idattacker))
return 
HAM_IGNORED;
 
if(!
ma_klase[idattacker])
return 
HAM_IGNORED;
 
if(
get_user_weapon(attacker) == CSW_KNIFE){
cs_set_user_armor(id0CS_ARMOR_NONE);
SetHamParamFloat(4float(get_user_health(id) + 1));
return 
HAM_HANDLED;
}
return 
HAM_IGNORED;


Full code

http://wklej.org/id/1415822/

Any sugestion? :C

HamletEagle 07-13-2014 06:11

Re: Problem with Call Of Duty Class.
 
Explain better what's the problem.....

ViruSeQ 07-13-2014 07:19

Re: Problem with Call Of Duty Class.
 
Quote:

In this class ddnt work 1/1 of a knife.
Well. I attack IN ATTACK(left mouse) and IN ATTACK 2(right mouse). Him still live, i ask why? This code give me 100% to kill him.


All times are GMT -4. The time now is 21:17.

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