28.11.2012, 10:48
Try doing this then!
pawn Код:
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
new weaponID[13], weaponammo[13], rpos[4];
rpos[0] = random(11),rpos[1] = random(11),rpos[2] = random(2),rpos[3] = random(2);
for(new i = 0; i < 13; i++)
{
if(rpos[3] == 0 && rpos[2] == 0)
{
GetPlayerWeaponData(playerid, i, weaponID[i], weaponammo[i]);
DropWeapons(weaponID[i], weaponammo[i], X + rpos[0], Y + rpos[1], Z, GetPlayerVirtualWorld(playerid), playerid);
}
if(rpos[3] == 0 && rpos[2] == 1)
{
GetPlayerWeaponData(playerid, i, weaponID[i], weaponammo[i]);
DropWeapons(weaponID[i], weaponammo[i], X - rpos[0], Y + rpos[1], Z, GetPlayerVirtualWorld(playerid), playerid);
}
if(rpos[3] == 1 && rpos[2] == 0)
{
GetPlayerWeaponData(playerid, i, weaponID[i], weaponammo[i]);
DropWeapons(weaponID[i], weaponammo[i], X + rpos[0], Y - rpos[1], Z, GetPlayerVirtualWorld(playerid), playerid);
}
if(rpos[3] == 1 && rpos[2] == 1)
{
GetPlayerWeaponData(playerid, i, weaponID[i], weaponammo[i]);
DropWeapons(weaponID[i], weaponammo[i], X - rpos[0], Y - rpos[1], Z, GetPlayerVirtualWorld(playerid), playerid);
}
}