Jump to content

Need a Small help S:


joao1234

Recommended Posts

Hey guys i started making a pizza delivery job, but when i click on the button to close the gui it wont close :/

  
local job = createMarker ( 812, -1623, 12.5, "cylinder", 1.5, 242, 164, 12, 240 ) 
local blip1 = createBlip( 812, -1623, 12, 56 ) 
  
  
addEventHandler ( "onClientMarkerHit", job, 
 function ( localPlayer ) 
  Window_Job = guiCreateWindow(0.38, 0.30, 0.23, 0.39, "Pizza Delivery Job", true) 
  guiWindowSetSizable(Window_Job, false) 
  TextodaJob = guiCreateLabel(0.04, 0.09, 0.91, 0.33, "                          Pizza Deliver\n\nHere you can be a Pizza Deliver, you just need to drive with your Pizza Faggio to the client's home and deliver the pizza to him.\n\nWin: 500$ - 1500$\n\nGood Luck", true, Window_Job) 
  guiLabelSetHorizontalAlign(TextodaJob, "left", true) 
  GridlistdasSkins = guiCreateGridList(0.04, 0.51, 0.92, 0.30, true, Window_Job) 
  guiGridListAddColumn(GridlistdasSkins, "Skins", 0.9) 
  TextdasSkins = guiCreateLabel(0.04, 0.46, 0.36, 0.04, "Pick your Skin:", true, Window_Job) 
  BotaoAccept = guiCreateButton(0.04, 0.84, 0.36, 0.12, "Have Job", true, Window_Job) 
  guiSetProperty(BotaoAccept, "NormalTextColour", "FFAAAAAA") 
  BotaoDecline = guiCreateButton(0.61, 0.84, 0.36, 0.12, "Cancel", true, Window_Job) 
  guiSetProperty(BotaoDecline, "NormalTextColour", "FFAAAAAA") 
  Label_entreBotoes = guiCreateLabel(0.48, 0.88, 0.05, 0.04, "OR", true, Window_Job) 
  guiSetVisible ( Window_Job, true ) 
  showCursor ( true ) 
 end 
) 
  
addEventHandler ( "onClientGUIClick", BotaoDecline, 
 function() 
  guiSetVisible (Window_job, false)  
  showCursor (false) 
 end 
) 
  

Error: bad argument @addEventHandler [expected element at argument 2, got nil]

Link to comment

local job = createMarker ( 812, -1623, 12.5, "cylinder", 1.5, 242, 164, 12, 240 ) 
local blip1 = createBlip( 812, -1623, 12, 56 ) 
  
  Window_Job = guiCreateWindow(0.38, 0.30, 0.23, 0.39, "Pizza Delivery Job", true) 
  guiWindowSetSizable(Window_Job, false) 
  TextodaJob = guiCreateLabel(0.04, 0.09, 0.91, 0.33, "                          Pizza Deliver\n\nHere you can be a Pizza Deliver, you just need to drive with your Pizza  to the client's home and deliver the pizza to him.\n\nWin: 500$ - 1500$\n\nGood Luck", true, Window_Job) 
  guiLabelSetHorizontalAlign(TextodaJob, "left", true) 
  GridlistdasSkins = guiCreateGridList(0.04, 0.51, 0.92, 0.30, true, Window_Job) 
  guiGridListAddColumn(GridlistdasSkins, "Skins", 0.9) 
  TextdasSkins = guiCreateLabel(0.04, 0.46, 0.36, 0.04, "Pick your Skin:", true, Window_Job) 
  BotaoAccept = guiCreateButton(0.04, 0.84, 0.36, 0.12, "Have Job", true, Window_Job) 
  guiSetProperty(BotaoAccept, "NormalTextColour", "FFAAAAAA") 
  BotaoDecline = guiCreateButton(0.61, 0.84, 0.36, 0.12, "Cancel", true, Window_Job) 
  guiSetProperty(BotaoDecline, "NormalTextColour", "FFAAAAAA") 
  Label_entreBotoes = guiCreateLabel(0.48, 0.88, 0.05, 0.04, "OR", true, Window_Job) 
  
 addEventHandler ( "onClientMarkerHit", job, 
function (player) 
if (getElementType(player) == ("player")) and ((player) == localPlayer ) then 
  guiSetVisible ( Window_Job, true ) 
  showCursor ( true ) 
           end 
end 
) 
  
addEventHandler ( "onClientGUIClick",BotaoDecline, 
 function() 
  guiSetVisible (Window_Job, false)  
  showCursor (false) 
 end,false) 
  
Edited by Guest
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...