Inventory Dropping
#7

I have done it different without pickups, but using objects.

But now i need to know how i define an item name for an modelid.
And then i need to know how i display it in a string.
How can i do this? does anyone have an example for me?

PHP код:
if(newkeys==KEY_CROUCH)
    {
        for(new 
0sizeof(ItemInfo); i++)
        {
            if (
IsPlayerInRangeOfPoint(playerid2.0,ItemInfo[i][ItemPosX],ItemInfo[i][ItemPosY],ItemInfo[i][ItemPosZ]))
            {
                if(
GetPlayerVirtualWorld(playerid) == ItemInfo[i][ItemVWorld] && GetPlayerInterior(playerid) == ItemInfo[i][ItemInterior])
                {
                    if(
ItemInfo[i][Toggled] == 0)
                    {
                        new 
modelid ItemInfo[i][ItemModelID];
                        
                        new 
str[128];
                        
format(str,sizeof(str),"%s(%i) has picked up a item from their surroundings.",PlayerName(playerid),playerid);
                        
SendNearbyMessage(playerid,30.0,str,ORANGE);
                        
AddItem(playerid,modelid);
                        
ItemInfo[i][Toggled] = 1;
                        
Delete3DTextLabel(Label2[i]);
                        
DestroyDynamicObject(Item[i]);
                        
NoCheat[playerid] = 1;
                        return 
1;
                    }
                }else return 
0;
            }
        }
    } 
Reply


Messages In This Thread
Inventory Dropping - by jasperschellekens - 25.03.2017, 10:54
Re: Inventory Dropping - by Mencent - 25.03.2017, 10:55
Re: Inventory Dropping - by jasperschellekens - 25.03.2017, 11:25
Re: Inventory Dropping - by Mencent - 25.03.2017, 11:54
Re: Inventory Dropping - by jasperschellekens - 25.03.2017, 12:04
Re: Inventory Dropping - by Vince - 25.03.2017, 12:20
Re: Inventory Dropping - by jasperschellekens - 25.03.2017, 14:52
Re: Inventory Dropping - by Pottus - 25.03.2017, 15:00
Re: Inventory Dropping - by jasperschellekens - 25.03.2017, 15:17
Re: Inventory Dropping - by Pottus - 25.03.2017, 17:33
Re: Inventory Dropping - by jasperschellekens - 25.03.2017, 22:55
Re: Inventory Dropping - by raydx - 26.03.2017, 09:01
Re: Inventory Dropping - by jasperschellekens - 26.03.2017, 11:51

Forum Jump:


Users browsing this thread: 1 Guest(s)