Woodcutter job
#1

Hello

How to do woodcutter job this way:

When i go next to tree, i use a command, and after writing command, the tree object destroys and there will be object of stump. After 5min. the stump object destroys and at the same place will be object of tree.
Reply
#2

I didn't understand anything.
Reply
#3

Well first you need an array containing the position of every single tree on the map, which will take you a very long time to obtain.
Reply
#4

At first i can take only 5 trees and mark these with checkpoint. But i am intrested in system. How to do it?
Reply
#5

Create the trees yourself ( map them ) attach them to a variable new Trees[Your_Amount_Of_Trees];

Trees[0] = CreateObject(...);

IsPlayerInRangeOfPoint(...);

DestroyObject(Trees[0]);

I hope that gives you an idea
Reply
#6

There is an animation of CJ cutting the trees?
If yes, You might use it.
Reply
#7

There is no CJ Cutting the trees animation.

Well first off all, create an enum for woodcutter job

like this

PHP Code:
enum MyEnum
{
     
WoodCutter
};
new 
Cutter[MAX_PLAYERS][MyEnum]; 
then to check if player is not wood cutter do this

PHP Code:
if(Cutter[playerid][WoodCutter] != 1) return SendClientMessage(playerid, -1"GTFO"); 
for the trees.

You've to create them one by one around the san andreas.

You see you need to be patience for awhile when doing a system like this.
Reply
#8

But, how is that the tree object will change to dead tree object

Like..
Code:
CMD:cut(playerid, params[])
{
     if(IsPlayerInRangeOfPoint(...)
     {
          DestroyObject(Tree[0]);
          DeadTree[0] = CreateObject(....) // DEAD TREE OBJECT
          SetTimerEx(...) // TIMER
     }
}

public Timer(deadtree0)
{
     DestroyObject(DeadTree[0]);
     Tree[0] = CreateObject(....);
}
AND timers and stuff on every each tree?
QUESTIONS HERE:
Can we make this a little easier?
Put cords into some enum or something?
Reply
#9

Any very good scripters here?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)