Jump to content

[Solved] Car Spawner Problem


justn

Recommended Posts

WARNING: carspawner\gui.lua:31: Bad argument @ 'guiGridListSetItemText' [Expected bool at argument 5, got string 'Pony']

cars = { 
    {419}, 
    {413} 
  
  --{carID}, 
    } 
  
local l, w = guiGetScreenSize() 
        CarSpawner_Window = guiCreateWindow(292, 255, 391, 281, "*CIR* - Car Spawner", false) 
        guiWindowSetSizable(CarSpawner_Window, false) 
        guiSetAlpha(CarSpawner_Window, 1.00) 
        guiSetVisible(CarSpawner_Window,false) 
  
        CarSpawner_Label = guiCreateLabel(10, 25, 142, 15, "Select a vehicle", false, CarSpawner_Window) 
        guiSetFont(CarSpawner_Label, "default-bold-small") 
        CarSpawner_Gridlist = guiCreateGridList(10, 45, 371, 185, false, CarSpawner_Window) 
        guiGridListAddColumn(CarSpawner_Gridlist, "#", 0.5) 
        guiGridListAddColumn(CarSpawner_Gridlist, "Vehicle Name:", 0.5) 
        guiGridListAddRow(CarSpawner_Gridlist) 
        guiGridListSetItemText(CarSpawner_Gridlist, 0, 1, "-", false, false) 
        guiGridListSetItemText(CarSpawner_Gridlist, 0, 2, "-", false, false) 
        CarSpawner_Spawn = guiCreateButton(37, 240, 146, 31, "Spawn", false, CarSpawner_Window) 
        guiSetProperty(CarSpawner_Spawn, "NormalTextColour", "FFAAAAAA") 
        CarSpawner_Close = guiCreateButton(224, 240, 134, 31, "Close", false, CarSpawner_Window) 
        guiSetProperty(CarSpawner_Close, "NormalTextColour", "FFAAAAAA")   
  
for i,v in ipairs (cars) do 
    local carName = getVehicleNameFromModel (v[1]) 
    local row = guiGridListAddRow(CarSpawner_Gridlist) 
    guiGridListSetItemText(CarSpawner_Gridlist, row, 0, 1, "-", false, true) 
    guiGridListSetItemText(CarSpawner_Gridlist, row, 0, 2, carName, false, true) 
end 

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