14/12/2022 10:50
Basta fazer isso
Código PHP:
enum Weapon_Save
{
gun[13],
ammo[13]
};
new pWeapon[MAX_PLAYERS][Weapon_Save];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(2 <= newstate <= 3)
{
static i;
for(i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, pWeapon[playerid][gun][i], pWeapon[playerid][ammo][i]);
}
ResetPlayerWeapons(playerid);
}
else if(newstate == 1)
{
ResetPlayerWeapons(playerid);
static i;
for(i = 0; i < 13; i++)
{
GivePlayerWeapon(playerid, pWeapon[playerid][gun][i], pWeapon[playerid][ammo][i]);
}
}
return 1;
}
Seu trouxa favorito 2