[AJUDA] Cуdigo detector de armas
#2

pawn Код:
//No Topo do GM:


new ArmasDetector[MAX_PLAYERS][14];
new ArmasBallasDetector[MAX_PLAYERS][14];
new bool:Checado[MAX_PLAYERS];
new PlayersOnline;



//No OnGameModeInit:
SetTimer("DetectorMetais", 1000, true);



//OnPlayerConnect:
PlayersOnline++;



//No OnPlayerDisconnect:
PlayersOnline--;



//No Final do GM:
forward DetectorMetais();
public DetectorMetais()
{
    for(new x = 0; x <= PlayersOnline; x++)
    {
        if(IsPlayerInRangeOfPoint(x, 2.0, 100.00, 200.00, 350.00))//Troque essas coordenadas pelas da porta !
        {
            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])
                    {
                        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;
}
Reply


Messages In This Thread
[AJUDA] Cуdigo detector de armas - by Kelvin_Cesar - 08.01.2012, 20:16
Re: [AJUDA] Cуdigo detector de armas - by Adrian Fahrenheit Tepes - 08.01.2012, 20:31
Re: [AJUDA] Cуdigo detector de armas - by Kelvin_Cesar - 08.01.2012, 20:47
Re: [AJUDA] Cуdigo detector de armas - by humildadeforever - 08.01.2012, 20:50
Re: [AJUDA] Cуdigo detector de armas - by Kelvin_Cesar - 08.01.2012, 20:55
Re: [AJUDA] Cуdigo detector de armas - by Adrian Fahrenheit Tepes - 08.01.2012, 21:02
Re: [AJUDA] Cуdigo detector de armas - by Kelvin_Cesar - 08.01.2012, 21:05
Re: [AJUDA] Cуdigo detector de armas - by Kelvin_Cesar - 08.01.2012, 21:45

Forum Jump:


Users browsing this thread: 1 Guest(s)