16.05.2013, 18:50
(
Последний раз редактировалось JohnTravis; 16.05.2013 в 20:44.
)
Hi this line shows the inventory. Some people might have a laptop, some wallet, some nothing. How can I do the listitem == LAPTOP rather than 0 and WALLET rather than 1. Since if you dont have a wallet listitem == 0 will be laptop so its different for everyone. I did this about 2 years ago and I think i used strava(inputtext) or something but cant remember, any ideas?
pawn Код:
format(format1,256,"%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",Wallet,LapTop);
ShowPlayerDialog(playerid, DIALOG_P, DIALOG_STYLE_LIST,"Inventory:",format1,"Use","Close");
pawn Код:
if(listitem == 0)
{
return 1;
}
if(listitem == 1)
{
if(LGWork[playerid] == 0)
{
ShowORHideMonitor(playerid,1);
SelectTextDraw(playerid, 0x9999BBBB);
LGWork[playerid] = 1;
}
else
{
ShowORHideMonitor(playerid,2);
CancelSelectTextDraw(playerid);
StopAudioStreamForPlayer(playerid);
LGWork[playerid] = 0;
}
return 1;
}