Range Point.
#9

pawn Код:
stock RemovePlayerWeapon(playerid, weaponid)
{
    new plyWeapons[12]
    new plyAmmo[12]

    for(new slot = 0; slot != 12; slot++)
    {
        new wep, ammo
        GetPlayerWeaponData(playerid, slot, wep, ammo)
       
        if(wep != weaponid)
        {
            GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot])
        }
    }
   
    ResetPlayerWeapons(playerid)
    for(new slot = 0; slot != 12; slot++)
    {
        GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot])
    }
}
To the top of the script.
And then (OnPlayerUpdate)
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,30,-163.2511,2620.0977,78.8033,28.4597)) {
    if(GetPVarInt(playerid,"mini") == 0) {
        SetPVarInt(playerid,"mini",1);
        GivePlayerWeapon(playerid,38,100000);
    }
}
if(IsPlayerInRangeOfPoint(playerid,30,-165.4904,2619.2251,98.2914,233.3485)) {
    if(GetPVarInt(playerid,"mini") == 1) {
        RemovePlayerWeapon(playerid,38);
        SetPVarInt(playerid,"mini",0);
    }
}
That should do it.
Reply


Messages In This Thread
Range Point. - by Alex_Obando - 07.05.2011, 17:25
Re: Range Point. - by Seven_of_Nine - 07.05.2011, 17:28
Re: Range Point. - by Hiddos - 07.05.2011, 17:29
Respuesta: Range Point. - by Alex_Obando - 07.05.2011, 17:43
Respuesta: Range Point. - by Alex_Obando - 07.05.2011, 17:47
Re: Range Point. - by BizzyD - 07.05.2011, 17:57
Respuesta: Range Point. - by Alex_Obando - 07.05.2011, 18:01
Respuesta: Re: Range Point. - by Alex_Obando - 07.05.2011, 18:27
Re: Range Point. - by Seven_of_Nine - 07.05.2011, 19:11

Forum Jump:


Users browsing this thread: 2 Guest(s)