17/11/2023 23:24
warning 219: local variable "slot_weapon" shadows a variable at a preceding level
Código PHP:
forward SetPlayerWeapons(playerid);
public SetPlayerWeapons(playerid)
{
if(IsPlayerConnected(playerid))
{
ResetPlayerWeapons(playerid);
if(PlayerInfo[playerid][pLevel] > 1)
{
if(PlayerInfo[playerid][pJailed] > 0) return 0;
if(Gangs(playerid)) GivePlayerWeaponEx(playerid, 5, 1, gTeam[playerid]);
if(gTeam[playerid] == O_REPORTER) GivePlayerWeaponEx(playerid, 43, 100, gTeam[playerid]);
for(new slot_weapon = 0; slot_weapon < SLOTS_WEAPON; slot_weapon++) GivePlayerWeaponEx(playerid, PlayerInfo[playerid][pWeapon][slot_weapon], PlayerInfo[playerid][pAmmo][slot_weapon], PlayerInfo[playerid][pWeaponcode][PlayerInfo[playerid][pWeapon][slot_weapon]]); //erro aqui
}
}
return 1;
}