[Include] Detect Weapon Butt Attack
#5

Quote:
Originally Posted by whitetigerswt
Посмотреть сообщение
the problem is sometimes a player who damages another one like this, it won't be synced on their screen and only the person you damaged's screen. to be honest, it's more practical (imo) to just detect if a player did < 3 or so damage with any shootable, and IsPlayerInRangeOfPoint.
Yes with the sync he can have the bugs with this func and with not this func, example the player who give the damage see he give the "weapon butt attack" and the player who receive this damage see a fire, but this func is not for detect if its sync or not i just want to detect when the player have 1 at this 3 anims. Why?

It all depends on what the person want to do, an example if the player who give the damage see he give a weapon butt attack and the player who receive this damage a fire by an Desert Eagle, you cant cancel the damage at this Desert Eagle (you can SetHP but if you setHP < Damage its very bad visually). I think your system is not perfectly but i know with the sync SAMP we cant to do a system perfect sync but i want just detect this anims its better i think.

Quote:
Originally Posted by DeadSkyTkb
Посмотреть сообщение
It's simple, default damage or default in singleplayer butt attack is 2.64, which makes my code is to convert that damage you want.
Sorry for my bad english, i'm Argentinan.
Example for me.

PHP код:
switch(weaponid)
                       {
                            case 
15amount 12;
                            case 
4amount 40;
                            case 
5amount 12;
                               case 
22amount 18;
                            case 
28amount 8;
                            case 
29amount 10;
                            case 
32amount 9;
                            case 
33amount 40;
                            case 
34amount 50;
                        }
                           
armour armour amount;
                        if(
armour 0.0)
                        {
                              
health += armour;
                             if(
health <= 0.0)
                             {
                                
health 0.0;
                               }
                            
armour 0.0;
                         }
                         
SetPlayerHealthTakeDamage(playeridhealth); // My Func change this
                         
SetPlayerArmourTakeDamage(playeridarmour); // My Func change this
                    

But GetPlayerHealth/Armour is bad on OnPlayerTakeDamage look this post why: https://sampforum.blast.hk/showthread.php?tid=414939
Reply


Messages In This Thread
Detect Weapon Butt Attack - by HitnKill - 08.03.2013, 23:50
Re: Detect Weapon Butt Attack - by Whitetiger - 09.03.2013, 01:02
Respuesta: Detect Weapon Butt Attack - by Glimma - 09.03.2013, 01:08
Re : Detect Weapon Butt Attack - by LittleSamp - 09.03.2013, 10:24
Re : Detect Weapon Butt Attack - by HitnKill - 09.03.2013, 11:32

Forum Jump:


Users browsing this thread: 1 Guest(s)