05.02.2018, 04:39
(
Последний раз редактировалось Mkssid; 05.02.2018 в 06:15.
)
PHP код:
function drop_player_weapons(playerid, type)
{
new Float: Pos[3], string[128], gunname[32], sweapon, sammo, idd, result; // LINE 8155
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
for(new i = 0; i < 12; i++)
{
GetPlayerWeaponData(playerid, i, sweapon, sammo);
if(sweapon != 0)
{
result++;
idd = CheckIDEmpty();
DropInfo[idd][ID] = CreatePickup(WeaponObject(sweapon), 23, Pos[0]+result, Pos[1]+2, Pos[2], -1);
DropInfo[idd][Type] = 0;
DropInfo[idd][Weapon] = sweapon;
DropInfo[idd][Ammo] = sammo;
GetWeaponName(sweapon, gunname, sizeof(gunname));
format(string, sizeof(string), "{90F037}%s{FFFFFF} (%d)", gunname, sammo);
DropInfo[idd][Label] = Create3DTextLabel(string, -1, Pos[0]+result, Pos[1]+2, Pos[2], 10.0, 0, 0);
}
}
if(activeHeal == 1 && type == 0)
{
result++;
idd = CheckIDEmpty();
DropInfo[idd][ID] = CreatePickup(1240, 23, Pos[0]+result, Pos[1]+2, Pos[2], -1);
DropInfo[idd][Type] = 1;
DropInfo[idd][Weapon] = 0;
DropInfo[idd][Ammo] = 0;
DropInfo[idd][Label] = Create3DTextLabel("{DE1212}Medkit (1)", -1, Pos[0]+result, Pos[1]+2, Pos[2], 10.0, 0, 0);
}
ResetPlayerWeapons(playerid);
return 1;
}
Код:
(8155) : warning 219: local variable "Pos" shadows a variable at a preceding level