SnoopCat Posted December 11, 2011 Share Posted December 11, 2011 (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 December 12, 2011 by Guest Link to comment
Castillo Posted December 11, 2011 Share Posted December 11, 2011 (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 December 11, 2011 by Guest Link to comment
SnoopCat Posted December 11, 2011 Author Share Posted December 11, 2011 idk what to do can u help i need money showing all te time Link to comment
SnoopCat Posted December 12, 2011 Author Share Posted December 12, 2011 how i can make it its same problem 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.... Link to comment
Castillo Posted December 12, 2011 Share Posted December 12, 2011 That script is getting the money on every render. Link to comment
SnoopCat Posted December 12, 2011 Author Share Posted December 12, 2011 its same as i was do.... still same problem of refreshing 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 Link to comment
SnoopCat Posted December 12, 2011 Author Share Posted December 12, 2011 is there any way to refresh status of money every 1 sec? so it will be showing all the time Link to comment
Castillo Posted December 12, 2011 Share Posted December 12, 2011 Stop double-posting and wait for an answer. P.S: As I said, is updating every render, is faster than every second. Link to comment
SnoopCat Posted December 12, 2011 Author Share Posted December 12, 2011 but im still having same problem when maps change it becomes to 0 again when u have for example 74499 of money its says 0 Link to comment
SnoopCat Posted December 12, 2011 Author Share Posted December 12, 2011 srry for double but i rly need help Link to comment
Xeno Posted December 12, 2011 Share Posted December 12, 2011 You mean, when the map changes your money goes back to 0? Link to comment
SnoopCat Posted December 12, 2011 Author Share Posted December 12, 2011 yup but only on this script cuz real u have 500 but script when maps changes it says u have 0 but rly u have 500 Link to comment
Castillo Posted December 12, 2011 Share Posted December 12, 2011 Are you using any kind of custom money system? like race_starter_pack one. Link to comment
SnoopCat Posted December 12, 2011 Author Share Posted December 12, 2011 (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 December 12, 2011 by Guest Link to comment
Castillo Posted December 12, 2011 Share Posted December 12, 2011 race_starter_pack doesn't use the GTA money system... it uses ELEMENT DATA. Link to comment
SnoopCat Posted December 12, 2011 Author Share Posted December 12, 2011 but mine uses gta money system... i know that... Link to comment
12p Posted December 12, 2011 Share Posted December 12, 2011 Then yeah let's make a brand new system instead of using predefined one's!!! Link to comment
SnoopCat Posted December 12, 2011 Author Share Posted December 12, 2011 why we should create a new 1 if we can use this one... the thing i need is fix the script... Link to comment
BorderLine Posted December 12, 2011 Share Posted December 12, 2011 hey man but in the settimer must put the name of fuction to refreshing the money setTimer (drawSpectators, 1000, 0 ) i dont know if i wrong but try Link to comment
Castillo Posted December 12, 2011 Share Posted December 12, 2011 That's wrong Yakuza... he's already refreshing every render. Link to comment
SnoopCat Posted December 13, 2011 Author Share Posted December 13, 2011 soo how i can do it im confused Link to comment
HunT Posted December 13, 2011 Share Posted December 13, 2011 Made the indipendent script with event onPlayerSpawn (server side) and trig client for dx or Gui label. Link to comment
SnoopCat Posted December 13, 2011 Author Share Posted December 13, 2011 can u make a little exaple plz? Link to comment
12p Posted December 13, 2011 Share Posted December 13, 2011 Do you know ANYTHING about triggering for client? Link to comment
SnoopCat Posted December 13, 2011 Author Share Posted December 13, 2011 not to much that why im asking for an exaple i know that triggerClientEvent call an event from the client side to the server side, Im grong on that? 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