Jump to content

Why this doesn't work?


GamerDeMTA

Recommended Posts

function myfunction() 
        window = guiCreateWindow(77, 12, 642, 545, "window!", false) 
        guiWindowSetSizable(window, false) 
        guiSetAlpha(window, 0.80) 
        showCursor (true) 
        guiSetVisible(window,true) 
end 

that's de function

Link to comment

Try this:

function createWindow() 
window = guiCreateWindow(77, 12, 642, 545, "window!", false) 
guiWindowSetSizable(window, false) 
guiSetAlpha(window, 0.80) 
guiSetVisible(window, false) 
end 
addEventHandler("onClientResourceStart", getRootElement(), createWindow) 
  
function myfunction() 
if (guiGetVisible(window) == false) then 
        showCursor(true) 
        guiSetVisible(window,true) 
        else 
        showCursor(false) 
        guiSetVisible(window, false) 
end 
end 
addCommandHandler ("open", myfunction) 

Link to comment
function a(source) 
    giveWeapon ( source, 17, 1 ) 
local money = getPlayerMoney(source) 
if money >= 1000 then 
takePlayerMoney(source, 1000) 
end 
end 

hey man it doesn't works. Well, it works, but I don't need the money for buy. But If i have the money, My Money goes less. If I have "0" of money, I can buy for free ._.

Link to comment
function a(source) 
    giveWeapon ( source, 17, 1 ) 
local money = getPlayerMoney(source) 
if money >= 1000 then 
takePlayerMoney(source, 1000) 
end 
end 

hey man it doesn't works. Well, it works, but I don't need the money for buy. But If i have the money, My Money goes less. If I have "0" of money, I can buy for free ._.

Ohhh yes. I am sorry.

function a(source) 
local money = getPlayerMoney(source) 
if money >= 1000 then 
takePlayerMoney(source, 1000) 
giveWeapon ( source, 17, 1 ) 
else 
outputChatBox("You have not money to buy this weapon", source, 255, 0, 0, false) 
end 
end 

Link to comment

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