Jump to content

SnoopCat Scripting Problems.


SnoopCat

Recommended Posts

Posted (edited)

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
  • Replies 74
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)
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
Posted

how i can make it its same problem :S when map changes money come to 0 again , my question is what i can do to get money status refreshing every 1 sec so this will not gonna happens....

Posted

its same as i was do.... still same problem of refreshing :S when map changes it comes to 0 often if you buy something or get money by wining the race it shows again but when u change map it comes back to 0 again :S

Posted (edited)
Are you using any kind of custom money system? like race_starter_pack one.

yes.but isnt race starter pack but is like that one

Edited by Guest

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...