[Ajuda] Medkit nгo quebra
#2

Nгo testei, se der errado avisa, mudei apenas o DetectarMedKit(playerid)
o comando destruirmedkit funciona?

PHP код:
DetectarMedKit(playerid)
{
        new 
Float:VidaFloat:Colete;
        
GetPlayerHealth(playeridVida);
        
GetPlayerArmour(playeridColete);
        for(new 
iMAX_MEDKITSi++)
        {
                if(
IsPlayerInRangeOfPoint(playerid1.0MedKitDados[i][mX], MedKitDados[i][mY], MedKitDados[i][mZ]) && MedKitDados[i][mAtivo])
                {
                        if(
Vida 100)
                        {
                                
SetPlayerHealth(playerid, (Vida+7));
                                
PlayerPlaySound(playerid52020.00.00.0);
                                
MedKitDados[i][mDurabilidade]--;
                                if(
MedKitDados[i][mDurabilidade] == 0)
                                {
                                        
DestruirMedKit(MedKitDados[i][mID]);
                                        
MedKitZ[playerid] = false;
                                        
PlayerPlaySound(playerid64020.00.00.0);
                                        
SendClientMessage(playerid, -1"Medkit quebrou!");
                                }
                                return 
1;
                        }
                        if(
Vida >= 100 && Colete << 100)
                        {
                                
SetPlayerArmour(playerid, (Colete+7));
                                
PlayerPlaySound(playerid52020.00.00.0);
                                
MedKitDados[i][mDurabilidade]--;
                                if(
MedKitDados[i][mDurabilidade] == 0)
                                {
                                        
DestruirMedKit(MedKitDados[i][mID]);
                                        
MedKitZ[playerid] = false;
                                        
PlayerPlaySound(playerid64020.00.00.0);
                                        
SendClientMessage(playerid, -1"Medkit quebrou!");
                                }
                                return 
1;
                        }
                }
        }
        return 
1;

Reply


Messages In This Thread
Medkit nгo quebra - by axtlon - 28.02.2018, 02:14
Re: Medkit nгo quebra - by iLordGG - 28.02.2018, 13:44
Re: Medkit nгo quebra - by axtlon - 28.02.2018, 16:32
Re: Medkit nгo quebra - by FerrariL - 28.02.2018, 16:46
Re: Medkit nгo quebra - by axtlon - 28.02.2018, 17:39
Re: Medkit nгo quebra - by axtlon - 27.03.2018, 03:33

Forum Jump:


Users browsing this thread: 1 Guest(s)