Skip to content

S0L0LEVELING/sy_carkeys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  • Create a copy of the keys of the nearby vehicle. (This can be used in some job's menu.)
exports['sy_carkeys']:CarKey() 
  • On buy car
--Client

local ped = cache.ped
local pedcords = GetEntityCoords(ped)
local car = lib.getClosestVehicle(pedcords, 5, true)
local model = GetEntityModel(car)
local name = GetDisplayNameFromVehicleModel(model)
local plate = GetVehicleNumberPlateText(car)
TriggerServerEvent('sy_carkeys:KeyOnBuy', plate, model) 

--Or you can use this export without having to check the model or the plate.
exports['sy_carkeys']:CarKeyBuy() 



--Server
TriggerEvent('sy_carkeys:KeyOnBuy', plate, model)
  • Open buy menu
TriggerEvent('sy_carkeys:obtenerLlaves')
  • Ox inventory ITEM
	['carkeys']                  = {
		label = 'Car Key',
		weight = 5,
		stack = true,
		client = {
			event = 'sy_carkeys:llavesindatos'
		}
	},
  • Dependencies

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages