Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UpdatePlayerCircleShift(playerid) {
- for (new i; i < circleshiftPlayerTextDrawCount[playerid]; i++)
- {
- PlayerTextDrawHide(playerid, circleshiftPlayerTextDraw[playerid][i]);
- }
- new joined = PlayerJoined[playerid];
- if(joined != -1 && !playerUsingMap{playerid} && (MatchingInfo[joined][m_STATE] == STATE_BLUE || MatchingInfo[joined][m_STATE] == STATE_WHITE)) {
- if(circleshiftPlayerTextDrawCount[playerid] == 0) {
- circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 112.799987, 308.628845, "_G");
- PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.000000, 0.039999);
- PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 26.399997, 60.000000);
- PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], true);
- PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 80);
- PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
- circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 116.399978, 308.628845, "_W");
- PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 109.600021, 60.000000);
- PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], true);
- PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], -1);
- PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
- circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 33.199958, 308.628875, "_B");
- PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 26.399997, 60.000000);
- PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], true);
- PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 20700927);
- PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
- circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_BLUE] = circleshiftPlayerTextDrawCount[playerid];
- circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 33.200077, 308.628845, "_R");
- PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 30.000005, 60.000000);
- PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], true);
- PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 778370815);
- PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
- circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_TIME] = circleshiftPlayerTextDrawCount[playerid];
- circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 26.800024, 293.191101, "!");
- PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.159997, 1.052443);
- PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], -1);
- PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawBackgroundColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 51);
- PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 2);
- PlayerTextDrawSetProportional(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
- circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_RUN] = circleshiftPlayerTextDrawCount[playerid];
- circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 29.599977, 303.146575, "mdl-2001:runing_pin");
- PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.071998, 0.199110);
- PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 4.000001, 8.959998);
- PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], -1);
- PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
- PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
- }
- new temp_td;
- new Float:PPx,Float:PPy,Float:PPz;
- GetPlayerPos(playerid, PPx, PPy, PPz);
- if(MatchingInfo[joined][m_STATE] == STATE_BLUE) {
- temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_TIME];
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], (MatchingInfo[joined][m_Timer]%2) ? -16776961 : -1);
- PlayerTextDrawSetString(playerid, circleshiftPlayerTextDraw[playerid][temp_td], "!");
- }
- else if(MatchingInfo[joined][m_STATE] == STATE_WHITE) {
- new str[64], minutes, seconds = MatchingInfo[joined][m_Timer];
- ConvertTime(seconds, minutes);
- if(minutes)
- format(str, 16, "%d:%02d", minutes, seconds);
- else
- format(str, 16, "%d", seconds);
- temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_TIME];
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], -1);
- PlayerTextDrawSetString(playerid, circleshiftPlayerTextDraw[playerid][temp_td], str);
- }
- else {
- temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_TIME];
- PlayerTextDrawSetString(playerid, circleshiftPlayerTextDraw[playerid][temp_td], "_");
- }
- new Float:cal_run, Float:cal_pin, Float:BaseSize;
- new temp_shrink_id = MatchingInfo[joined][m_circleID];
- if(temp_shrink_id < 1) {
- BaseSize = MAP_SIZE_LIMIT;
- }
- else {
- BaseSize = CircleData[temp_shrink_id-1][CIRCLEDATA_SIZE];
- }
- cal_run = 33.200077 + (float(CircleData[temp_shrink_id][CIRCLEDATA_BLUETIME]-MatchingInfo[joined][m_Timer]) * 79.599994 / float(CircleData[temp_shrink_id][CIRCLEDATA_BLUETIME]));
- if(cal_run > 112.800071) {
- cal_run = 112.800071;
- }
- else if(cal_run < 33.200077) {
- cal_run = 33.200077;
- }
- new Float: tempWDistance = GetPlayerDistanceFromPoint(playerid, MatchingInfo[joined][m_WX], MatchingInfo[joined][m_WY], PPz);
- if(tempWDistance < MatchingInfo[joined][m_WRad]) {
- // ÍÂÙèã¹Ç§¢ÒÇ
- cal_pin = 108.800041;
- }
- else {
- new Float: PlayerToWhiteDis = tempWDistance - MatchingInfo[joined][m_WRad];
- cal_pin = 29.599977 + ((BaseSize-PlayerToWhiteDis) * 79.200064 / BaseSize);
- }
- new pincolor = -1;
- if(cal_pin > 108.800041) {
- cal_pin = 108.800041;
- }
- else if(cal_pin < 29.599977) {
- cal_pin = 28.599977;
- pincolor = (MatchingInfo[joined][m_Timer]%2) ? -16776961 : -1;
- }
- // µèÒ§¡Ñ¹ 3.6001
- temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_RUN];
- PlayerTextDrawDestroy(playerid, circleshiftPlayerTextDraw[playerid][temp_td]);
- circleshiftPlayerTextDraw[playerid][temp_td] = CreatePlayerTextDraw(playerid, cal_pin, 303.146575, "mdl-2001:runing_pin"); // µèÓÊØ´ 29.599977 ÁÒ¡ÊØ´ 108.800041
- PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0.071998, 0.199110);
- PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 4.000001, 8.959998);
- PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], pincolor);
- PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
- PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
- PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 4);
- if(MatchingInfo[joined][m_STATE] != STATE_BLUE) {
- temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_BLUE];
- PlayerTextDrawDestroy(playerid, circleshiftPlayerTextDraw[playerid][temp_td]);
- circleshiftPlayerTextDraw[playerid][temp_td] = CreatePlayerTextDraw(playerid, 33.200077, 308.628845, "_R"); // µèÓÊØ´ 33.200077 ÁÒ¡ÊØ´ 112.800071
- PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 30.000005, 60.000000);
- PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
- PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][temp_td], true);
- PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 778370815);
- PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
- PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
- PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
- }
- else {
- temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_BLUE];
- PlayerTextDrawDestroy(playerid, circleshiftPlayerTextDraw[playerid][temp_td]);
- circleshiftPlayerTextDraw[playerid][temp_td] = CreatePlayerTextDraw(playerid, cal_run, 308.628845, "_R"); // µèÓÊØ´ 33.200077 ÁÒ¡ÊØ´ 112.800071
- PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0.000000, 0.000000);
- PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 30.000005, 60.000000);
- PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
- PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
- PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][temp_td], true);
- PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 778370815);
- PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
- PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
- PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
- }
- if(playerUsingcircleshift{playerid}) {
- for (new i; i < circleshiftPlayerTextDrawCount[playerid]; i++)
- {
- PlayerTextDrawShow(playerid, circleshiftPlayerTextDraw[playerid][i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement