[Ajuda] Drop de Armas
#3

//dropweapon
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new i = 0; i <= 300; i ++)
{
if(Pickup[i] == pickupid)
{
DestruirPickupCaido(i);
}
if(pickupid == Pic)
{
ShowMenuForPlayer(Test, playerid);
TogglePlayerControllable(playerid, 0);
}
}
}

public DestruirPickupCaido(number)
{
DestroyPickup(Pickup[number]);
Pickup[number] = -1;
}

stock DropWeapons(playerid)
{
new Arma[14], Municion[14];
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);

for(new wep = 0; wep < 14; wep ++)
{
GetPlayerWeaponData(playerid, wep, Arma[wep], Municion[wep]);

if(PickupID[Arma[wep]] != -1)
{
new model = PickupID[Arma[wep]];
new randid = random(300);
new Float:X2 = X + (random(3) - random(3));
new Float:Y2 = Y + (random(3) - random(3));
Pickup[randid] = AddStaticPickup(model, 4, X2, Y2, Z);
SetTimerEx("DestruirPickupCaido", 25 * 1000, false, "d", randid);
}
}
}
Reply


Messages In This Thread
Drop de Armas - by Renan_Sinister - 13.08.2012, 00:37
Re: Drop de Armas - by Delay - 13.08.2012, 00:48
Re: Drop de Armas - by Renan_Sinister - 13.08.2012, 00:49
Re: Drop de Armas - by felipe_mr - 13.08.2012, 01:18
Re: Drop de Armas - by Renan_Sinister - 13.08.2012, 01:21

Forum Jump:


Users browsing this thread: 1 Guest(s)