11.05.2018, 20:18
Estб errado.
PHP Code:
CMD:guardararma(playerid, response, listitem, params[])
{
if(response)
{
new value = GetSlotFree(playerid);
new weap, ammo;
new string[128];
if(ammo < 1)
return CancelSelectTextDraw(playerid), SendClientMessage(playerid, COLOR_YELLOW, ""), dialogArmas(playerid);
if(value != -1)
{
ArmasGuardadas[playerid][Selected[playerid][value]] = weap;
BalasGuardadas[playerid][Selected[playerid][value]] = ammo;
} else return SendClientMessage(playerid,-1,"ERRO: slots cheios");
format(string, sizeof string, "Vocк guardou uma arma %s com %d balas no slot: %d. Para pegar use: /mochila", NomeItemID(ArmasGuardadas[playerid][Selected[playerid][2]]),BalasGuardadas[playerid][Selected[playerid][2]], Selected[playerid][2]);
SendClientMessage(playerid, COLOR_R, string);
RemovePlayerWeapon(playerid, weap);
SetPVarInt(playerid, "guardando", 0);
HideMochila(playerid);
}
else
SetPVarInt(playerid, "guardando", 0);
}