a 3d label is not created.
#5

Do you mean the cmd which creates a tree?

Trees go through 3 processes only:
1. creation ( using cmd /createtree )
2. loading trees on server start
3. destroying trees on server shutdown

PHP код:
COMMAND:createtree(playeridparams[])
{
    if(
pInfo[playerid][Level] >= 4)
    {
        new 
FloatxFloatyFloatz;
        
GetPlayerPos(playeridxyz);
        new 
treeid freeTreeID();
        
        new 
string[260];
        
format(stringsizeof(string), "/Trees/%d.dini.save"treeid);
        if(!
dini_Exists(string))
        {
            
treeData[treeid][tX] = x;
            
treeData[treeid][tY] = y;
            
treeData[treeid][tZ] = 3.1117// remove this value to fix object bug
            
treeData[treeid][tObject] = CreateObject(617treeData[treeid][tX], treeData[treeid][tY], treeData[treeid][tZ], 0.00000.00000.0000); // tree
            
treeData[treeid][woodReady] = false;
            
treeData[treeid][tHealth] = 100;
                new 
string2[80];
            
format(string2sizeof(string2), "{ffff00}Tree\n/cuttree\nHealth: %i"treeData[treeid][tHealth]);
                
treeData[treeid][tLabel] = Create3DTextLabel(string2COLOR_YELLOWtreeData[treeid][tX], treeData[treeid][tY], treeData[treeid][tZ] + (0.2 3.1117)  , 7.500);
                
treeData[treeid][tStatus] = true;
            
dini_Create(string);
            
dini_FloatSet(string"tX"x);
            
dini_FloatSet(string"tY"y);
            
dini_FloatSet(string"tZ"3.1117);
            
SSM(playerid"You have successfully created a tree.");
        }
    }
    else return 
0;
    return 
1;

-freetreeID function:
PHP код:
stock freeTreeID()
{
        new 
Trees[64];
     for(new 
1MAX_TREESg++)
    {
        
format(Treessizeof(Trees), "/Trees/%d.dini.save"g);
        if(!
dini_Exists(Trees)) return g;
    }
    return 
1;

Reply


Messages In This Thread
a 3d label is not created. - by Kincaid - 24.01.2019, 14:54
Re: a 3d label is not created. - by Florin48 - 24.01.2019, 15:00
Re: a 3d label is not created. - by Kincaid - 24.01.2019, 15:05
Re: a 3d label is not created. - by Florin48 - 24.01.2019, 15:17
Re: a 3d label is not created. - by Kincaid - 24.01.2019, 15:25
Re: a 3d label is not created. - by codExpert - 24.01.2019, 15:42
Re: a 3d label is not created. - by Kincaid - 24.01.2019, 15:48
Re: a 3d label is not created. - by Kincaid - 24.01.2019, 20:26
Re: a 3d label is not created. - by codExpert - 24.01.2019, 20:32
Re: a 3d label is not created. - by Jeffry - 25.01.2019, 16:01
Re: a 3d label is not created. - by Kincaid - 01.02.2019, 23:39

Forum Jump:


Users browsing this thread: 2 Guest(s)