SA-MP Forums Archive
[AJUDa] Detector de metais - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDa] Detector de metais (/showthread.php?tid=309743)



[AJUDa] Detector de metais - Kelvin_Cesar - 08.01.2012

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


PHP код:
forward DetectorMetais(weaponidammo);
public 
DetectorMetais(weaponidammo)
{
    for(new 
0<= PlayersOnlinex++)
    {
        if(
IsPlayerInRangeOfPoint(x2.0247.8819,63.5701,1003.6406))
        {
            if(
Checado[x])
            {
                
GivePlayerWeapon(xweaponidammo);
                
Checado[x] = false;
            }
            if(
GetPlayerWeapon(x) > 0)
            {
                for(new 
013i++)
                {
                    
GetPlayerWeaponData(xiArmasDetector[x][i], ArmasBallasDetector[x][i]);
                    if(
Checado[x])
                    {
                        if(
IsPlayerInRangeOfPoint(x2.0245.8359,63.4817,1003.6406))
                        {
                            
GivePlayerWeapon(xArmasDetector[x][i], ArmasBallasDetector[x][i]);
                            
SendClientMessage(x0xFFFF00AA"[INFO] Suas armas foram devolvidas !");
                        }
                    }
                    else
                    {
                        
SendClientMessage(x0xFFFF00AA"[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!


Re: [AJUDa] Detector de metais - dPlaYer_ - 09.01.2012

Qual gamemode vocк usa?


Re: [AJUDa] Detector de metais - Kelvin_Cesar - 09.01.2012

advanced