[Ajuda] o meu sistema ta bugdo
#1

a public OnPlayerGiveDamage esta toda bugadona a vida nao sai podem me ajudar?

CODE

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloat:amountweaponid)
{
    if(
Aj[playerid] == false && GetPlayerSpecialAction(playerid) == 2) return SetPlayerHealth(playerid,0);
    switch(
weaponid)
    {
        case 
24amount 32;
    }
    if(
Morto[damagedid] == true) return 1;
    if(
Lagduel[damagedid] == true) return 1;
    
PlayerPlaySound(damagedid,6401,0,0,0);
    new 
Float:LifeFloat:ColeeteFloat:Dano;
    
GetPlayerArmour(damagedid,Coleete);
    
GetPlayerHealth(damagedid,Life);
    if(
Coleete 0)
    {
        if(
amount Coleete)
        {
            
Dano amount Coleete;
            
Life Life Dano;
            
SetPlayerArmour(damagedid0.0);
            
SetPlayerHealth(damagedidLife);
            
SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 2);
            return 
1;
        }
        
SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 2);
        
Coleete Coleete amount;
        
SetPlayerArmour(damagedidColeete);
    }
    if(
Coleete 1)
    {
        
Life Life amount;
        
SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 2);
        
SetPlayerHealth(damagedidLife);
        if(
Life <= 0)
        {
            
Morto[damagedid] = true;
            
SendDeathMessage(playerid,damagedid,weaponid);
            
DeadPlayer(damagedid,playerid,weaponid);
        }
    }
    return 
1;

OBS NAO QUERIA NADA DISSO COMPLICADO PODEM FAZER SIMPLES PQ SE EU RETIRAR A PUBLIC A VIDA NAO SAI DO PLAYER E MESMO ASSIM NAO SAI PODEM ME AJUDA PFF?
Reply


Messages In This Thread
o meu sistema ta bugdo - by HelderPT - 21.03.2018, 22:02
Re: o meu sistema ta bugdo - by Injury - 21.03.2018, 22:09
Re: o meu sistema ta bugdo - by JohnBlack - 21.03.2018, 22:10
Re: o meu sistema ta bugdo - by Injury - 21.03.2018, 22:12
Re: o meu sistema ta bugdo - by HelderPT - 21.03.2018, 22:16
Re: o meu sistema ta bugdo - by JohnBlack - 21.03.2018, 22:19
Re: o meu sistema ta bugdo - by Injury - 21.03.2018, 22:19
Re: o meu sistema ta bugdo - by Injury - 21.03.2018, 22:24
Re: o meu sistema ta bugdo - by Felipealves - 22.03.2018, 07:06
Re: o meu sistema ta bugdo - by HelderPT - 22.03.2018, 18:52

Forum Jump:


Users browsing this thread: 4 Guest(s)