PHP Code:
stock CreateBgs(playerid, Float:x,Float:y,Float:z)
{
for(new i = 0; i < sizeof(BgsCreate); i++)
{
if(BgsCreate[i][pMake] == 0)
{
if(PlayerInfo[playerid][pBag] == 1)
{
AddItem(i,"Coyote Patrol Pack",1);
}
if(PlayerInfo[playerid][pBag] == 2)
{
AddItem(i,"Alice Backpack",1);
}
if(PlayerInfo[playerid][pBag] == 3)
{
AddItem(i,"Money Backpack",1);
}
while(PlayerHasItem(playerid,"Bandage"))
{
AddItem(i,"Bandage",1);
RemoveItem(playerid,"Bandage",1);
}
while(PlayerHasItem(playerid,"Water Bottle"))
{
AddItem(i,"Water Bottle",1);
RemoveItem(playerid,"Water Bottle",1);
}
while(PlayerHasItem(playerid,"Baseball bat"))
{
AddItem(i,"Baseball bat",1);
RemoveItem(playerid,"Baseball bat",1);
}
while(PlayerHasItem(playerid,"Painkiller"))
{
AddItem(i,"Painkiller",1);
RemoveItem(playerid,"Painkiller",1);
}
while(PlayerHasItem(playerid,"Empty Water Bottle"))
{
AddItem(i,"Empty Water Bottle",1);
RemoveItem(playerid,"Empty Water Bottle",1);
}
while(PlayerHasItem(playerid,"Cop Clothes"))
{
AddItem(i,"Cop Clothes",1);
RemoveItem(playerid,"Cop Clothes",1);
}
while(PlayerHasItem(playerid,"9mm Pistol"))
{
AddItem(i,"9mm Pistol",1);
RemoveItem(playerid,"9mm Pistol",1);
}
while(PlayerHasItem(playerid,"Pistol Ammo"))
{
AddItem(i,"Pistol Ammo",1);
RemoveItem(playerid,"Pistol Ammo",1);
}
while(PlayerHasItem(playerid,"Police Car Key"))
{
AddItem(i,"Police Car Key",1);
RemoveItem(playerid,"Police Car Key",1);
}
while(PlayerHasItem(playerid,"AK-47"))
{
AddItem(i,"AK-47",1);
RemoveItem(playerid,"AK-47",1);
}
while(PlayerHasItem(playerid,"M4A1"))
{
AddItem(i,"M4A1",1);
RemoveItem(playerid,"M4A1",1);
}
while(PlayerHasItem(playerid,"Mp5"))
{
AddItem(i,"Mp5",1);
RemoveItem(playerid,"Mp5",1);
}
while(PlayerHasItem(playerid,"Room Key 047"))
{
AddItem(i,"Room Key 047",1);
RemoveItem(playerid,"Room Key 047",1);
}
BgsCreate[i][pMake]=1;
BgsCreate[i][pX]=x;
BgsCreate[i][pY]=y;
BgsCreate[i][pZ]=z-0.4;
BgsCreate[i][pObject] = CreateObject(bagmo[playerid], x, y, z-0.4, 0, 0, 0);
BgsCreate[i][p3d] = CreateStreamed3DTextLabel("{1AE657}BAG\n{AAAAAA}Ўґ»ШиБ Left Alt аѕЧиН¤й№ўН§", 0xAAAAAAC8, x, y, z-0.4, 10.0, 0);
return 1;
}
}
return 0;
}