[Ajuda] jogador nгo morre ao cair do alto
#1

galera, to com um problema que nгo estou conseguindo resolver, o jogador estб com sua vida completa, e eu dou slap pra matar de queda mas ele nгo estб perdendo dano ao cair
prints


Reply
#2

Geralmente й algum Anti Cheater de Vida.
Reply
#3

Quote:
Originally Posted by JonathanFeitosa
Посмотреть сообщение
Geralmente й algum Anti Cheater de Vida.
nem tem ;\
Reply
#4

Manda a callback OnPlayerTakeDamage.
Reply
#5

Quote:
Originally Posted by JonathanFeitosa
Посмотреть сообщение
Manda a callback OnPlayerTakeDamage.
PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart)
{
    if(
issuerid != INVALID_PLAYER_ID && IsPlayerNPC(issuerid))
    {
        if(
weaponid == 0)
        {
            
pInfo[playerid][pBlood] -= 1;
        }
    }
    if(
issuerid != INVALID_PLAYER_ID)
    {
        if(
timerdamage[playerid] != 0KillTimer(timerdamage[playerid]);
        
hit[playerid]++;
        
damage2[playerid] += amount;
        
timerdamage[playerid] = SetTimerEx("DamageReset"30000"i"playerid);
        
PlayerTextDrawShow(playeridIndicatorBox[playerid]);
        
PlayerTextDrawShow(playeridIndicator[playerid]);
        new 
str[50];
        
format(str,sizeof(str),"~r~~h~HIT~w~: %d hit(s) -%.0f HP"hit[playerid], damage2[playerid]);
        
PlayerTextDrawSetString(playeridIndicator[playerid], str);
    }
    {
    new 
Float:hp;GetPlayerHealth(playerid,hp);
    if(
issuerid != INVALID_PLAYER_ID)
    {
        if(
weaponid != 0)
        {
            
FadePlayerScreen(playerid);
            if(
IsPlayerAimingTargetBodyPart(issueridplayeridBODY_PART_LEGS) || IsPlayerAimingTargetBodyPart(playeridplayeridBODY_PART_LEGS))
            {
                if(
pInfo[playerid][IsPlayerLegBroken] == 0)
                {
                    
pInfo[playerid][IsPlayerLegBroken] = 1;
                    
PlayerTextDrawShow(playeridLegBroken[playerid]);
                }
            }
            if(
pInfo[issuerid][pPremium] >= 4)
            {
                if(
weaponid == 25)
                {
                      new 
Float:pxFloat:py,Float:pz,Float:ix,Float:iy,Float:iz;
                    
GetPlayerPos(playeridpxpypz);
                    
GetPlayerPos(issueridixiyiz);
                    new 
Float:GetPlayerDistanceFromPoint(issueridpxpypz),Float:c1 py iy,Float:c2 px ix;
                    new 
Float:vx c2 h,Float:vy c1 h;
                    
SetPlayerVelocity(playerid0.35 vx0.35 vy0.1);
                    
ApplyAnimation(playerid"PED""FALL_back"4.0011101);
                    
defer GetUp(playerid);
                }
            }
        }
    }
    
    if(
issuerid == INVALID_PLAYER_ID)
    {
        
FadePlayerScreen(playerid);
        if(
pInfo[playerid][pPremium] >= 3)
        {
            switch(
random(3))
            {
                case 
1:
                {
                      switch(
random(14))
                    {
                        case 
0pInfo[playerid][pBlood] -= random(15);
                        case 
1: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(15), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",2500,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 2.5 seconds!
                        
case 2pInfo[playerid][pBlood] -= random(20);
                        case 
3: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(5), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",1000,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 1 second!
                        
case 4pInfo[playerid][pBlood] -= random(10);
                        case 
5pInfo[playerid][pBlood] -= random(5);
                        case 
6: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(10), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",5000,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 5 seconds!
                        
case 7pInfo[playerid][pBlood] -= random(15);
                        case 
8: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(15), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",10000,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 10 seconds!
                        
case 9pInfo[playerid][pBlood] -= random(10);
                        case 
10: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(15), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",5500,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 5.5 seconds!
                        
case 11pInfo[playerid][pBlood] -= random(20);
                        case 
12: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(20), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",25000,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 25 seconds!
                        
case 13pInfo[playerid][pBlood] -= random(25);
                    }
                }
            }
        }
        else
        {
            switch(
random(14))
            {
                case 
0pInfo[playerid][pBlood] -= random(15);
                case 
1: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(10), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",2500,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 2.5 seconds!
                
case 2pInfo[playerid][pBlood] -= random(21);
                case 
3: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(5), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",1000,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 1 second!
                
case 4pInfo[playerid][pBlood] -= random(15);
                case 
5pInfo[playerid][pBlood] -= random(10);
                case 
6: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(15), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",5000,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 5 seconds!
                
case 7pInfo[playerid][pBlood] -= random(20);
                case 
8: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(15), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",10000,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 10 seconds!
                
case 9pInfo[playerid][pBlood] -= random(15);
                case 
10: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(10), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",5500,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 5.5 seconds!
                
case 11pInfo[playerid][pBlood] -= random(25);
                case 
12: if(pInfo[playerid][IsPlayerBleeding] == 0) { pInfo[playerid][pBlood] -= random(20), KillTimer(pInfo[playerid][Bleeding]), RemovePlayerAttachedObject(playerid2),pInfo[playerid][Bleeding] = SetTimerEx("LoosingBlood",25000,1,"i",playerid),pInfo[playerid][IsPlayerBleeding] = 1; } // Loosing blood ever 25 seconds!
                
case 13pInfo[playerid][pBlood] -= random(5);
            }
        }
    }
}
    return 
1;

Reply
#6

Alg pode me ajudar ?
Reply
#7

Include anti health hack provavelmente, eu tb uso e acontece isso. Se vocк cair de uma altura muito alta aн morre nй ?
Reply
#8

Quote:
Originally Posted by RafaelMau
Посмотреть сообщение
Include anti health hack provavelmente, eu tb uso e acontece isso. Se vocк cair de uma altura muito alta aн morre nй ?
n~зao, o jogador nгo perde dano nenhum ao cair de algum lugar alto.
Reply
#9

Vocк sу pode ter duas situaзхes:
- O jogador que estб sendo testado usa cheater
- Algum script nгo permite o jogador morrer

Nгo temos como te ajudar sem ter acesso a tudo que envolve dano em seus gamemodes, includes e filterscripts.
Reply
#10

E se cair de para-quedas de um lugar alto ?
Reply


Forum Jump:


Users browsing this thread: