[Include] PlayerEditRange
#1

PlayerEditRange
Version: 1.0
Author: Patryk "Maku" Makowski


Description:
Are you create dynamic systems and u wondering how range to enter in command?
This include will provide you with the perfect timing distance.

Movie:https://www.youtube.com/watch?v=17-4myE6-yo

Defines:
Код:
#define UNDEFINED_EDITRANGE -1

#define EDITRANGE_REASON_SUCCESS 1
#define EDITRANGE_REASON_FAIL 0
#define EDITRANGE_REASON_CANCEL 2

#define EDITRANGE_UPKEY KEY_FIRE
#define EDITRANGE_DOWNKEY KEY_HANDBRAKE /*= KEY_AIM*/ 
#define EDITRANGE_FASTKEY KEY_SPRINT
#define EDITRANGE_FINISHKEY KEY_SECONDARY_ATTACK 
#define EDITRANGE_CANCELKEY  KEY_JUMP

#define EDITRANGE_OBJECTID 19133
#define EDITRANGE_CAMERACHANGE (60.0)
Functions:

IsPlayerEditRange(playerid) - Checks if the player is in edit mode
PlayerEditRange(playerid, rangeid) - Introduces the player to edit mode

PlayerEditRange return false if:
- The player isnt connected
- The player is in edit mode
- The player state != PLAYER_STATE_ONFOOT
- 'rangeid' is less than 0 or is equal to UNDEFINED_RANGEID


Callbacks:
OnPlayerEditRangeFinish(playerid, rangeid, Float:range, success)
OnPlayerEditRangeUpdate(playerid, rangeid, Float:range)

SUCCESS is equal to EDITRANGE_REASON_FAIL when:
- The player has disconnected
- The player has change state



Download & Example script:
Example - http://pastebin.com/jw908eAU
Include - http://pastebin.com/KpAUkkfY

Please comment and rate!

--
I'm sorry for my bad english
Reply
#2

Nice work .
Reply
#3

So basically, it allows you to view your character from different point of view with a flexible distance from the character (?)
Reply
#4

Kaperstone, no. It gets the distance, or range of circle - between the player and the arrows.
This is helpful tool in dynamic systems based on zones (spheres) and distance.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)