Jump to content

Vehicles


Recommended Posts

error : SAEGVehicles/vehicles/vehicles_s.lua 355 : bad argument to 'gsub' (string expected, got nill)

error :SAEGPhone/apps/vehicles_server.lua:19:call: failed to call 'SAEGVehicles:sellvehicle |string '?|

code :

addEvent ( "SAEGPhone:App->Vehicles:onPanelOpened", true ) 
addEventHandler ( "SAEGPhone:App->Vehicles:onPanelOpened", root, function ( )  
    local cars = exports.SAEGVehicles:getAccountVehicles ( getAccountName ( getPlayerAccount ( source ) ) ) 
    triggerClientEvent ( source, "SAEGPhone:App->Vehicles:onClientGetVehicles", source, cars ) 
end ) 
  
addEvent ( "SAEGPhone:Apps->Vehicles:SetVehicleVisible", true ) 
addEventHandler ( "SAEGPhone:Apps->Vehicles:SetVehicleVisible", root, function ( id, stat )  
    local v = exports.SAEGVehicles:SetVehicleVisible ( id, stat, source ) 
end ) 
  
addEvent ( "SAEGPhone:Apps->Vehicles:AttemptRecoveryOnID", true ) 
addEventHandler ( "SAEGPhone:Apps->Vehicles:AttemptRecoveryOnID", root, function ( id ) 
    exports.SAEGVehicles:recoverVehicle ( source, id ) 
end )  
  
addEvent ( "SAEGPhone:App->Vehicles:sellPlayerVehicle", true ) 
addEventHandler ( "SAEGPhone:App->Vehicles:sellPlayerVehicle", root, function ( plr, data ) 
    exports.SAEGVehicles:sellVehicle ( plr, data ) 
end ) 
  
addEvent ( "SAEGPhone:Apps->Vehicles:WarpThisVehicleToMe", true ) 
addEventHandler ( "SAEGPhone:Apps->Vehicles:WarpThisVehicleToMe", root, function ( id ) 
    if ( not exports.SAEGVehicles:warpVehicleToPlayer ( id, source ) ) then 
        exports.SAEGMessages:sendClientMessage ( "Error: Unable to warp vehicle", source, 255, 0, 0 ) 
    end 
end ) 

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