IIIIlllllIII Posted September 20, 2011 Share Posted September 20, 2011 hi i make shop and i have problems with it the problem i cant see the info like serial and ping and money see the code and fix it pleeez client said tab1 = guiCreateTab("Info",tabPanel) playerMoneyLabel = guiCreateLabel(8,137,320,18,"Your Money: "..tostring(money).." ",false,tab1) guiLabelSetColor(playerMoneyLabel,255,255,0) guiLabelSetVerticalAlign(playerMoneyLabel,"top") guiLabelSetHorizontalAlign(playerMoneyLabel,"left",false) playerPingLabel = guiCreateLabel(8,165,320,18,"Your Ping:"..tostring(ping).." ",false,tab1) guiLabelSetColor(playerPingLabel,255,255,0) playerIPLabel = guiCreateLabel(8,190,320,18,"Your IP: "..tostring(ips).." ",false,tab1) guiLabelSetColor(playerIPLabel,255,255,0) playerSrLabel = guiCreateLabel(8,211,320,18,"Your Serial: "..tostring(srs).." ",false,tab1) guiLabelSetColor(playerSrLabel,255,255,0) server said addEventHandler("onPlayerJoin",root, function() ping = getPlayerPing(source) money = getPlayerMoney(source) ips = getPlayerIP(source) srs = getPlayerSerial(source) setElementData(source,"ping",ping) setElementData(source,"money",money) setElementData(source,"ips",ips) setElementData(source,"srs",srs) end ) i want see the info in the shop panel like serial and money and ping but i have problem i cant see the info give me nil when i put false give me false like money:false ping:false serial:false or give me another problem like money: nil serial :nil ping : nil plz fix it i try all my day to fix tis problem Link to comment
TAPL Posted September 20, 2011 Share Posted September 20, 2011 tab1 = guiCreateTab("Info",tabPanel) playerMoneyLabel = guiCreateLabel(8,137,320,18,"Your Money: "..getElementData(localPlayer,"money").." ",false,tab1) guiLabelSetColor(playerMoneyLabel,255,255,0) guiLabelSetVerticalAlign(playerMoneyLabel,"top") guiLabelSetHorizontalAlign(playerMoneyLabel,"left",false) playerPingLabel = guiCreateLabel(8,165,320,18,"Your Ping:"..getElementData(localPlayer,"ping").." ",false,tab1) guiLabelSetColor(playerPingLabel,255,255,0) playerIPLabel = guiCreateLabel(8,190,320,18,"Your IP: "..getElementData(localPlayer,"ips").." ",false,tab1) guiLabelSetColor(playerIPLabel,255,255,0) playerSrLabel = guiCreateLabel(8,211,320,18,"Your Serial: "..getElementData(localPlayer,"srs").." ",false,tab1) guiLabelSetColor(playerSrLabel,255,255,0) Link to comment
IIIIlllllIII Posted September 20, 2011 Author Share Posted September 20, 2011 tab1 = guiCreateTab("Info",tabPanel) playerMoneyLabel = guiCreateLabel(8,137,320,18,"Your Money: "..getElementData(localPlayer,"money").." ",false,tab1) guiLabelSetColor(playerMoneyLabel,255,255,0) guiLabelSetVerticalAlign(playerMoneyLabel,"top") guiLabelSetHorizontalAlign(playerMoneyLabel,"left",false) playerPingLabel = guiCreateLabel(8,165,320,18,"Your Ping:"..getElementData(localPlayer,"ping").." ",false,tab1) guiLabelSetColor(playerPingLabel,255,255,0) playerIPLabel = guiCreateLabel(8,190,320,18,"Your IP: "..getElementData(localPlayer,"ips").." ",false,tab1) guiLabelSetColor(playerIPLabel,255,255,0) playerSrLabel = guiCreateLabel(8,211,320,18,"Your Serial: "..getElementData(localPlayer,"srs").." ",false,tab1) guiLabelSetColor(playerSrLabel,255,255,0) thank you TAPL very much for the help sorry for insult you and im so sorry agine in arabic شكرا يالحبيب واسفين على الغلط ترا الانسان خطاء وترا مو انا اللي مخترق سيرفرك سعود واللي معه وانا سبيتك لانك ماعطيتني الشوب وخربتو سيرفري بادمنيه مهستر وعلشان كذا قلت بفضحك وحطيت الصوره واسف على الخطاء وتكبر وتنساها وشكرا على المساعده Link to comment
TAPL Posted September 20, 2011 Share Posted September 20, 2011 (edited) this is better code tab1 = guiCreateTab("Info",tabPanel) playerMoneyLabel = guiCreateLabel(8,137,320,18,"Your Money: "..getPlayerMoney(localPlayer).." ",false,tab1) guiLabelSetColor(playerMoneyLabel,255,255,0) guiLabelSetVerticalAlign(playerMoneyLabel,"top") guiLabelSetHorizontalAlign(playerMoneyLabel,"left",false) playerPingLabel = guiCreateLabel(8,165,320,18,"Your Ping:"..getPlayerPing(localPlayer).." ",false,tab1) guiLabelSetColor(playerPingLabel,255,255,0) playerIPLabel = guiCreateLabel(8,190,320,18,"Your IP: "..getElementData(localPlayer,"ips").." ",false,tab1) guiLabelSetColor(playerIPLabel,255,255,0) playerSrLabel = guiCreateLabel(8,211,320,18,"Your Serial: "..getPlayerSerial(localPlayer).." ",false,tab1) guiLabelSetColor(playerSrLabel,255,255,0) addEventHandler("onPlayerJoin",root, function() ips = getPlayerIP(source) setElementData(source,"ips",ips) end) ^^ also you will need a function to keep the money and ping updated... You're welcome EDIT: i didn't notice that getPlayerSerial is also can be client , it's add client side in 1.1 right? -.- Edited September 20, 2011 by Guest Link to comment
Castillo Posted September 20, 2011 Share Posted September 20, 2011 getPlayerSerial is also client side, so you don't need to send it from the server side. Link to comment
IIIIlllllIII Posted September 20, 2011 Author Share Posted September 20, 2011 getPlayerSerial is also client side, so you don't need to send it from the server side. no i test that and give me error attempt to call global 'getPlayerSerial' (a nil value in debugscript 3 and thank you TAPL your code work great and thank you soldisnake14 Link to comment
TAPL Posted September 20, 2011 Share Posted September 20, 2011 that because you use it in 1.0.5 if you use it in 1.1 you will have no problem 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