Jump to content

Help


yMassai

Recommended Posts

carrosWindow = guiCreateWindow(100,100,175,200,"Sei La",false) 
carrosList1 = guiCreateGridList(90,20,100,50,true,carrosWindow) 
carrosComand1 = guiGridListAddColumn(carrosList1,"Carros",2) 
guiWindowSetSizable( carrosWindow,false) 
guiSetVisible( carrosWindow, false ) 
  
function carrosShow() 
    if (guiGetVisible(carrosWindow) == false) then 
        guiSetVisible(carrosWindow,true) 
        showCursor(true) 
    else 
        guiSetVisible(carrosWindow,false) 
        showCursor(false) 
    end 
end 
bindKey("F5","down",carrosShow) 

tidy error!

Link to comment
  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Guest Guest4401
carrosList1 = guiCreateGridList(90,20,100,50,true,carrosWindow) 

tidy error!

Relative sizes must be 0 to 1. Just change it accordingly, otherwise don't make it relative :

carrosList1 = guiCreateGridList(90,20,100,50,false,carrosWindow) 

Link to comment
carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) 
playerList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) 
column = guiGridListAddColumn( playerList, "Cars", 0.85 ) 
carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) 
carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) 
guiWindowSetSizable( carrosWindow,false) 
guiSetVisible( carrosWindow, false ) 

carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) 

how could I open it with a Marker?

Link to comment
Guest Guest4401
addEventHandler("onClientMarkerHit", root, 
    function(hitElement) 
        if hitElement == localPlayer then -- if localPlayer hits it 
            if source == carrosMarker then -- only if he hits carros marker 
                guiSetVisible(carrosWindow, true) 
            end 
        end 
    end 
) 

Link to comment

Server

carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
addEventHandler("onClientMarkerHit", root, 
    function(hitElement) 
        if hitElement == localPlayer then 
            if source == carrosMarker then 
                guiSetVisible(carrosWindow, true) 
            end 
        end 
    end 
) 

Client

carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) 
carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) 
column = guiGridListAddColumn( playerList, "Cars", 0.85 ) 
carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) 
carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) 
guiWindowSetSizable( carrosWindow,false) 
guiSetVisible( carrosWindow, false ) 

is this way?

I just test and does not work

Link to comment
carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) 
carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) 
column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) 
carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) 
carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) 
guiWindowSetSizable( carrosWindow,false) 
guiSetVisible( carrosWindow, false ) 
  
carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
addEventHandler("onClientMarkerHit", root, 
    function(hitElement) 
        if hitElement == localPlayer then 
            if source == carrosMarker then 
                guiSetVisible(carrosWindow, true) 
            end 
        end 
    end 
) 

How do I close the window with the "Close" button?

Link to comment
Guest Guest4401
carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) 
carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) 
column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) 
carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) 
carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) 
guiWindowSetSizable( carrosWindow,false) 
guiSetVisible( carrosWindow, false ) 
  
carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
addEventHandler("onClientMarkerHit", root, 
    function(hitElement) 
        if hitElement == localPlayer then 
            if source == carrosMarker then 
                guiSetVisible(carrosWindow, true) 
                showCursor(true) -- show the cursor 
            end 
        end 
    end 
) 
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if source == carrosClose then -- if he clicks the carrosClose button 
            guiSetVisible(carrosWindow, false) -- close the window 
            showCursor(false) -- hide the cursor 
        end 
    end 
) 

Link to comment
carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) 
carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) 
column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) 
carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) 
carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) 
guiWindowSetSizable( carrosWindow,false) 
guiSetVisible( carrosWindow, false ) 
  
carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
addEventHandler ( "onClientMarkerHit", root, 
    function ( hitElement ) 
        if ( hitElement == localPlayer ) then 
            if ( source == carrosMarker ) then 
                guiSetVisible ( carrosWindow, true ) 
            end 
        end 
    end 
) 
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == carrosClose ) then -- If the button clicked is "carrosClose" 
            guiSetVisible ( carrosWindow, false ) -- Hide the window. 
        end 
    end 
) 

Link to comment
carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) 
carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) 
column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) 
carrosRow = guiGridListAddRow ( carrosWindow ) 
carrosText = guiGridListSetItemText ( carrosWindow, carrosRow, ( playeritem ), false, false ) 
carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) 
carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) 
guiWindowSetSizable( carrosWindow,false) 
guiSetVisible( carrosWindow, false ) 
  
carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
addEventHandler ( "onClientMarkerHit", root, 
    function ( hitElement ) 
        if ( hitElement == localPlayer ) then 
            if ( source == carrosMarker ) then 
                guiSetVisible ( carrosWindow, true ) 
            end 
        end 
    end 
) 
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == carrosClose ) then 
            guiSetVisible ( carrosWindow, false ) 
        end 
    end 
) 

this?

Edited by Guest
Link to comment
carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) 
carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) 
column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) 
carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) 
carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) 
carrosRow = guiGridListAddRow ( carrosWindow ) 
guiWindowSetSizable( carrosWindow,false) 
guiSetVisible( carrosWindow, false ) 
  
carrosVis = {{440},{320}} 
    for i,v in ipairs (carrosVis) do 
    local row = guiGridListAddRow (carrosList) 
    guiGridListSetItemText (carrosList, carrosRow, 1, false, true) 
  
carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
addEventHandler ( "onClientMarkerHit", root, 
    function ( hitElement ) 
        if ( hitElement == localPlayer ) then 
            if ( source == carrosMarker ) then 
                guiSetVisible ( carrosWindow, true ) 
            end 
        end 
    end 
) 
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == carrosClose ) then 
            guiSetVisible ( carrosWindow, false ) 
        end 
    end 
) 

??

Link to comment

No, that's wrong.

carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) 
carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) 
column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) 
carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) 
carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) 
guiWindowSetSizable( carrosWindow,false) 
guiSetVisible( carrosWindow, false ) 
  
carrosVis = 
    { 
        440, 
        320 
    } 
for index, model in ipairs ( carrosVis ) do 
    local row = guiGridListAddRow ( carrosList ) 
    guiGridListSetItemText ( carrosList, row, column, tostring ( getVehicleNameFromModel ( model ) ), false, true ) 
end 
  
carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
addEventHandler ( "onClientMarkerHit", root, 
    function ( hitElement ) 
        if ( hitElement == localPlayer ) then 
            if ( source == carrosMarker ) then 
                guiSetVisible ( carrosWindow, true ) 
            end 
        end 
    end 
) 
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == carrosClose ) then 
            guiSetVisible ( carrosWindow, false ) 
        end 
    end 
) 

Link to comment
function carrosCreateClick ( ) 
   if ( source == carrosCreate ) then 
        triggerServerEvent ( "testCreateTest", localPlayer ) 
        testDestroyTestGUI ( ) 
end 
addEventHandler ( "onClientGUIClick", root, carrosCreateClick ) 
  
carrosVehicle = createVehicle ( ??, 1543,98962 , -1670,46398 , 13,0213 ) 
    warpPedIntoVehicle ( carrosVehicle ) 

I use these arguments?

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