Jump to content

dont work :(


Recommended Posts

help me plss

    function open () 
        vent = guiCreateWindow(485, 185, 314, 385, "lol", false) 
        guiWindowSetSizable(vent, false) 
  
        fy = guiCreateButton(9, 31, 296, 58, "xd", false, vent) 
        wr = guiCreateButton(9, 259, 296, 58, "xd", false, vent) 
        elely = guiCreateButton(13, 94, 77, 30, "xxd", false, vent) 
        dblef = guiCreateButton(222, 94, 77, 30, "xxd", false, vent) 
        ea = guiCreateButton(13, 323, 77, 30, "xxdd", false, vent) 
        dblewa = guiCreateButton(222, 323, 77, 30, "xxdd", false, vent) 
        imagen = guiCreateStaticImage(13, 133, 292, 120, "lol.png", false, vent)     
    end 
  
addEventHandler('onClientResourceStart', g_ResRoot, 
function bind () 
        bindKey('f1', 'down', windowopenn) 
        createWindow(open) 
end 
) 
  
function windowopenn() 
    if isWindowOpen(vent) then 
        showCursor(false) 
        hideAllWindows() 
        colorPicker.closeSelect() 
    else 
        showCursor(true) 
        showAllWindows() 
    end 
end 
  
function windowopen () 
    guiSetVisible (vent, not guiGetVisible ( vent ) ) 
    showCursor (false) 
    end 
  
addEventHandler ("onPlayerJoin", 
function () 
outputChatBox ("lol", 255, 255, 255, source, true) 
end 
end 
  

^Problem: it dont show the gui when i press f1! and the outputchatbox dont show when player Joins

Link to comment

That's because that doesn't make much sense, looks like you copied random code from other scripts.

function open ( ) 
    vent = guiCreateWindow(485, 185, 314, 385, "lol", false) 
    guiWindowSetSizable(vent, false) 
    guiSetVisible ( vent, false ) 
  
    fy = guiCreateButton(9, 31, 296, 58, "xd", false, vent) 
    wr = guiCreateButton(9, 259, 296, 58, "xd", false, vent) 
    elely = guiCreateButton(13, 94, 77, 30, "xxd", false, vent) 
    dblef = guiCreateButton(222, 94, 77, 30, "xxd", false, vent) 
    ea = guiCreateButton(13, 323, 77, 30, "xxdd", false, vent) 
    dblewa = guiCreateButton(222, 323, 77, 30, "xxdd", false, vent) 
    imagen = guiCreateStaticImage(13, 133, 292, 120, "lol.png", false, vent) 
end 
addEventHandler ( 'onClientResourceStart', resourceRoot, open ) 
  
function windowopen ( ) 
    guiSetVisible ( vent, not guiGetVisible ( vent ) ) 
    showCursor ( guiGetVisible ( vent ) ) 
end 
bindKey ( 'f1', 'down', windowopen ) 

P.S: "onPlayerJoin" is server side.

Link to comment
  • Moderators
oh, slender. the gamemode is in MTA community xD

also could not get it right explain?

outputchatbox \/

you had not defined the function in parameter

now try

function ( source ) 
outputChatBox ("lol", 255, 255, 255, source, true) 

You don't have to define a source.

(wiki mta)

"onPlayerJoin"

Serverside event

This event is triggered when a player joins the server.

Parameters

No parameters.

Source

The source of this event is the player who joined.

Btw there is always a source when an event got triggered, but it isn't always a player.

Link to comment
function open ( ) 
    vent = guiCreateWindow(485, 185, 314, 385, "lol", false) 
    guiWindowSetSizable(vent, false) 
    guiSetVisible ( vent, false ) 
  
    fy = guiCreateButton(9, 31, 296, 58, "xd", false, vent) 
    wr = guiCreateButton(9, 259, 296, 58, "xd", false, vent) 
    elely = guiCreateButton(13, 94, 77, 30, "xxd", false, vent) 
    dblef = guiCreateButton(222, 94, 77, 30, "xxd", false, vent) 
    ea = guiCreateButton(13, 323, 77, 30, "xxdd", false, vent) 
    dblewa = guiCreateButton(222, 323, 77, 30, "xxdd", false, vent) 
    imagen = guiCreateStaticImage(13, 133, 292, 120, "lol.png", false, vent) 
end 
addEventHandler ( 'onClientResourceStart', resourceRoot, open ) 
  
function windowopen ( ) 
    guiSetVisible ( vent, not guiGetVisible ( vent ) ) 
    showCursor ( guiGetVisible ( vent ) ) 
end 
bindKey ( 'f4', 'down', windowopen ) 

Help? When I press F4, it doesn't open the Window !

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