Jump to content

Help


Recommended Posts

how i can make the spawner cars with key Help me please 

local client = getLocalPlayer() 
local sx, sy  = guiGetScreenSize ( )
local rsx, rsy = sx / 1280, sy / 1024
local window = guiCreateWindow(550,560,200,200,"URG:RPG Spawner",false) 
local vehList = guiCreateGridList(0,20,190,170,false,window) 
local grid = guiCreateGridList(0,20,190,170,true,window) 
local btnSpawn = guiGridListAddColumn(vehicle_selector_grid, "Key", 0.20) 
local btnClose = guiGridListAddColumn(vehicle_selector_grid, "Name", 0.65) 
guiWindowSetSizable(window, false)
guiSetVisible ( window, false )
guiGridListAddColumn(vehList, "Vehicle", 0.9)
local marker = nil
addEvent ( "NGSpawners:ShowClientSpawner", true )
addEventHandler ( "NGSpawners:ShowClientSpawner", root, function ( cars, mrker )
    if ( wasEventCancelled ( ) ) then    
        return
    end
    
if ( not guiGetVisible ( window ) ) then 
        bindKey  ( "space", "down", spawnClickingFunctions )
        showCursor (false )
        guiSetVisible ( window, true )
        guiGridListClear ( vehList )
        addEventHandler ( 'onClientMarkerLeave', mrker, closeWindow )
        marker = mrker
        job = getElementData ( marker, "NGVehicles:JobRestriction" )
        guiGridListSetItemText ( vehList, guiGridListAddRow ( vehList ), 1, "Free Vehicles", true, true )
        for i, v in ipairs ( cars ) do
            local name = getVehicleNameFromModel ( v )
            local row = guiGridListAddRow ( vehList )
            guiGridListSetItemText ( vehList, row, 1, name, false, false )
            guiGridListSetItemData ( vehList, row, 1, v )
        end

 

Edited by Eminem1001
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...