21.02.2013, 02:11
Title says all, it doesn't destroy the weapon's object. I don't understand why, I'm using incognitos streamer etc
pawn Code:
CMD:pickupgun(playerid, params[])
{
new string[128];
for(new i=1;i < MAX_DROP_ITEMS;i++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0,DropGunX[i],DropGunY[i],DropGunZ[i]))
{
if(GetPlayerVirtualWorld(playerid) == DropGunVW[i] && GetPlayerInterior(playerid) == DropGunInterior[i])
{
GivePlayerWeapon(playerid,DropGunID[i],DropGunAmmo[i]);
DropGunX[i] = 0.0;
DropGunY[i] = 0.0;
DropGunZ[i] = 0.0;
DropGunID[i] = 0;
DropGunAmmo[i] = 0;
DestroyDynamicObject(DropObject[i]);
format(string, sizeof(string), "* %s has picked up a weapon.", GetNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
}
}
}
return 1;
}