Tree - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tree (
/showthread.php?tid=538595)
Tree -
AdelS - 22.09.2014
How can I set tree health,and that I can cut him.When I cut him that he falls? Sorry for by bad English.
Re: Tree -
ranme15 - 22.09.2014
CreateObject -> OnPlayerWeaponShot (hittype object) -> Cutted (SetObjectRot(90.0, 0, 0).
Re: Tree -
AdelS - 22.09.2014
Can you explain,please?
Re: Tree -
dusk - 22.09.2014
Quote:
Originally Posted by ranme15
CreateObject -> OnPlayerWeaponShot (hittype object) -> Cutted (SetObjectRot(90.0, 0, 0).
|
Only if you "cut" it with ceratin weapons. Weapons that shoot bullets to be exact. So a thing like a spade won't work.
My suggestion:
- Create a variable for vehicle health
- Create a tree object
- Choose a way that the tree will be cut: pressing a key, a command
- When a player interacts with that tree, lower it's health and check if it zero
- If it is 0. Remove that tree object and create some sort of fallen tree object