How to fix damage weapons
#1

Cant you tell me how to fix damage weapons??
E.g: I want fix damage weapons deagle 46 down 23
Please tell me the principle of their operation
Reply
#2

There are many ways to implement custom damage, which is what you'd be doing. Search "SA-MP custom damage" and you can find many different results on potential options. One way is setting all players to the same team and manually giving damage for all weapons (note some things are still a hard-coded death; vehicle explosion and some others).
Reply
#3

PHP код:
#define deagle_damage 23
public OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart)
{
    if(
issuerid != INVALID_PLAYER_ID && weaponid == 24)
    {
        new 
Float:hpFloat:apFloat:damageleft;
        
GetPlayerArmour(playeridap);
        
GetPlayerHealth(playeridhp);
        if(
ap deagle_damage)
        {
            
damageleft deagle_damage ap;
            
SetPlayerArmour(playerid0);
            
SetPlayerHealth(playeridhp-damageleft);
            return 
1;
        }
        
SetPlayerHealth(playeridhp+amount);
        
SetPlayerHealth(playeridhp-deagle_damage);
    }
    return 
1;

I believe it could cause bugs, I'd recommend you in this case to just create server-sided HP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)