[Include] k_target - Create a target easily [0.3Z]
#1

About
I created this project on 2014. 01. 21.. This is my first project on GitHub, and it was hard to set up GitHub at the first time, and also i had no time to deal with it. Now it's weekend! (And my internet connection is slow too, it took a half day to upload the demonstration video).
This include only works with SA-MP 0.3z (and higher versions).

This include allows you to create a targets. It looks like a real player, but it made from objects. You can do anything with it, only your imagination is needed. It's up to you!
It has a body part detection, so you can check where did you shoot the bullet.

Definitions
Код:
#define MOVE_FORWARD    	        0
#define MOVE_BACKWARD   	        1
#define MOVE_LEFT   		        2
#define MOVE_RIGHT   		        3

#define TORSO      			3
#define LEFT_ARM   			5
#define RIGHT_ARM 			6
#define RIGHT_LEG   		        8
#define LEFT_LEG   			7
#define HEAD   				9
Functions
Код:
native CreateTarget(Float:Tx, Float:Ty, Float:Tz, Float:FacingAngle); // Returns with the target's ID
native SetTargetFacingAngle(targetid, Float:FacingAngle);
native SetTargetPos(targetid, Float:Tx, Float:Ty, Float:Tz);
native GetTargetPos(targetid, &Float:Tx, &Float:Ty, &Float:Tz);
native MoveTarget(targetid, direction, Float:distance);
native MoveTargetEx(targetid, Float:X, Float:Y, Float:Z, Float:Speed, Float:FacingAngle);
native DestroyBodyPart(targetid, bodypart); // NOTE: If you destroy the torso, all body parts will be destroyed.
native DestroyTarget(targetid);
native IsValidTarget(targetid);
Callbacks
Код:
public OnTargetMoved(targetid)
public OnPlayerShotTarget(playerid, targetid, bodypart, Float:Tx, Float:Ty, Float:Tz)
Bugs
I didn't find any bugs. If you do, please contact me, and i will fix it.

Video

[ame]http://www.youtube.com/watch?v=EeiNRthltjg[/ame]



Example filterscript
https://raw2.github.com/kadaradam/k_...ts/example.pwn

And the filterscript is also available at the project's main folder(filterscripts/example.pwn).

Download
You can download the project on github.


Click here


Credits
kadaradam - Creator

If you have any suggestions please leave a comment. And sorry for my english.
Reply


Messages In This Thread
k_target - Create a target easily [0.3Z] - by kadaradam - 25.01.2014, 06:54
Re: k_target - Create a target easily [0.3Z] - by iJumbo - 25.01.2014, 08:30
Re: k_target - Create a target easily [0.3Z] - by Lordzy - 25.01.2014, 08:36
Re: k_target - Create a target easily [0.3Z] - by Pottus - 25.01.2014, 12:25
Re: k_target - Create a target easily [0.3Z] - by Hiddos - 25.01.2014, 18:43
Re: k_target - Create a target easily [0.3Z] - by kooltuO - 25.01.2014, 19:24

Forum Jump:


Users browsing this thread: 1 Guest(s)