// c_textdraw.inc // Definitions. #define TD_CIRCLE_TIMER_INTERVAL (100) // Timer interval in miliseconds for auto-timer. // Callbacks. forward OnPlayerCircleFinish(playerid); // Called when the color movement of the textdraw circle is at the end (last slot). // Functions. TD_CreateCircle(playerid, text[], color, Float:x_pos, Float:y_pos, Float:radius, Float:diff); TD_DestroyCircle(playerid, bool:loop = false); TD_IsCircleCreated(playerid); // Returns the number of textdraws created for the player circle. TD_ActivateCircle(playerid, color, speed); // Default auto-timer interval is 100 miliseconds (the bigger the "speed" parameter is, the slower is color movement of the textdraw circle (watch the video). If you set the "color" parameter to "-1", it will generate random colors (again - watch the video). TD_StopCircle(playerid); // Will reset (stop) the color movement of the textdraw circle. TD_ResumeCircle(playerid); // Will resume the color movement of the textdraw circle if the circle was paused. TD_PauseCircle(playerid); // Will pause the color movement of the textdraw circle. TD_SetCircleSlotColor(playerid, slot, color); // Use "TD_IsCircleCreated" function to make sure not to cross the maximum slot.
// c_object.inc // Definitions. #define MAX_OBJECT_CIRCLES (20) // Functions. Object_CreateCircle(model, Float:x_pos, Float:y_pos, Float:z_pos, Float:x_rot, Float:y_rot, Float:z_rot, Float:radius, Float:diff, world = -1, interior = -1, Float:d_stream = 200.0, Float:d_draw = 0.0); // Returns dynamic circle ID. Object_DestroyCircle(c_id); Object_SetCircleTexture(c_id, m_index, txd_model, txd_name[], texture_name[], m_color = 0); Object_SetCircleObjectTexture(c_id, slot, m_index, txd_model, txd_name[], texture_name[], m_color = 0); Object_SetCircleModel(c_id, model, Float:radius, Float:diff); Object_GetCircleModel(c_id); Float:Object_GetCircleRadius(c_id); Float:Object_GetCircleDiff(c_id); Object_SetCirclePos(c_id, Float:x_pos, Float:y_pos, Float:z_pos); Object_GetCirclePos(c_id, &Float:x_pos, &Float:y_pos, &Float:z_pos); Object_SetCircleRot(c_id, Float:x_rot, Float:y_rot, Float:z_rot); Object_GetCircleRot(c_id, &Float:x_rot, &Float:y_rot, &Float:z_rot); Object_SetCircleStreamDistance(c_id, Float:d_stream); Float:Object_GetCircleStreamDistance(c_id); Object_SetCircleDrawDistance(c_id, Float:d_draw); Float:Object_GetCircleDrawDistance(c_id); Object_SetCircleWorld(c_id, world); Object_GetCircleWorld(c_id); Object_SetCircleInterior(c_id, interior); Object_GetCircleInterior(c_id); Object_GetCircleCount(c_id);
// c_label.inc // Definitions. #define MAX_LABEL_CIRCLES (20) #define MAX_LABEL_STRING (6) // Functions. Label_CreateCircle(text[], color, Float:x_pos, Float:y_pos, Float:z_pos, Float:radius, Float:diff, testlos = 0, world = -1, interior = -1, Float:d_stream = 50.0, Float:d_draw = 0.0); // Returns dynamic circle ID. Label_DestroyCircle(c_id); Label_SetCircleRadius(c_id, Float:radius); Float:Label_GetCircleRadius(c_id); Label_SetCircleDiff(c_id, Float:diff); Float:Label_GetCircleDiff(c_id); Label_SetCirclePos(c_id, Float:x_pos, Float:y_pos, Float:z_pos); Label_GetCirclePos(c_id, &Float:x_pos, &Float:y_pos, &Float:z_pos); Label_SetCircleStreamDistance(c_id, Float:d_stream); Float:Label_GetCircleStreamDistance(c_id); Label_SetCircleDrawDistance(c_id, Float:d_draw); Float:Label_GetCircleDrawDistance(c_id); Label_SetCircleWorld(c_id, world); Label_GetCircleWorld(c_id); Label_SetCircleInterior(c_id, interior); Label_GetCircleInterior(c_id); Label_SetCircleTestLOS(c_id, testlos); Label_GetCircleTestLOS(c_id); Label_GetCircleCount(c_id);
// c_pickup.inc // Definitions. #define MAX_PICKUP_CIRCLES (20) // Functions. Pickup_CreateCircle(model, type, Float:x_pos, Float:y_pos, Float:z_pos, Float:radius, Float:diff, world = -1, interior = -1, Float:d_stream = 200.0); // Returns dynamic circle ID. Pickup_DestroyCircle(c_id); Pickup_SetCircleModel(c_id, model, Float:radius, Float:diff); Pickup_GetCircleModel(c_id); Float:Pickup_GetCircleRadius(c_id); Float:Pickup_GetCircleDiff(c_id); Pickup_SetCircleType(c_id, type); Pickup_GetCircleType(c_id); Pickup_SetCirclePos(c_id, Float:x_pos, Float:y_pos, Float:z_pos); Pickup_GetCirclePos(c_id, &Float:x_pos, &Float:y_pos, &Float:z_pos); Pickup_SetCircleStreamDistance(c_id, Float:d_stream); Float:Pickup_GetCircleStreamDistance(c_id); Pickup_SetCircleWorld(c_id, world); Pickup_GetCircleWorld(c_id); Pickup_SetCircleInterior(c_id, interior); Pickup_GetCircleInterior(c_id); Pickup_GetCircleCount(c_id);
// c_mapicon.inc // Definitions. #define MAX_MAPICON_CIRCLES (20) // Functions. MapIcon_CreateCircle(Float:x_pos, Float:y_pos, Float:z_pos, type, color, Float:radius, Float:diff, world = -1, interior = -1, Float:d_stream = 150.0, style = MAPICON_LOCAL); // Returns dynamic circle ID. MapIcon_DestroyCircle(c_id); MapIcon_SetCircleType(c_id, type, Float:radius, Float:diff); MapIcon_GetCircleType(c_id); Float:MapIcon_GetCircleRadius(c_id); Float:MapIcon_GetCircleDiff(c_id); MapIcon_SetCirclePos(c_id, Float:x_pos, Float:y_pos, Float:z_pos); MapIcon_GetCirclePos(c_id, &Float:x_pos, &Float:y_pos, &Float:z_pos); MapIcon_SetCircleStreamDistance(c_id, Float:d_stream); Float:MapIcon_GetCircleStreamDistance(c_id); MapIcon_SetCircleWorld(c_id, world); MapIcon_GetCircleWorld(c_id); MapIcon_SetCircleInterior(c_id, interior); MapIcon_GetCircleInterior(c_id); MapIcon_SetCircleStyle(c_id, style); MapIcon_GetCircleStyle(c_id); MapIcon_GetCircleCount(c_id);
Can you give me cmd that used in the video? I have for some reason does not create a circle ..
|
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; }
@ZaBraNjeNi: "Very very" useful for what purpose ?
I don't really see the usefulness of this include. Maybe for a speedometer as you tried to show us, but I don't really see how we could use your map icons circles. I don't think many people are going to use your include. Anyway if you enjoyed coding it, it matters. Thank you for your contribution. |
Great!
Example http://i.imgur.com/nmkB45a.gif |