P[ow]er Posted August 3, 2017 Share Posted August 3, 2017 hi i have a question when a player watching me i see who is whatching me but when i watch other player he is too see know who watch himself but i cant see who watching him and nothing in debug anyone can help me ? this is race_client.lua setTimer( function() --Specs local snr = 0 for k, v in ipairs(getElementsByType("player")) do local label = getPlayerNametagText(v) if getElementData(v, 'spectates') == getLocalPlayer() then snr = snr + 1 if posLabel[label] ~= nil then setElementData(posLabel[label], "spectated", true) setElementData(playerLabel[label], "spectated", true) end else if posLabel[label] ~= nil then setElementData(posLabel[label], "spectated", false) setElementData(playerLabel[label], "spectated", false) end end end end ,50,0) and this rankingboard_client.lua addEventHandler("onClientRender", getRootElement(), function() for id, elem in pairs(playerLabel) do if guiGetVisible(elem) and string.len(guiGetText(elem)) > 4 then local x,y = guiGetPosition(elem, false) local a = guiGetAlpha(elem) * 255 if not getKeyState("tab") then dxDrawColoredLabel(string.gsub(guiGetText(elem)," ", " ",1), 65,y,200,y+17, tocolor(255,255,255,a),{255,255,255,a},1, font, "left", "center", false,false,false) if getElementData(playerLabel[id], "spectated") ~= nil then if getElementData(playerLabel[id], "spectated") then dxDrawImage(17,y,16,16,"img/eye.png", 0,0,0,tocolor(255,255,255,255), false) end end end if x < 100 then guiSetPosition(elem, sx+100,y,false) end end end for id, elem in pairs(posLabel) do if guiGetVisible(elem) and string.len(guiGetText(elem)) <= 4 then local x,y = guiGetPosition(elem, false ) local a = guiGetAlpha(elem) * 255 if not getKeyState("tab") then if getElementData(posLabel[id],"spectated") == true then dxDrawText(guiGetText(elem), 1,y+1,56,y+18, tocolor(0,0,0,math.floor(a*0.8)), 1, font, "right", "center", false,false,false) dxDrawText(guiGetText(elem), 0,y,55,y+17, tocolor(127,255,212,a), 1, font, "right", "center", false,false,false) else dxDrawText(guiGetText(elem), 1,y+1,56,y+18, tocolor(0,0,0,math.floor(a*0.8)), 1, font, "right", "center", false,false,false) dxDrawText(guiGetText(elem), 0,y,55,y+17, tocolor(255,255,255,a), 1, font, "right", "center", false,false,false) end end if x < 100 then guiSetPosition(elem, sx+100,y,false) end end end end) Link to comment
P[ow]er Posted August 3, 2017 Author Share Posted August 3, 2017 no one can help ??? PLEASE Link to comment
koragg Posted August 3, 2017 Share Posted August 3, 2017 Try to see how this is made, it works perfect: https://community.multitheftauto.com/index.php?p=resources&s=details&id=5028 Link to comment
P[ow]er Posted August 3, 2017 Author Share Posted August 3, 2017 lol dude my spectator like this i need this script 1 Link to comment
koragg Posted August 4, 2017 Share Posted August 4, 2017 So try to fix it by looking at how the one i sent you works... i never said you should use what i sent you, just that it works fine so you can try fix yours by looking at it. Link to comment
P[ow]er Posted August 4, 2017 Author Share Posted August 4, 2017 but i dont know how to fix it... Link to comment
NeXuS™ Posted August 4, 2017 Share Posted August 4, 2017 You should try to fix it, on your OWN and if you are stuck somewhere, we'll help ya. We won't make you the whole script if you don't even try. Downloading scripts and asking the community to edit it for you is not called scripting at all. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now