Advertisement
KiLLerBoy_001

GTA 5: TalkingPlayer Function

Nov 11th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.47 KB | None | 0 0
  1. //-----------------  Talking players  -----------------
  2. //
  3. // Just enable TalkingPlayers Bool and make sure that Talking cahr* gets added onscreen somewhere
  4. //-----------------------------------------------------
  5.  
  6.  
  7. #include <math.h>
  8.  
  9.  
  10.  
  11. TalkingPlayerLoop()
  12. {
  13.    int Count;
  14.    if (TalkingPlayers)
  15.    {
  16.    DrawTexture("CommonMenu", "interaction_bgd",0.1f,0.1f,0.15f,0.04f, 0, 255, 255, 255, 255);  //TitleBar
  17.    GRAPHICS::DRAW_RECT(0.1f, 0.12f, 0.15f, 0.005f, indicatorRed, indicatorGreen, indicatorBlue, indicatorOpacity);
  18.       for (int i = 0; i =< 32; ++i)
  19.       {
  20.          if (NETWORK::NETWORK_IS_PLAYER_TALKING(i) == true )
  21.          {
  22.             std::string playerName = GET_PLAYER_NAME(i);
  23.             Count++
  24.             //Use either of the 2 First is with opacity 2nd is with gradient rotation is -90f could need to be 90f though :P
  25.             GRAPHICS::DRAW_RECT(0.1f,(0.25f * Count + 0.11f),0.15f,0.025f,backgroundRed,backgroundGreen,backgroundBlue,120);            //Option Background
  26. DrawTexture("frontend","gradient_background",0.1f,(0.25f * Count + 0.11f),0.15f,0.025f,-90f,backgroundRed,backgroundGreen,backgroundBlue,backgroundOpacity);    //Option Background
  27.             //
  28.             DrawTextToScreen(playerName,4,0.11f,(0.25f * Count + 0.11f),0.3f,0.25f,optionsRed,optionsGreen,optionsBlue,optionsOpacity,false);   //Players name
  29.          }
  30.       }
  31.    GRAPHICS::DRAW_RECT(0.1f,(0.25f * Count +0.12f), 0.15f, 0.005f, indicatorRed, indicatorGreen, indicatorBlue, indicatorOpacity);
  32.    }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement