"radius" and "diff" parameters:
If you don't know what radius is, then check the Wikipedia page. The "diff" parameter is a "step". 360 degrees represents the full circle, that means you'll have 360/diff items for your circle. The "diff" of 2.0 will give 180 items (example: objects). Minimum "diff" for the textdraw circles is 1.40625, because textdraws are created on player-level, which means there can be maximum 256 player-textdraws created (360/256 = 1.40625). The functions will correct the "diff" parameter if you try to enter smaller "diff" than the minimum (1.40625). The minimum "diff" parameter for other circles is 1.0, there is also correcting feature in functions making sure the "diff" parameter won't be smaller than 1.0 for non-textdraw circles. |
@Correlli: I first thought it was another useless creation. Now that you explained it this way, it makes sense. It's a great quality to be able to link your work to your passions(some of your favorite games). "Everything must be accomplished with passion". You deserve a +REP.
|
(Btw, if you could upload it on another site it would be of great help because I encounter some issues with solidfiles and maybe other users also do.)
|
Finally a new useful include, thanks for the release, I'm going to play with it a bit !
|
Correlli, could leave a sample script for each use of circles in the video samples ?, thanks.
|
Here are commands for the first video (you'll need ZCMD and sscanf), but unfortunately I didn't save the speedometer codes. I might write them again tomorrow or someone else can try to play with the includes.
Код:
command(create, playerid, params[]) { new text[6], Float:coord[4]; if(sscanf(params, "s[6]ffF(320.0)F(240.0)", text, coord[0], coord[1], coord[2], coord[3])) return SendClientMessage(playerid, -1, "Correct usage: \"/create [text] [radius] [diff] [x] [y]\""); if(!TD_DestroyCircle(playerid)) TD_CreateCircle(playerid, text, 0x000000FF, coord[2], coord[3], coord[0], coord[1]); return true; } Код:
command(activate, playerid, params[]) { TD_ActivateCircle(playerid, 0x00FFFFFF, strval(params)); return true; } Код:
command(stop, playerid, params[]) { TD_StopCircle(playerid); return true; } Код:
command(destroy, playerid, params[]) { TD_DestroyCircle(playerid); return true; } Код:
command(resume, playerid, params[]) { TD_ResumeCircle(playerid); return true; } Код:
command(pause, playerid, params[]) { TD_PauseCircle(playerid); return true; } Код:
public OnPlayerCircleFinish(playerid) { SendClientMessage(playerid, 0xFFFFFFFF, "Finished!"); return true; } |