[Include] PlayerEditRange - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] PlayerEditRange (
/showthread.php?tid=559910)
PlayerEditRange -
MakuPL - 25.01.2015
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
Re: PlayerEditRange -
AroNix - 25.01.2015
Nice work .
Re: PlayerEditRange -
Kaperstone - 25.01.2015
So basically, it allows you to view your character from different point of view with a flexible distance from the character (?)
Re: PlayerEditRange -
MakuPL - 25.01.2015
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.