[AJUDa] Detector de metais
#1

Bom, to com um problema neste codigo... Ele tira a arma, mas nao devolve...


PHP код:
forward DetectorMetais(weaponid, ammo);
public 
DetectorMetais(weaponid, ammo)
{
    for(new 
x = 0; x <= PlayersOnline; x++)
    {
        if(
IsPlayerInRangeOfPoint(x, 2.0, 247.8819,63.5701,1003.6406))
        {
            if(
Checado[x])
            {
                
GivePlayerWeapon(x, weaponid, ammo);
                
Checado[x] = false;
            }
            if(
GetPlayerWeapon(x) > 0)
            {
                for(new 
i = 0; i < 13; i++)
                {
                    
GetPlayerWeaponData(x, i, ArmasDetector[x][i], ArmasBallasDetector[x][i]);
                    if(
Checado[x])
                    {
                        if(
IsPlayerInRangeOfPoint(x, 2.0, 245.8359,63.4817,1003.6406))
                        {
                            
GivePlayerWeapon(x, ArmasDetector[x][i], ArmasBallasDetector[x][i]);
                            
SendClientMessage(x, 0xFFFF00AA, "[INFO] Suas armas foram devolvidas !");
                        }
                    }
                    else
                    {
                        
SendClientMessage(x, 0xFFFF00AA, "[INFO] Suas armas foram retiradas pelo detector de metais !");
                        
ResetPlayerWeapons(x);
                        
Checado[x] = true;
                    }
                }
            }
        }
    }
    return 
1;
} 
Eu fiz dois IsPlayerInRangeOfPoint para testar se ele devolve a arma, mas nao ta devolvendo, se alguem poder me ajudar ficarei agradecido!
Reply
#2

Qual gamemode vocк usa?
Reply
#3

advanced
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)