Jump to content

SnoopCat Scripting Problems.


SnoopCat

Recommended Posts

hello i have a spectator script that i modified to show Cash FPS and Spectators in numbres... but the problem i have is on the cash thing when the map changes the money come back to 0 when u have like 900.0000 i tried adding a settimer to update the text but even is not working... can someone help me ? there is the script:

function drawSpectators() 
    local textX = x - spectatorSettings.xOffset 
    local textY = spectatorSettings.yOffset  
    dxDrawText("MIRANDO: "..tonumber(#spectators), textX - 0.2, textY - 0.2, x, y, tocolor(0, 0, 0, 255), 0.4, "bankgothic") 
    drawColor("#00FF00MIRANDO: #ffffff"..tonumber(#spectators), textX, textY, x, y, tocolor(83, 134, 139), 0.4, "bankgothic") 
    dxDrawText("FPS: "..tonumber(getElementData(getLocalPlayer(), "fps")), textX - 0.2, textY + 15 - 0.2, x, y, tocolor(0, 0, 0, 255), 0.4, "bankgothic") 
    drawColor("#00FF00FPS: #ffffff"..tonumber(getElementData(getLocalPlayer(), "fps")), textX, textY + 15, x, y, tocolor(15, 192, 252, 255), 0.4, "bankgothic") 
    dxDrawText("$: "..tonumber(getPlayerMoney(getLocalPlayer())), textX - 0.2, textY + 15 + 15 - 0.2, x, y, tocolor(0, 0, 0, 255), 0.4, "bankgothic") 
    drawColor("#00FF00$: #ffffff"..tonumber(getPlayerMoney(getLocalPlayer())), textX, textY + 15 + 15, x, y, tocolor(15, 192, 252, 255), 0.4, "bankgothic") 
    setTimer ( updateText, 1000, 0 ) 
end 

if i have to show more of the script plz say :)

Edited by Guest
Link to comment
  • Replies 74
  • Created
  • Last Reply

Top Posters In This Topic

function drawSpectators() 
    local textX = x - spectatorSettings.xOffset 
    local textY = spectatorSettings.yOffset  
    dxDrawText("MIRANDO: "..tostring(#spectators), textX - 0.2, textY - 0.2, x, y, tocolor(0, 0, 0, 255), 0.4, "bankgothic") 
    drawColor("#00FF00MIRANDO: #ffffff"..tonumber(#spectators), textX, textY, x, y, tocolor(83, 134, 139), 0.4, "bankgothic") 
    dxDrawText("FPS: "..tostring(getElementData(getLocalPlayer(), "fps")), textX - 0.2, textY + 15 - 0.2, x, y, tocolor(0, 0, 0, 255), 0.4, "bankgothic") 
    drawColor("#00FF00FPS: #ffffff"..tostring(getElementData(getLocalPlayer(), "fps")), textX, textY + 15, x, y, tocolor(15, 192, 252, 255), 0.4, "bankgothic") 
    dxDrawText("$: "..tostring(getPlayerMoney()), textX - 0.2, textY + 15 + 15 - 0.2, x, y, tocolor(0, 0, 0, 255), 0.4, "bankgothic") 
    drawColor("#00FF00$: #ffffff"..tostring(getPlayerMoney()), textX, textY + 15 + 15, x, y, tocolor(15, 192, 252, 255), 0.4, "bankgothic") 
end 
addEventHandler("onClientRender",root,drawSpectators) 

You're insane, a timer into a onClientRender event handler?!

Edited by Guest
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...