Resto Posted August 4, 2015 Share Posted August 4, 2015 Can anyone fix this please? i dont know why not work show/hide with F4.. GUIEditor = { gridlist = {}, label = {} } GUIEditor.gridlist[1] = guiCreateGridList(0.31, 0.00, 0.35, 0.0350, true) guiSetAlpha ( GUIEditor.gridlist[1], 0.87 ) GUIEditor.label[1] = guiCreateLabel(0.36, 0.00, 0.28, 0.75, "Points", true, GUIEditor.gridlist[1]) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") function showPointsMonitor () local Alpha = guiGetAlpha(GUIEditor.girdlist) guiSetAlpha(GUIEditor.girdlist,not aplha) end bindKey("F4","down",showPointsMonitor) function points () local points = getPlayerMoney ( player ) guiSetText ( GUIEditor.label[1], "Points: "..points.."" ) end addEventHandler ( "onClientRender", getRootElement(), points ) WARNING: test\test.lua:15: Bad argument @ "guiSetAplha" [Expected gui-element at argument 1, got nil] WARNING: test\test.lua:16: Bad argument @ "guiSetAplha" [Expected gui-element at argument 1, got nil] Link to comment
GTX Posted August 4, 2015 Share Posted August 4, 2015 Maybe check variables again. It's local Alpha = guiGetAlpha(GUIEditor.gridlist[1]) guiSetAlpha(GUIEditor.gridlist[1], not Alpha) not local Alpha = guiGetAlpha(GUIEditor.girdlist) guiSetAlpha(GUIEditor.girdlist,not aplha) So shallow. Link to comment
Resto Posted August 4, 2015 Author Share Posted August 4, 2015 WARNING: test\test.lua:16: Bad argument @ "guiSetAlpha" [Expected number at argument 2, got boolean] Link to comment
GTX Posted August 4, 2015 Share Posted August 4, 2015 Use guiSetVisible instead of guiSetAlpha. local Alpha = guiGetVisible(GUIEditor.gridlist[1]) guiSetVisible(GUIEditor.gridlist[1], not Alpha) Link to comment
Resto Posted August 5, 2015 Author Share Posted August 5, 2015 Use guiSetVisible instead of guiSetAlpha. local Alpha = guiGetVisible(GUIEditor.gridlist[1]) guiSetVisible(GUIEditor.gridlist[1], not Alpha) When i set points to 50000000 = 50,000,000 i dont see full text why? Link to comment
ShayF2 Posted August 6, 2015 Share Posted August 6, 2015 Can someone fix this please? I'm running it client and server side. I have VIP group made, and VIP panel functional, I made a currency system, 100k cash gives u 1 coin, so i made it players drift on my server to earn money, and they spend their money on coins, i can get everything to work but this. function mycz(thePlayer, command) local mycoins = exports.coinsystem:getPlayerCoin(thePlayer) local vip = aclGetGroup("VIP") local user = getPlayerAccount(thePlayer) if ( mycoins >= 10 ) then aclGroupAddObject (vip, "user."...user) setPlayerMoney(thePlayer, mycoins - 10) outputChatBox("You have bought VIP", thePlayer, 0, 255, 0, false) else outputChatBox("You do not have enough coins!", thePlayer, 255, 0, 0, false) end end addCommandHandler("buyvip", mycz) Link to comment
GTX Posted August 6, 2015 Share Posted August 6, 2015 function mycz(thePlayer, command) local mycoins = exports.coinsystem:getPlayerCoin(thePlayer) local vip = aclGetGroup("VIP") local user = getAccountName(getPlayerAccount(thePlayer)) if ( mycoins >= 10 ) then aclGroupAddObject (vip, "user."...user) setPlayerMoney(thePlayer, mycoins - 10) outputChatBox("You have bought VIP", thePlayer, 0, 255, 0, false) else outputChatBox("You do not have enough coins!", thePlayer, 255, 0, 0, false) end end addCommandHandler("buyvip", mycz) Link to comment
HUNGRY:3 Posted August 6, 2015 Share Posted August 6, 2015 function mycz(thePlayer, command) local mycoins = exports.coinsystem:getPlayerCoin(thePlayer) local vip = aclGetGroup("VIP") local user = getAccountName(getPlayerAccount(thePlayer)) if ( mycoins >= 10 ) then aclGroupAddObject (vip, "user."...user) setPlayerMoney(thePlayer, mycoins - 10) outputChatBox("You have bought VIP", thePlayer, 0, 255, 0, false) else outputChatBox("You do not have enough coins!", thePlayer, 255, 0, 0, false) end end addCommandHandler("buyvip", mycz) Change line six to: aclGroupAddObject (vip, "user."..user) Link to comment
ShayF2 Posted August 6, 2015 Share Posted August 6, 2015 (edited) Omg it works now thanks. You fixed it hungry! Edited August 6, 2015 by Guest 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