22/06/2023 00:51
(22/06/2023 00:47)xbruno1000x Escreveu:Código:CMD:mirainv(playerid, params[])
{
new str[64];
if(!IsPolicial(playerid)) return notification.Show(playerid, "ERRO", "No tienes permision.", ICONE_ERRO);
if(Patrulha[playerid] == false) return notification.Show(playerid, "ERRO", "No estas en patrulla.", ICONE_ERRO);
if(sscanf(params, "d", ID)) return SendClientMessage(playerid, CorErroNeutro, "USE: /mirainv [ID]");
if(!IsPlayerConnected(ID)) return notification.Show(playerid, "ERRO", "Jugador no estas en linea.", ICONE_ERRO);
if(!IsPerto(playerid,ID))return notification.Show(playerid, "ERRO", "No estas cerca de este jugador.", ICONE_ERRO);
if(InventarioAberto[playerid])
{
for(new i = 0; i < 40; ++i)
{
PlayerTextDrawHide(playerid, DrawInv[playerid][i]);
}
InventarioAberto[playerid] = 0;
CancelSelectTextDraw(playerid);
format(str, sizeof(str), "{FFFFFF}*{FF0000}%s {FFFFFF}cerro su inventario.", Name(playerid));
SendClientMessageInRange(10, playerid, str, 0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384FFAA);
return 1;
}
else
{
format(str, sizeof(str), "Inventario: %s", Name(playerid));
PlayerTextDrawSetString(playerid, DrawInv[playerid][34], str);
PlayerTextDrawSetString(playerid, DrawInv[playerid][38], "");
for(new i = 1; i < 33; ++i)
{
PlayerTextDrawSetPreviewModel(playerid, DrawInv[playerid][i], PlayerInventario[ID][i][Slot]);
if(PlayerInventario[ID][i][Slot] == -1)
{
PlayerTextDrawSetPreviewRot(playerid, DrawInv[playerid][i], 0.000000, 0.000000, 0.000000, 999);
}
else
{
PlayerTextDrawSetPreviewRot(playerid, DrawInv[playerid][i], 0.000000, 0.000000, 0.000000, 1);
}
}
for(new i = 0; i < 40; ++i)
{
PlayerTextDrawShow(playerid, DrawInv[playerid][i]);
}
SelectTextDraw(playerid, 0xC4C4C4AA);
InventarioAberto[playerid] = 1;
format(str, sizeof(str), "{FFFFFF}*{FF0000}%s {FFFFFF}abrio su inventario.", Name(playerid));
SendClientMessageInRange(10, playerid, str, 0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384FFAA);
}
return 1;
}
Eu aqui alterando um monte de var e tu só mexeu no PlayerInventario praticamente kaka +REP