25.01.2015, 20:22
PlayerEditRange
Version: 1.0Author: 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)
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