31.08.2009, 10:11
Hello,
i was currently Scripting an Bag system for my new Gamemode... but i dont know, how to show the player his Items on the easy way.. the only way i knowed was
But this sux with 30> Items and 5 Bags...
how to solve this easyly?
Oh you need of course the code
i was currently Scripting an Bag system for my new Gamemode... but i dont know, how to show the player his Items on the easy way.. the only way i knowed was
pawn Код:
if(PlayerInfo[playerid][pbag1] == 000001)
{
//Show item
}
else if(PlayerInfo[playerid][pbag1] == 000002)
{
// Show item
}
how to solve this easyly?
Oh you need of course the code
pawn Код:
//======== Defines of the Account save Sys
enum pInfo
{
pbag1,
pbag2,
pbag3,
pbag4,
pbag5,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
//============ Defines of Bag IDS
#define ecard 000001
#define smedal 000002
#define gmedal 000003
#define mayorsig 000004
#define swatsig 000005
#define sdoc1 000006
#define sdoc2 000007
#define sdoc3 000008
#define sdoc4 000009
#define sdocfull 000010
pawn Код:
//========= Mybag should look like this
if(strcmp(cmd, "/mybag", true) == 0)
{
SendClientMessage(playerid, YELLOW, "-----------------------------------------------");
SendClientMessage(playerid, YELLOW, " Your Bag");
SendClientMessage(playerid, YELLOW, "-----------------------------------------------");
// Show item in bag 1
// Show item in bag 2
// Show item in bag 3
// Show item in bag 4
// Show item in bag 5
SendClientMessage(playerid, YELLOW, "-----------------------------------------------");
return 1;
}