Synthesize item system for survival server
#2

Why not do it like this?

PHP код:
enum eItem
{
    
Type,
    
Value,
    
Exist,
    
Drop
};
new 
Inventar[MAX_PLAYERS][50][eItem]; //you can say 50 Items for Player
stock CanBuildTorch(playerid)
{
    new 
wood,grass;
    for(new 
ii<sizeof(Inventar[]); i++)
    {
        if(!
Inventar[playerid][i][Exist]) continue;
        switch(
Inventar[playerid][i][Type])
        {
            case 
0wood++;
            case 
1grass++;
        }
    }
    return (
wood >= && grass >= 4);

Reply


Messages In This Thread
Item crafting system for survival server - by 3417512908 - 16.12.2018, 08:48
Re: Synthesize item system for survival server - by Kaliber - 17.12.2018, 08:33

Forum Jump:


Users browsing this thread: 1 Guest(s)