Advertisement
Guest User

Currently Talking Code

a guest
Mar 10th, 2021
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. -- local playerServerId = GetPlayerServerId(PlayerId())
  2.  
  3. while true do
  4. Citizen.Wait(1)
  5. local t = 0
  6. for i = 0,32 do
  7. if(GetPlayerName(i))then
  8. if(NetworkIsPlayerTalking(i))then
  9. t = t + 1
  10. if(t == 1)then
  11. drawTxt(0.515, 1.19, 1.0,1.0,0.3, "~y~Talking", 255, 255, 255, 255)
  12. end
  13. drawTxt(0.515, 1.19 + (t * 0.023), 1.0,1.0,0.4, "" .. GetPlayerName(i), 255, 255, 255, 255)
  14. end
  15. end
  16. end
  17. end
  18. end
  19. end)
  20.  
  21. function drawTxt(x,y ,width,height,scale, text, r,g,b,a)
  22. SetTextFont(0)
  23. SetTextProportional(0)
  24. SetTextScale(scale, scale)
  25. SetTextColour(r, g, b, a)
  26. SetTextDropShadow(0, 0, 0, 0,255)
  27. SetTextEdge(1, 0, 0, 0, 255)
  28. SetTextDropShadow()
  29. SetTextOutline()
  30. SetTextEntry("STRING")
  31. AddTextComponentString(text)
  32. DrawText(x - width/2, y - height/2 + 0.005)
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement