Castillo Posted July 10, 2013 Share Posted July 10, 2013 No, that wouldn't make any difference. Link to comment
MACIEKW89 Posted July 10, 2013 Author Share Posted July 10, 2013 Or server version problem? My server 1.3.1 . Link to comment
Castillo Posted July 10, 2013 Share Posted July 10, 2013 Upload the entire resoruce to mediafire.com and paste here the link. Link to comment
MACIEKW89 Posted July 10, 2013 Author Share Posted July 10, 2013 Resource what i have? Or new in DX? Link to comment
Castillo Posted July 10, 2013 Share Posted July 10, 2013 I don't know, upload the one we're talking about...? Link to comment
MACIEKW89 Posted July 10, 2013 Author Share Posted July 10, 2013 I have new.... on dx: addEventHandler("onClientRender", root, function() dxDrawRectangle(0, 725, 1024, 43, tocolor(0, 155, 255, 160), true) dxDrawText("Nick:", 90, 730, 362, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:", 90, 728, 362, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:", 88, 730, 360, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:", 88, 728, 360, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:", 89, 729, 361, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:", 367, 730, 639, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:", 367, 728, 639, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:", 365, 730, 637, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:", 365, 728, 637, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:", 366, 729, 638, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:", 643, 730, 915, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:", 643, 728, 915, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:", 641, 730, 913, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:", 641, 728, 913, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:", 642, 729, 914, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) end ) It is with outline... How can i do...get nick, score and money in it? Link to comment
Castillo Posted July 10, 2013 Share Posted July 10, 2013 Same way as in the other one. Link to comment
MACIEKW89 Posted July 10, 2013 Author Share Posted July 10, 2013 It good? addEventHandler("onClientRender", root, function() local it = getPlayerName () dxDrawRectangle(0, 725, 1024, 43, tocolor(0, 155, 255, 160), true) dxDrawText("Nick:"..tostring(it)"", 90, 730, 362, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..tostring(it)"", 90, 728, 362, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..tostring(it)"", 88, 730, 360, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..tostring(it)"", 88, 728, 360, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..tostring(it)"", 89, 729, 361, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..getElementData(localplayer, "Score")"", 367, 730, 639, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..getElementData(localplayer, "Score")"", 367, 728, 639, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..getElementData(localplayer, "Score")"", 365, 730, 637, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..getElementData(localplayer, "Score")"", 365, 728, 637, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..getElementData(localplayer, "Score")"", 366, 729, 638, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..getPlayerMoney()"$", 643, 730, 915, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..getPlayerMoney()"$", 643, 728, 915, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..getPlayerMoney()"$", 641, 730, 913, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..getPlayerMoney()"$", 641, 728, 913, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..getPlayerMoney()"$", 642, 729, 914, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) end ) Link to comment
Castillo Posted July 10, 2013 Share Posted July 10, 2013 No, wrong. addEventHandler("onClientRender", root, function() local it = getPlayerName ( localPlayer ) local score = tostring ( getElementData(localplayer, "Score") ) local money = getPlayerMoney() dxDrawRectangle(0, 725, 1024, 43, tocolor(0, 155, 255, 160), true) dxDrawText("Nick:"..it, 90, 730, 362, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..it, 90, 728, 362, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..it, 88, 730, 360, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..it, 88, 728, 360, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..it, 89, 729, 361, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 367, 730, 639, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 367, 728, 639, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 365, 730, 637, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 365, 728, 637, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 366, 729, 638, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 643, 730, 915, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 643, 728, 915, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 641, 730, 913, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 641, 728, 913, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 642, 729, 914, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) end ) Link to comment
MACIEKW89 Posted July 10, 2013 Author Share Posted July 10, 2013 (edited) IT'S WORK!!!!! THANK YOU !!!! 3 Problem's: 1. How i can set nick without color code? 2. It set Score: False how repair it? 3. How i can get player screen beacause players can't see board like me ?? Edited July 10, 2013 by Guest Link to comment
Castillo Posted July 10, 2013 Share Posted July 10, 2013 addEventHandler ( "onClientRender", root, function ( ) local it = getPlayerName ( localPlayer ):gsub ( "#%x%x%x%x%x%x", "" ) local score = tostring ( tonumber ( getElementData ( localplayer, "Score" ) ) or 0 ) local money = tostring ( getPlayerMoney ( ) ) dxDrawRectangle(0, 725, 1024, 43, tocolor(0, 155, 255, 160), true) dxDrawText("Nick:"..it, 90, 730, 362, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..it, 90, 728, 362, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..it, 88, 730, 360, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..it, 88, 728, 360, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick:"..it, 89, 729, 361, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 367, 730, 639, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 367, 728, 639, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 365, 730, 637, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 365, 728, 637, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Score:"..score, 366, 729, 638, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 643, 730, 915, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 643, 728, 915, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 641, 730, 913, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 641, 728, 913, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Money:"..money.."$", 642, 729, 914, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) end ) Link to comment
MACIEKW89 Posted July 10, 2013 Author Share Posted July 10, 2013 How getscreen? I set the Rectangle under radar(minimap)....player see board on the radar or up... Edit. Score is everything Score: 0 why? Link to comment
Castillo Posted July 10, 2013 Share Posted July 10, 2013 That's because the element data "Score" is never set, maybe you put wrong data name. Link to comment
MACIEKW89 Posted July 11, 2013 Author Share Posted July 11, 2013 I set the "Score" on my Login/Register panel....on player click Register(Rejestruj in polish) then the script setElementData "Score" 1.....IT IS ON SERVER SIDE.......on my script for board getElementData is on CLIENT SIDE ... mybye this is a problem? Or I don't know Link to comment
Castillo Posted July 12, 2013 Share Posted July 12, 2013 You set it to sync the element data? Link to comment
MACIEKW89 Posted July 12, 2013 Author Share Posted July 12, 2013 Here is my register code: function Rejestruj_Server(gracz,username, password) local account = getAccount(username, password) if (account ~= false) then outputChatBox("Takie konto juz istnieje.",gracz,255,0,0) else account = addAccount(username, password) setElementData(gracz,"konto_login",username) givePlayerMoney( gracz, 5000 ) setAccountData(account,"cash",5000) setAccountData(account,"score",1) setElementData(gracz,"Score",1) outputChatBox("Pomyślnie zarejestrowano konto",gracz,255,20,255) outputChatBox("Witaj!Jesteś nowy?Przeczytaj informacje pod klawiszem 'F9'",gracz,true,255,20,255) end end addEvent("submitRegister",true) addEventHandler("submitRegister",getRootElement(),Rejestruj_Server) In Polish it is. Link to comment
Castillo Posted July 12, 2013 Share Posted July 12, 2013 Ah, I found the problem, it says "localplayer" at getElementData. Change: local score = tostring ( tonumber ( getElementData ( localplayer, "Score" ) ) or 0 ) to: local score = tostring ( tonumber ( getElementData ( localPlayer, "Score" ) ) or 0 ) Link to comment
MACIEKW89 Posted July 15, 2013 Author Share Posted July 15, 2013 THX IT'S WORK!!! Now i wanna guiGetScreenSize in dx.....how can i do it? Link to comment
Fury Posted July 15, 2013 Share Posted July 15, 2013 Now i wanna guiGetScreenSize in dx.....how can i do it? local x,y = guiGetScreenSize() and check viewtopic.php?f=91&t=41865&p=423999#p423999 Link to comment
MACIEKW89 Posted July 20, 2013 Author Share Posted July 20, 2013 I do it : addEventHandler("onClientRender", root, function() local it = getPlayerName(localPlayer):gsub ("#%x%x%x%x%x%x","") local score = tostring ( tonumber ( getElementData ( localPlayer, "Score" ) ) or 0 ) local money = getPlayerMoney(localplayer) local x, y = guiGetScreenSize() local x = (screenWidth) local y = (screenHeight- guiHeight) dxDrawRectangle(0/x, 725/y, 1024, 43, tocolor(0, 155, 255, 160), true) --x 0, y 725 dxDrawText("Nick: "..it, 90, 730, 362, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick: "..it, 90, 728, 362, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick: "..it, 88, 730, 360, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick: "..it, 88, 728, 360, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick: "..it, 89, 729, 361, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 367, 730, 639, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 367, 728, 639, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 365, 730, 637, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 365, 728, 637, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 366, 729, 638, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 643, 730, 915, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 643, 728, 915, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 641, 730, 913, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 641, 728, 913, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 642, 729, 914, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) end ) Not found In debug i see a problem with local screenHeight: DEBUG: attempt to perform arithmetic on global'screenHeight' (a nil value) Link to comment
Castillo Posted July 20, 2013 Share Posted July 20, 2013 addEventHandler("onClientRender", root, function() local it = getPlayerName(localPlayer):gsub ("#%x%x%x%x%x%x","") local score = tostring ( tonumber ( getElementData ( localPlayer, "Score" ) ) or 0 ) local money = getPlayerMoney(localplayer) local x, y = guiGetScreenSize() dxDrawRectangle(0/x, 725/y, 1024, 43, tocolor(0, 155, 255, 160), true) --x 0, y 725 dxDrawText("Nick: "..it, 90, 730, 362, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick: "..it, 90, 728, 362, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick: "..it, 88, 730, 360, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick: "..it, 88, 728, 360, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Nick: "..it, 89, 729, 361, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 367, 730, 639, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 367, 728, 639, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 365, 730, 637, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 365, 728, 637, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText(" Score: "..score, 366, 729, 638, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 643, 730, 915, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 643, 728, 915, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 641, 730, 913, 759, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 641, 728, 913, 757, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) dxDrawText("Pieniadze: "..money.." $", 642, 729, 914, 758, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "bottom", false, false, true, false, false) end ) Link to comment
MACIEKW89 Posted July 20, 2013 Author Share Posted July 20, 2013 Not found 0 errors in debug. The board is on up screen...i wanna do it on down... Texts too. Link to comment
MACIEKW89 Posted July 20, 2013 Author Share Posted July 20, 2013 Mybye wrong coordinates ? Bug in guieditor ? Link to comment
Castillo Posted July 20, 2013 Share Posted July 20, 2013 You want to put it down the screen? on the center? 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