Jump to content

not work


Resto

Recommended Posts

Posted

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]

Posted

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.

Posted

Use guiSetVisible instead of guiSetAlpha.

local Alpha = guiGetVisible(GUIEditor.gridlist[1]) 
guiSetVisible(GUIEditor.gridlist[1], not Alpha) 

Posted
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? :-(

Posted

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) 
  

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

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

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