Reset an object doenst work.
#1

I got an system that reset an object after using an command but its not working,

pawn Код:
forward Treereset(treeID);
public Treereset(treeID)
{
    if(tInfo[treeID][Status] == TREE_STATUS_SPAWN)
    {
        switch(treeID)
        {
            case 0: TreeUp(treeID, 148.40112, -1594.56152, 10.41950,   0.00000, 0.00000, 0.00000);
            case 1: TreeUp(treeID, 872.44397, -1418.94690, 13.30900,   0.00000, 0.00000, 0.00000);
            case 2: TreeUp(treeID, 1329.28870, -1418.72229, 12.54483,   0.00000, 0.00000, 0.00000);
            case 3: TreeUp(treeID, 1196.09790, -1840.84937, 12.50620,   0.00000, 0.00000, 0.00000);
            case 4: TreeUp(treeID, 2104.56445, -1765.55371, 12.28000,   0.00000, 0.00000, 0.00000);
            case 5: TreeUp(treeID, 904.98608, -1759.67542, 11.82000,   0.00000, 0.00000, 0.00000);
            case 6: TreeUp(treeID, 648.93683, -1078.05432, 46.74230,   0.00000, 0.00000, 0.00000);
            case 7: TreeUp(treeID, 304.46860, -1240.53784, 70.27060,   0.00000, 0.00000, 0.00000);
            case 8: TreeUp(treeID, 1412.33203, -647.31122, 105.48460,   0.00000, 0.00000, 0.00000);
            case 9: TreeUp(treeID, 1525.77588, -826.54437, 82.78380,   0.00000, 0.00000, 0.00000);
            case 10: TreeUp(treeID, 1412.33203, -647.31122, 105.48460,   0.00000, 0.00000, 0.00000);
            case 11: TreeUp(treeID, 2729.79053, -1522.59143, 29.61790,   0.00000, 0.00000, -33.00000);
            case 12: TreeUp(treeID, 2872.42871, -1640.76050, 9.67040,   0.00000, 0.00000, 0.00000);
            case 13: TreeUp(treeID, 2294.92749, -1159.06360, 25.11970,   0.00000, 0.00000, 0.00000);
            case 14: TreeUp(treeID, 2630.13232, -1690.43982, 9.56290,   0.00000, 0.00000, 0.00000);
        }
    }
    return 1;
}

this is in an command
pawn Код:
Treereset(treeID);
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
Why do you "switch" by "treeID", then pass it directly anyway? If this is related to your other topic, the problem is probably your strange way of allocating IDs.
Problably because of the coordinates.

@Topic

The best way is to use an array...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)