Advertisement
Guest User

Untitled

a guest
Apr 15th, 2020
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 14.28 KB | None | 0 0
  1. UpdatePlayerCircleShift(playerid) {
  2.  
  3.     for (new i; i < circleshiftPlayerTextDrawCount[playerid]; i++)
  4.     {
  5.         PlayerTextDrawHide(playerid, circleshiftPlayerTextDraw[playerid][i]);
  6.     }
  7.        
  8.     new joined = PlayerJoined[playerid];
  9.     if(joined != -1 && !playerUsingMap{playerid} && (MatchingInfo[joined][m_STATE] == STATE_BLUE || MatchingInfo[joined][m_STATE] == STATE_WHITE)) {
  10.         if(circleshiftPlayerTextDrawCount[playerid] == 0) {
  11.             circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 112.799987, 308.628845, "_G");
  12.             PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.000000, 0.039999);
  13.             PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 26.399997, 60.000000);
  14.             PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  15.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  16.             PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], true);
  17.             PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 80);
  18.             PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  19.             PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  20.             PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  21.             PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
  22.  
  23.             circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 116.399978, 308.628845, "_W");
  24.             PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.000000, 0.000000);
  25.             PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 109.600021, 60.000000);
  26.             PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  27.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  28.             PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], true);
  29.             PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], -1);
  30.             PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  31.             PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  32.             PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  33.             PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
  34.  
  35.             circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 33.199958, 308.628875, "_B");
  36.             PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.000000, 0.000000);
  37.             PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 26.399997, 60.000000);
  38.             PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  39.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  40.             PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], true);
  41.             PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 20700927);
  42.             PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  43.             PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  44.             PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  45.             PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
  46.  
  47.             circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_BLUE] = circleshiftPlayerTextDrawCount[playerid];
  48.             circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 33.200077, 308.628845, "_R");
  49.             PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.000000, 0.000000);
  50.             PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 30.000005, 60.000000);
  51.             PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  52.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  53.             PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], true);
  54.             PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 778370815);
  55.             PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  56.             PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  57.             PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  58.             PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
  59.            
  60.             circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_TIME] = circleshiftPlayerTextDrawCount[playerid];
  61.             circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 26.800024, 293.191101, "!");
  62.             PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.159997, 1.052443);
  63.             PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  64.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], -1);
  65.             PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  66.             PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  67.             PlayerTextDrawBackgroundColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 51);
  68.             PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 2);
  69.             PlayerTextDrawSetProportional(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  70.             PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
  71.        
  72.             circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_RUN] = circleshiftPlayerTextDrawCount[playerid];
  73.             circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]] = CreatePlayerTextDraw(playerid, 29.599977, 303.146575, "mdl-2001:runing_pin");
  74.             PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0.071998, 0.199110);
  75.             PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 4.000001, 8.959998);
  76.             PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 1);
  77.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], -1);
  78.             PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  79.             PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]], 0);
  80.             PlayerTextDrawSetSelectable(playerid, circleshiftPlayerTextDraw[playerid][circleshiftPlayerTextDrawCount[playerid]++], 0);
  81.         }
  82.  
  83.         new temp_td;
  84.         new Float:PPx,Float:PPy,Float:PPz; 
  85.         GetPlayerPos(playerid, PPx, PPy, PPz);
  86.    
  87.         if(MatchingInfo[joined][m_STATE] == STATE_BLUE) {
  88.        
  89.             temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_TIME];
  90.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], (MatchingInfo[joined][m_Timer]%2) ? -16776961 : -1);
  91.             PlayerTextDrawSetString(playerid, circleshiftPlayerTextDraw[playerid][temp_td], "!");
  92.        
  93.         }
  94.         else if(MatchingInfo[joined][m_STATE] == STATE_WHITE) {
  95.             new str[64], minutes, seconds = MatchingInfo[joined][m_Timer];
  96.            
  97.             ConvertTime(seconds, minutes);
  98.            
  99.             if(minutes)
  100.                 format(str, 16, "%d:%02d", minutes, seconds);
  101.             else
  102.                 format(str, 16, "%d", seconds);
  103.                
  104.             temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_TIME];
  105.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], -1);
  106.             PlayerTextDrawSetString(playerid, circleshiftPlayerTextDraw[playerid][temp_td], str);
  107.         }
  108.         else {
  109.             temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_TIME];
  110.             PlayerTextDrawSetString(playerid, circleshiftPlayerTextDraw[playerid][temp_td], "_");
  111.         }
  112.         new Float:cal_run, Float:cal_pin, Float:BaseSize;
  113.         new temp_shrink_id = MatchingInfo[joined][m_circleID];
  114.         if(temp_shrink_id < 1) {
  115.             BaseSize = MAP_SIZE_LIMIT;
  116.         }
  117.         else {
  118.             BaseSize = CircleData[temp_shrink_id-1][CIRCLEDATA_SIZE];
  119.         }
  120.         cal_run = 33.200077 + (float(CircleData[temp_shrink_id][CIRCLEDATA_BLUETIME]-MatchingInfo[joined][m_Timer]) * 79.599994 / float(CircleData[temp_shrink_id][CIRCLEDATA_BLUETIME]));
  121.        
  122.         if(cal_run > 112.800071) {
  123.             cal_run = 112.800071;
  124.         }
  125.         else if(cal_run < 33.200077) {
  126.             cal_run = 33.200077;
  127.         }
  128.        
  129.         new Float: tempWDistance = GetPlayerDistanceFromPoint(playerid, MatchingInfo[joined][m_WX], MatchingInfo[joined][m_WY], PPz);
  130.  
  131.         if(tempWDistance < MatchingInfo[joined][m_WRad]) {
  132.             // ÍÂÙèã¹Ç§¢ÒÇ
  133.             cal_pin = 108.800041;
  134.         }
  135.         else {
  136.             new Float: PlayerToWhiteDis = tempWDistance - MatchingInfo[joined][m_WRad];
  137.             cal_pin = 29.599977 + ((BaseSize-PlayerToWhiteDis) * 79.200064 / BaseSize);
  138.         }
  139.        
  140.         new pincolor = -1;
  141.        
  142.         if(cal_pin > 108.800041) {
  143.             cal_pin = 108.800041;
  144.         }
  145.         else if(cal_pin < 29.599977) {
  146.             cal_pin = 28.599977;
  147.            
  148.             pincolor = (MatchingInfo[joined][m_Timer]%2) ? -16776961 : -1;
  149.         }
  150.         // µèÒ§¡Ñ¹ 3.6001
  151.         temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_RUN];
  152.         PlayerTextDrawDestroy(playerid, circleshiftPlayerTextDraw[playerid][temp_td]);
  153.         circleshiftPlayerTextDraw[playerid][temp_td] = CreatePlayerTextDraw(playerid, cal_pin, 303.146575, "mdl-2001:runing_pin"); // µèÓÊØ´ 29.599977 ÁÒ¡ÊØ´ 108.800041
  154.         PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0.071998, 0.199110);
  155.         PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 4.000001, 8.959998);
  156.         PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
  157.         PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], pincolor);
  158.         PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
  159.         PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
  160.         PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 4);
  161.        
  162.         if(MatchingInfo[joined][m_STATE] != STATE_BLUE) {
  163.             temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_BLUE];
  164.             PlayerTextDrawDestroy(playerid, circleshiftPlayerTextDraw[playerid][temp_td]);
  165.             circleshiftPlayerTextDraw[playerid][temp_td] = CreatePlayerTextDraw(playerid,  33.200077, 308.628845, "_R"); // µèÓÊØ´ 33.200077 ÁÒ¡ÊØ´ 112.800071
  166.             PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0.000000, 0.000000);
  167.             PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 30.000005, 60.000000);
  168.             PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
  169.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
  170.             PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][temp_td], true);
  171.             PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 778370815);
  172.             PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
  173.             PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
  174.             PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
  175.         }
  176.         else {
  177.             temp_td = circleshiftPlayerTextDrawID[playerid][E_CIRCLESHIFT_BLUE];
  178.             PlayerTextDrawDestroy(playerid, circleshiftPlayerTextDraw[playerid][temp_td]);
  179.             circleshiftPlayerTextDraw[playerid][temp_td] = CreatePlayerTextDraw(playerid, cal_run, 308.628845, "_R"); // µèÓÊØ´ 33.200077 ÁÒ¡ÊØ´ 112.800071
  180.             PlayerTextDrawLetterSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0.000000, 0.000000);
  181.             PlayerTextDrawTextSize(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 30.000005, 60.000000);
  182.             PlayerTextDrawAlignment(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
  183.             PlayerTextDrawColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
  184.             PlayerTextDrawUseBox(playerid, circleshiftPlayerTextDraw[playerid][temp_td], true);
  185.             PlayerTextDrawBoxColor(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 778370815);
  186.             PlayerTextDrawSetShadow(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
  187.             PlayerTextDrawSetOutline(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 0);
  188.             PlayerTextDrawFont(playerid, circleshiftPlayerTextDraw[playerid][temp_td], 1);
  189.         }
  190.        
  191.         if(playerUsingcircleshift{playerid}) {
  192.             for (new i; i < circleshiftPlayerTextDrawCount[playerid]; i++)
  193.             {
  194.                 PlayerTextDrawShow(playerid, circleshiftPlayerTextDraw[playerid][i]);
  195.             }
  196.         }
  197.     }
  198. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement