From 2775c81037ff14dfa925fc4ca5b0c9812b7815d6 Mon Sep 17 00:00:00 2001 From: FingersNo1 <37978256+FingersNo1@users.noreply.github.com> Date: Tue, 20 Jun 2023 13:40:26 +0530 Subject: [PATCH] 2.0 * Rewrite of whole script * Added QBCore framework compatibility * Uses ox_lib as a dependency --- .gitattributes | 2 - .gitignore | 41 --- client/client.lua | 60 ---- client/main.lua | 243 ++++++++++++++ config.lua | 5 - config/config.lua | 14 + config/peds.lua | 747 +++++++++++++++++++++++++++++++++++++++++++ fxmanifest.lua | 28 +- locales/en.json | 21 ++ no1-playerped.sql | 1 + server/main.lua | 207 ++++++++++++ server/pedModels.lua | 747 ------------------------------------------- server/server.lua | 119 ------- 13 files changed, 1255 insertions(+), 980 deletions(-) delete mode 100644 .gitattributes delete mode 100644 .gitignore delete mode 100644 client/client.lua create mode 100644 client/main.lua delete mode 100644 config.lua create mode 100644 config/config.lua create mode 100644 config/peds.lua create mode 100644 locales/en.json create mode 100644 no1-playerped.sql create mode 100644 server/main.lua delete mode 100644 server/pedModels.lua delete mode 100644 server/server.lua diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index dfe0770..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 6fd0a37..0000000 --- a/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Compiled Lua sources -luac.out - -# luarocks build files -*.src.rock -*.zip -*.tar.gz - -# Object files -*.o -*.os -*.ko -*.obj -*.elf - -# Precompiled Headers -*.gch -*.pch - -# Libraries -*.lib -*.a -*.la -*.lo -*.def -*.exp - -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib - -# Executables -*.exe -*.out -*.app -*.i*86 -*.x86_64 -*.hex - diff --git a/client/client.lua b/client/client.lua deleted file mode 100644 index 8a87c58..0000000 --- a/client/client.lua +++ /dev/null @@ -1,60 +0,0 @@ -if Config.Framework == 'esx' then - local ESX = nil - - if Config.ESXversion == '1.1' or Config.ESXversion == '1.2' then - Citizen.CreateThread(function() - while ESX == nil do - TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) - Citizen.Wait(0) - end - end) - elseif Config.ESXversion == 'legacy' then - ESX = exports['es_extended']:getSharedObject() - end - - local function SetPlayerPed(pedmodel) - local hash = GetHashKey(pedmodel) - RequestModel(hash) - while not HasModelLoaded(hash) or not IsModelInCdimage(hash) do - RequestModel(hash) - Citizen.Wait(4) - end - - SetPlayerModel(PlayerId(), hash) - SetPedDefaultComponentVariation(PlayerPedId()) - - SetModelAsNoLongerNeeded(hash) - TriggerEvent('esx:restoreLoadout') - end - - local function ResetPlayerPed() - ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) - local isMale = skin.sex == 0 - - TriggerEvent('skinchanger:loadDefaultModel', isMale, function() - ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) - TriggerEvent('skinchanger:loadSkin', skin) - end) - end) - - end) - end - - RegisterNetEvent('no1-playerped:client:SetPlayerPed', SetPlayerPed) - RegisterNetEvent('no1-playerped:client:ResetPlayerPed', ResetPlayerPed) - - AddEventHandler('playerSpawned', function() - ESX.TriggerServerCallback('no1-playerped:server:GetPlayerPed', function(pedmodel) - local hashkey = GetHashKey(pedmodel) - - if pedmodel ~= 'none' then - if GetEntityModel(PlayerPedId()) ~= hashkey then - SetPlayerPed(pedmodel) - end - end - end) - end) - -elseif Config.Framework == "qbcore" then - -- Not done yet -end \ No newline at end of file diff --git a/client/main.lua b/client/main.lua new file mode 100644 index 0000000..e3d157d --- /dev/null +++ b/client/main.lua @@ -0,0 +1,243 @@ +Framework = nil + +-- Initialise Locale -- +lib.locale() +----------------------- + +if Config.Framework == 'esx' then + Framework = exports['es_extended']:getSharedObject() +elseif Config.Framework == 'qb' then + Framework = exports['qb-core']:GetCoreObject() +end + +-- Functions -- + +local function IsPlayerLoaded() + if Config.Framework == 'esx' then + return Framework.IsPlayerLoaded() + elseif Config.Framework == 'qb' then + return LocalPlayer.state.isLoggedIn + end +end + +local function SetPlayerPed(model) + local hash = joaat(model) + RequestModel(hash) + while not HasModelLoaded(hash) do + RequestModel(hash) + Wait(0) + end + SetPlayerModel(PlayerId(), hash) + SetPedDefaultComponentVariation(PlayerPedId()) + SetModelAsNoLongerNeeded(hash) + + if Config.Framework == 'esx' then + TriggerEvent('esx:restoreLoadout') + end +end + +local function ResetPlayerPed() + if Config.Framework == 'esx' then + Framework.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + local isMale = skin.sex == 0 + TriggerEvent('skinchanger:loadDefaultModel', isMale, function() + Framework.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + end) + end) + elseif Config.Framework == 'qb' then + TriggerServerEvent('qb-clothes:loadPlayerSkin') + end +end + +local function LoadDefaultPed() + lib.callback('no1-playerped:GetDefaultPed', 2500, function(ped) + if ped then + SetPlayerPed(ped) + end + end) +end + +RegisterNetEvent('no1-playerped:SetPlayerPed', SetPlayerPed) +RegisterNetEvent('no1-playerped:ResetPlayerPed', ResetPlayerPed) + +-- Events -- + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function() + while IsPlayerLoaded() do + Wait(100) + end + + LoadDefaultPed() +end) + +RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() + while IsPlayerLoaded() do + Wait(100) + end + + LoadDefaultPed() +end) + +AddEventHandler('onResourceStart', function(resource) + if resource == GetCurrentResourceName() then + if IsPlayerLoaded() then + LoadDefaultPed() + end + end +end) + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + ResetPlayerPed() + end +end) + +RegisterNetEvent('no1-playerped:GivePedDialogue', function(data) + local playerid = data.playerid + local identifier = data.identifier + local playername = data.name + + local input = lib.inputDialog(locale('pedoptions'), { + {type = 'input', icon = 'signature', label = locale('player'), disabled = true, placeholder = string.format('%s (%s)', playername, playerid)}, + {type = 'select', icon = 'user-secret', label = locale('option'), options = {{value = 'give', label = locale('giveped')}, {value = 'remove', label = locale('removeped')}}, required = true, default = 'give', clearable = false} + }) + + if input[2] == 'give' then + local peds = {} + + for model, image in ipairs(Config.CustomPeds) do + peds[#peds+1] = { + title = model, + --icon = image, + image = image, + serverEvent = 'no1-playerped:SetPlayerPed', + arrow = true, + args = { + playerid = playerid, + identifier = identifier, + model = Config.VanillaPeds[i] + } + } + end + + for i=1, #Config.VanillaPeds do + local url = "https://docs.fivem.net/peds/"..Config.VanillaPeds[i]..".webp" + + peds[#peds+1] = { + title = Config.VanillaPeds[i], + --icon = url, + image = url, + serverEvent = 'no1-playerped:SetPlayerPed', + arrow = true, + args = { + playerid = playerid, + identifier = identifier, + model = Config.VanillaPeds[i] + } + } + end + + lib.registerContext({ + id = 'giveped', + title = locale('giveped'), + options = peds + }) + + lib.showContext('giveped') + elseif input[2] == 'remove' then + local playerpeds = lib.callback.await('no1-playerped:GetPlayerPeds', false, playerid) + local peds = {} + + if #playerpeds == 0 then + TriggerEvent('no1-playerped:Notify', locale('nopeds'), 'error') + else + for _, v in pairs(playerpeds) do + local url = Config.CustomPeds[v.ped] ~= nil and Config.CustomPeds[v.ped] or "https://docs.fivem.net/peds/"..v.ped..".webp" + + peds[#peds+1] = { + title = v.ped, + description = v.default == 1 and locale('playerdefault') or '', + image = url, + serverEvent = 'no1-playerped:DeletePlayerPed', + arrow = true, + args = { + identifier = identifier, + id = v.id + } + } + end + + lib.registerContext({ + id = 'removeped', + title = locale('removepedplayer', playername, locale('removeped')), + options = peds + }) + + lib.showContext('removeped') + end + end +end) + + +-- Command -- +RegisterCommand('pedmenu', function() + if IsPlayerLoaded() then + local playerpeds = lib.callback.await('no1-playerped:GetPlayerPeds', false) + local peds = {} + + if #playerpeds == 0 then + TriggerEvent('no1-playerped:Notify', locale('nopeds'), 'error') + else + for _, v in pairs(playerpeds) do + local url = Config.CustomPeds[v.ped] ~= nil and Config.CustomPeds[v.ped] or "https://docs.fivem.net/peds/"..v.ped..".webp" + + peds[#peds+1] = { + title = v.ped, + description = (v.default == 1 or v.default == true) and locale('defaultped') or locale('setdefault'), + --icon = url, + image = url, + serverEvent = 'no1-playerped:SetDefaultPed', + arrow = (v.default == 0 or v.default == false) and true or false, + args = { id = v.id, ped = v.ped } + } + end + + peds[#peds+1] = { + title = locale('resetped'), + description = locale('resetped_description'), + icon = 'power-off', + iconColor = 'tomato', + event = 'no1-playerped:ResetPlayerPed' + } + + lib.registerContext({ + id = 'yourpeds', + title = locale('yourpeds'), + options = peds + }) + + lib.showContext('yourpeds') + end + end +end, false) + +-- Notification -- + +RegisterNetEvent('no1-playerped:Notify', function(msg, sort, duration) + local message = msg + local type = sort + local length = duration or 5000 + + if Config.Framework == 'esx' then + Framework.ShowNotification(message, type, length) + elseif Config.Framework == 'qb' then + if type == 'info' then + type = 'primary' + end + + Framework.Functions.Notify(message, type, length) + end +end) \ No newline at end of file diff --git a/config.lua b/config.lua deleted file mode 100644 index fabe046..0000000 --- a/config.lua +++ /dev/null @@ -1,5 +0,0 @@ -Config = {} - -Config.Framework = 'esx' -- esx | qbcore (not done yet) -Config.ESXversion = 'legacy' -- Versions supported (1.1 | 1.2 | legacy) -Config.AllowDLCPeds = false -- specified in the server/pedModels.lua diff --git a/config/config.lua b/config/config.lua new file mode 100644 index 0000000..3cc0a4d --- /dev/null +++ b/config/config.lua @@ -0,0 +1,14 @@ +Config = {} + +-- Supported Frameworks -- +---@param 'esx' +---@param 'qb' +Config.Framework = 'esx' + +-- Admin Groups -- +-- You can add or remove the groups which are allowed to use the command ('/setped') +Config.AdminGroups = { + 'mod', + 'admin', + 'god' +} \ No newline at end of file diff --git a/config/peds.lua b/config/peds.lua new file mode 100644 index 0000000..d827fc6 --- /dev/null +++ b/config/peds.lua @@ -0,0 +1,747 @@ +Config = Config or {} + +Config.CustomPeds = { + --["example"] = 'https://i.imgur.com/8fJZLXj_d.webp', +} + +Config.VanillaPeds = { + "a_c_boar", + "a_c_cat_01", + "a_c_chickenhawk", + "a_c_chimp", + "a_c_chop", + "a_c_cormorant", + "a_c_cow", + "a_c_coyote", + "a_c_crow", + "a_c_deer", + "a_c_dolphin", + "a_c_fish", + "a_c_hen", + "a_c_humpback", + "a_c_husky", + "a_c_killerwhale", + "a_c_mtlion", + "a_c_pig", + "a_c_pigeon", + "a_c_poodle", + "a_c_pug", + "a_c_rabbit_01", + "a_c_rat", + "a_c_retriever", + "a_c_rhesus", + "a_c_rottweiler", + "a_c_seagull", + "a_c_sharkhammer", + "a_c_sharktiger", + "a_c_shepherd", + "a_c_stingray", + "a_c_westy", + "a_f_m_beach_01", + "a_f_m_bevhills_01", + "a_f_m_bevhills_02", + "a_f_m_bodybuild_01", + "a_f_m_business_02", + "a_f_m_downtown_01", + "a_f_m_eastsa_01", + "a_f_m_eastsa_02", + "a_f_m_fatbla_01", + "a_f_m_fatcult_01", + "a_f_m_fatwhite_01", + "a_f_m_ktown_01", + "a_f_m_ktown_02", + "a_f_m_prolhost_01", + "a_f_m_salton_01", + "a_f_m_skidrow_01", + "a_f_m_soucent_01", + "a_f_m_soucent_02", + "a_f_m_soucentmc_01", + "a_f_m_tourist_01", + "a_f_m_tramp_01", + "a_f_m_trampbeac_01", + "a_f_o_genstreet_01", + "a_f_o_indian_01", + "a_f_o_ktown_01", + "a_f_o_salton_01", + "a_f_o_soucent_01", + "a_f_o_soucent_02", + "a_f_y_beach_01", + "a_f_y_bevhills_01", + "a_f_y_bevhills_02", + "a_f_y_bevhills_03", + "a_f_y_bevhills_04", + "a_f_y_business_01", + "a_f_y_business_02", + "a_f_y_business_03", + "a_f_y_business_04", + "a_f_y_eastsa_01", + "a_f_y_eastsa_02", + "a_f_y_eastsa_03", + "a_f_y_epsilon_01", + "a_f_y_femaleagent", + "a_f_y_fitness_01", + "a_f_y_fitness_02", + "a_f_y_genhot_01", + "a_f_y_golfer_01", + "a_f_y_hiker_01", + "a_f_y_hippie_01", + "a_f_y_hipster_01", + "a_f_y_hipster_02", + "a_f_y_hipster_03", + "a_f_y_hipster_04", + "a_f_y_indian_01", + "a_f_y_juggalo_01", + "a_f_y_runner_01", + "a_f_y_rurmeth_01", + "a_f_y_scdressy_01", + "a_f_y_skater_01", + "a_f_y_soucent_01", + "a_f_y_soucent_02", + "a_f_y_soucent_03", + "a_f_y_tennis_01", + "a_f_y_topless_01", + "a_f_y_tourist_01", + "a_f_y_tourist_02", + "a_f_y_vinewood_01", + "a_f_y_vinewood_02", + "a_f_y_vinewood_03", + "a_f_y_vinewood_04", + "a_f_y_yoga_01", + "a_m_m_acult_01", + "a_m_m_afriamer_01", + "a_m_m_beach_01", + "a_m_m_beach_02", + "a_m_m_bevhills_01", + "a_m_m_bevhills_02", + "a_m_m_business_01", + "a_m_m_eastsa_01", + "a_m_m_eastsa_02", + "a_m_m_farmer_01", + "a_m_m_fatlatin_01", + "a_m_m_genfat_01", + "a_m_m_genfat_02", + "a_m_m_golfer_01", + "a_m_m_hasjew_01", + "a_m_m_hillbilly_01", + "a_m_m_hillbilly_02", + "a_m_m_indian_01", + "a_m_m_ktown_01", + "a_m_m_malibu_01", + "a_m_m_mexcntry_01", + "a_m_m_mexlabor_01", + "a_m_m_og_boss_01", + "a_m_m_paparazzi_01", + "a_m_m_polynesian_01", + "a_m_m_prolhost_01", + "a_m_m_rurmeth_01", + "a_m_m_salton_01", + "a_m_m_salton_02", + "a_m_m_salton_03", + "a_m_m_salton_04", + "a_m_m_skater_01", + "a_m_m_skidrow_01", + "a_m_m_socenlat_01", + "a_m_m_soucent_01", + "a_m_m_soucent_02", + "a_m_m_soucent_03", + "a_m_m_soucent_04", + "a_m_m_stlat_02", + "a_m_m_tennis_01", + "a_m_m_tourist_01", + "a_m_m_tramp_01", + "a_m_m_trampbeac_01", + "a_m_m_tranvest_01", + "a_m_m_tranvest_02", + "a_m_o_acult_01", + "a_m_o_acult_02", + "a_m_o_beach_01", + "a_m_o_genstreet_01", + "a_m_o_ktown_01", + "a_m_o_salton_01", + "a_m_o_soucent_01", + "a_m_o_soucent_02", + "a_m_o_soucent_03", + "a_m_o_tramp_01", + "a_m_y_acult_01", + "a_m_y_acult_02", + "a_m_y_beach_01", + "a_m_y_beach_02", + "a_m_y_beach_03", + "a_m_y_beachvesp_01", + "a_m_y_beachvesp_02", + "a_m_y_bevhills_01", + "a_m_y_bevhills_02", + "a_m_y_breakdance_01", + "a_m_y_busicas_01", + "a_m_y_business_01", + "a_m_y_business_02", + "a_m_y_business_03", + "a_m_y_cyclist_01", + "a_m_y_dhill_01", + "a_m_y_downtown_01", + "a_m_y_eastsa_01", + "a_m_y_eastsa_02", + "a_m_y_epsilon_01", + "a_m_y_epsilon_02", + "a_m_y_gay_01", + "a_m_y_gay_02", + "a_m_y_genstreet_01", + "a_m_y_genstreet_02", + "a_m_y_golfer_01", + "a_m_y_hasjew_01", + "a_m_y_hiker_01", + "a_m_y_hippy_01", + "a_m_y_hipster_01", + "a_m_y_hipster_02", + "a_m_y_hipster_03", + "a_m_y_indian_01", + "a_m_y_jetski_01", + "a_m_y_juggalo_01", + "a_m_y_ktown_01", + "a_m_y_ktown_02", + "a_m_y_latino_01", + "a_m_y_methhead_01", + "a_m_y_mexthug_01", + "a_m_y_motox_01", + "a_m_y_motox_02", + "a_m_y_musclbeac_01", + "a_m_y_musclbeac_02", + "a_m_y_polynesian_01", + "a_m_y_roadcyc_01", + "a_m_y_runner_01", + "a_m_y_runner_02", + "a_m_y_salton_01", + "a_m_y_skater_01", + "a_m_y_skater_02", + "a_m_y_soucent_01", + "a_m_y_soucent_02", + "a_m_y_soucent_03", + "a_m_y_soucent_04", + "a_m_y_stbla_01", + "a_m_y_stbla_02", + "a_m_y_stlat_01", + "a_m_y_stwhi_01", + "a_m_y_stwhi_02", + "a_m_y_sunbathe_01", + "a_m_y_surfer_01", + "a_m_y_vindouche_01", + "a_m_y_vinewood_01", + "a_m_y_vinewood_02", + "a_m_y_vinewood_03", + "a_m_y_vinewood_04", + "a_m_y_yoga_01", + "cs_amandatownley", + "cs_andreas", + "cs_ashley", + "cs_bankman", + "cs_barry", + "cs_beverly", + "cs_brad", + "cs_bradcadaver", + "cs_carbuyer", + "cs_casey", + "cs_chengsr", + "cs_chrisformage", + "cs_clay", + "cs_dale", + "cs_davenorton", + "cs_debra", + "cs_denise", + "cs_devin", + "cs_dom", + "cs_dreyfuss", + "cs_drfriedlander", + "cs_fabien", + "cs_fbisuit_01", + "cs_floyd", + "cs_guadalope", + "cs_gurk", + "cs_hunter", + "cs_janet", + "cs_jewelass", + "cs_jimmyboston", + "cs_jimmydisanto", + "cs_joeminuteman", + "cs_johnnyklebitz", + "cs_josef", + "cs_josh", + "cs_karen_daniels", + "cs_lamardavis", + "cs_lazlow", + "cs_lestercrest", + "cs_lifeinvad_01", + "cs_magenta", + "cs_manuel", + "cs_marnie", + "cs_martinmadrazo", + "cs_maryann", + "cs_michelle", + "cs_milton", + "cs_molly", + "cs_movpremf_01", + "cs_movpremmale", + "cs_mrk", + "cs_mrs_thornhill", + "cs_mrsphillips", + "cs_natalia", + "cs_nervousron", + "cs_nigel", + "cs_old_man1a", + "cs_old_man2", + "cs_omega", + "cs_orleans", + "cs_paper", + "cs_patricia", + "cs_priest", + "cs_prolsec_02", + "cs_russiandrunk", + "cs_siemonyetarian", + "cs_solomon", + "cs_stevehains", + "cs_stretch", + "cs_tanisha", + "cs_taocheng", + "cs_taostranslator", + "cs_tenniscoach", + "cs_terry", + "cs_tom", + "cs_tomepsilon", + "cs_tracydisanto", + "cs_wade", + "cs_zimbor", + "csb_abigail", + "csb_agent", + "csb_anita", + "csb_anton", + "csb_ballasog", + "csb_bride", + "csb_burgerdrug", + "csb_car3guy1", + "csb_car3guy2", + "csb_chef", + "csb_chef2", + "csb_chin_goon", + "csb_cletus", + "csb_cop", + "csb_customer", + "csb_denise_friend", + "csb_fos_rep", + "csb_g", + "csb_groom", + "csb_grove_str_dlr", + "csb_hao", + "csb_hugh", + "csb_imran", + "csb_jackhowitzer", + "csb_janitor", + "csb_maude", + "csb_money", + "csb_mp_agent14", + "csb_mweather", + "csb_ortega", + "csb_oscar", + "csb_paige", + "csb_popov", + "csb_porndudes", + "csb_prologuedriver", + "csb_prolsec", + "csb_ramp_gang", + "csb_ramp_hic", + "csb_ramp_hipster", + "csb_ramp_marine", + "csb_ramp_mex", + "csb_rashcosvki", + "csb_reporter", + "csb_roccopelosi", + "csb_screen_writer", + "csb_stripper_01", + "csb_stripper_02", + "csb_tonya", + "csb_trafficwarden", + "csb_undercover", + "csb_vagspeak", + "g_f_importexport_01", + "g_f_y_ballas_01", + "g_f_y_families_01", + "g_f_y_lost_01", + "g_f_y_vagos_01", + "g_m_importexport_01", + "g_m_m_armboss_01", + "g_m_m_armgoon_01", + "g_m_m_armlieut_01", + "g_m_m_chemwork_01", + "g_m_m_chiboss_01", + "g_m_m_chicold_01", + "g_m_m_chigoon_01", + "g_m_m_chigoon_02", + "g_m_m_korboss_01", + "g_m_m_mexboss_01", + "g_m_m_mexboss_02", + "g_m_y_armgoon_02", + "g_m_y_azteca_01", + "g_m_y_ballaeast_01", + "g_m_y_ballaorig_01", + "g_m_y_ballasout_01", + "g_m_y_famca_01", + "g_m_y_famdnf_01", + "g_m_y_famfor_01", + "g_m_y_korean_01", + "g_m_y_korean_02", + "g_m_y_korlieut_01", + "g_m_y_lost_01", + "g_m_y_lost_02", + "g_m_y_lost_03", + "g_m_y_mexgang_01", + "g_m_y_mexgoon_01", + "g_m_y_mexgoon_02", + "g_m_y_mexgoon_03", + "g_m_y_pologoon_01", + "g_m_y_pologoon_02", + "g_m_y_salvaboss_01", + "g_m_y_salvagoon_01", + "g_m_y_salvagoon_02", + "g_m_y_salvagoon_03", + "g_m_y_strpunk_01", + "g_m_y_strpunk_02", + "hc_driver", + "hc_gunman", + "hc_hacker", + "ig_abigail", + "ig_agent", + "ig_amandatownley", + "ig_andreas", + "ig_ashley", + "ig_avon", + "ig_ballasog", + "ig_bankman", + "ig_barry", + "ig_benny", + "ig_bestmen", + "ig_beverly", + "ig_brad", + "ig_bride", + "ig_car3guy1", + "ig_car3guy2", + "ig_casey", + "ig_chef", + "ig_chef2", + "ig_chengsr", + "ig_chrisformage", + "ig_clay", + "ig_claypain", + "ig_cletus", + "ig_dale", + "ig_davenorton", + "ig_denise", + "ig_devin", + "ig_dom", + "ig_dreyfuss", + "ig_drfriedlander", + "ig_fabien", + "ig_fbisuit_01", + "ig_floyd", + "ig_g", + "ig_groom", + "ig_hao", + "ig_hunter", + "ig_janet", + "ig_jay_norris", + "ig_jewelass", + "ig_jimmyboston", + "ig_jimmydisanto", + "ig_joeminuteman", + "ig_johnnyklebitz", + "ig_josef", + "ig_josh", + "ig_karen_daniels", + "ig_kerrymcintosh", + "ig_lamardavis", + "ig_lazlow", + "ig_lestercrest_2", + "ig_lestercrest", + "ig_lifeinvad_01", + "ig_lifeinvad_02", + "ig_magenta", + "ig_malc", + "ig_manuel", + "ig_marnie", + "ig_maryann", + "ig_maude", + "ig_michelle", + "ig_milton", + "ig_molly", + "ig_money", + "ig_mp_agent14", + "ig_mrk", + "ig_mrs_thornhill", + "ig_mrsphillips", + "ig_natalia", + "ig_nervousron", + "ig_nigel", + "ig_old_man1a", + "ig_old_man2", + "ig_omega", + "ig_oneil", + "ig_orleans", + "ig_ortega", + "ig_paige", + "ig_paper", + "ig_patricia", + "ig_popov", + "ig_priest", + "ig_prolsec_02", + "ig_ramp_gang", + "ig_ramp_hic", + "ig_ramp_hipster", + "ig_ramp_mex", + "ig_rashcosvki", + "ig_roccopelosi", + "ig_russiandrunk", + "ig_screen_writer", + "ig_siemonyetarian", + "ig_solomon", + "ig_stevehains", + "ig_stretch", + "ig_talina", + "ig_tanisha", + "ig_taocheng", + "ig_taostranslator", + "ig_tenniscoach", + "ig_terry", + "ig_tomepsilon", + "ig_tonya", + "ig_tracydisanto", + "ig_trafficwarden", + "ig_tylerdix", + "ig_vagspeak", + "ig_wade", + "ig_zimbor", + "mp_f_boatstaff_01", + "mp_f_cardesign_01", + "mp_f_chbar_01", + "mp_f_cocaine_01", + "mp_f_counterfeit_01", + "mp_f_deadhooker", + "mp_f_execpa_01", + "mp_f_execpa_02", + "mp_f_forgery_01", + "mp_f_freemode_01", + "mp_f_helistaff_01", + "mp_f_meth_01", + "mp_f_misty_01", + "mp_f_stripperlite", + "mp_f_weed_01", + "mp_g_m_pros_01", + "mp_m_avongoon", + "mp_m_boatstaff_01", + "mp_m_bogdangoon", + "mp_m_claude_01", + "mp_m_cocaine_01", + "mp_m_counterfeit_01", + "mp_m_exarmy_01", + "mp_m_execpa_01", + "mp_m_famdd_01", + "mp_m_fibsec_01", + "mp_m_forgery_01", + "mp_m_freemode_01", + "mp_m_g_vagfun_01", + "mp_m_marston_01", + "mp_m_meth_01", + "mp_m_niko_01", + "mp_m_securoguard_01", + "mp_m_shopkeep_01", + "mp_m_waremech_01", + "mp_m_weapexp_01", + "mp_m_weapwork_01", + "mp_m_weed_01", + "mp_s_m_armoured_01", + "player_one", + "player_two", + "player_zero", + "s_f_m_fembarber", + "s_f_m_maid_01", + "s_f_m_shop_high", + "s_f_m_sweatshop_01", + "s_f_y_airhostess_01", + "s_f_y_bartender_01", + "s_f_y_baywatch_01", + "s_f_y_cop_01", + "s_f_y_factory_01", + "s_f_y_hooker_01", + "s_f_y_hooker_02", + "s_f_y_hooker_03", + "s_f_y_migrant_01", + "s_f_y_movprem_01", + "s_f_y_ranger_01", + "s_f_y_scrubs_01", + "s_f_y_sheriff_01", + "s_f_y_shop_low", + "s_f_y_shop_mid", + "s_f_y_stripper_01", + "s_f_y_stripper_02", + "s_f_y_stripperlite", + "s_f_y_sweatshop_01", + "s_m_m_ammucountry", + "s_m_m_armoured_01", + "s_m_m_armoured_02", + "s_m_m_autoshop_01", + "s_m_m_autoshop_02", + "s_m_m_bouncer_01", + "s_m_m_ccrew_01", + "s_m_m_chemsec_01", + "s_m_m_ciasec_01", + "s_m_m_cntrybar_01", + "s_m_m_dockwork_01", + "s_m_m_doctor_01", + "s_m_m_fiboffice_01", + "s_m_m_fiboffice_02", + "s_m_m_fibsec_01", + "s_m_m_gaffer_01", + "s_m_m_gardener_01", + "s_m_m_gentransport", + "s_m_m_hairdress_01", + "s_m_m_highsec_01", + "s_m_m_highsec_02", + "s_m_m_janitor", + "s_m_m_lathandy_01", + "s_m_m_lifeinvad_01", + "s_m_m_linecook", + "s_m_m_lsmetro_01", + "s_m_m_mariachi_01", + "s_m_m_marine_01", + "s_m_m_marine_02", + "s_m_m_migrant_01", + "s_m_m_movalien_01", + "s_m_m_movprem_01", + "s_m_m_movspace_01", + "s_m_m_paramedic_01", + "s_m_m_pilot_01", + "s_m_m_pilot_02", + "s_m_m_postal_01", + "s_m_m_postal_02", + "s_m_m_prisguard_01", + "s_m_m_scientist_01", + "s_m_m_security_01", + "s_m_m_snowcop_01", + "s_m_m_strperf_01", + "s_m_m_strpreach_01", + "s_m_m_strvend_01", + "s_m_m_trucker_01", + "s_m_m_ups_01", + "s_m_m_ups_02", + "s_m_o_busker_01", + "s_m_y_airworker", + "s_m_y_ammucity_01", + "s_m_y_armymech_01", + "s_m_y_autopsy_01", + "s_m_y_barman_01", + "s_m_y_baywatch_01", + "s_m_y_blackops_01", + "s_m_y_blackops_02", + "s_m_y_blackops_03", + "s_m_y_busboy_01", + "s_m_y_chef_01", + "s_m_y_clown_01", + "s_m_y_construct_01", + "s_m_y_construct_02", + "s_m_y_cop_01", + "s_m_y_dealer_01", + "s_m_y_devinsec_01", + "s_m_y_dockwork_01", + "s_m_y_doorman_01", + "s_m_y_dwservice_01", + "s_m_y_dwservice_02", + "s_m_y_factory_01", + "s_m_y_fireman_01", + "s_m_y_garbage", + "s_m_y_grip_01", + "s_m_y_hwaycop_01", + "s_m_y_marine_01", + "s_m_y_marine_02", + "s_m_y_marine_03", + "s_m_y_mime", + "s_m_y_pestcont_01", + "s_m_y_pilot_01", + "s_m_y_prismuscl_01", + "s_m_y_prisoner_01", + "s_m_y_ranger_01", + "s_m_y_robber_01", + "s_m_y_sheriff_01", + "s_m_y_shop_mask", + "s_m_y_strvend_01", + "s_m_y_swat_01", + "s_m_y_uscg_01", + "s_m_y_valet_01", + "s_m_y_waiter_01", + "s_m_y_winclean_01", + "s_m_y_xmech_01", + "s_m_y_xmech_02_mp", + "s_m_y_xmech_02", + "u_f_m_corpse_01", + "u_f_m_drowned_01", + "u_f_m_miranda", + "u_f_m_promourn_01", + "u_f_o_moviestar", + "u_f_o_prolhost_01", + "u_f_y_bikerchic", + "u_f_y_comjane", + "u_f_y_corpse_01", + "u_f_y_corpse_02", + "u_f_y_hotposh_01", + "u_f_y_jewelass_01", + "u_f_y_mistress", + "u_f_y_poppymich", + "u_f_y_princess", + "u_f_y_spyactress", + "u_m_m_aldinapoli", + "u_m_m_bankman", + "u_m_m_bikehire_01", + "u_m_m_doa_01", + "u_m_m_edtoh", + "u_m_m_fibarchitect", + "u_m_m_filmdirector", + "u_m_m_glenstank_01", + "u_m_m_griff_01", + "u_m_m_jesus_01", + "u_m_m_jewelsec_01", + "u_m_m_jewelthief", + "u_m_m_markfost", + "u_m_m_partytarget", + "u_m_m_prolsec_01", + "u_m_m_promourn_01", + "u_m_m_rivalpap", + "u_m_m_spyactor", + "u_m_m_streetart_01", + "u_m_m_willyfist", + "u_m_o_filmnoir", + "u_m_o_finguru_01", + "u_m_o_taphillbilly", + "u_m_o_tramp_01", + "u_m_y_abner", + "u_m_y_antonb", + "u_m_y_babyd", + "u_m_y_baygor", + "u_m_y_burgerdrug_01", + "u_m_y_chip", + "u_m_y_corpse_01", + "u_m_y_cyclist_01", + "u_m_y_fibmugger_01", + "u_m_y_guido_01", + "u_m_y_gunvend_01", + "u_m_y_hippie_01", + "u_m_y_imporage", + "u_m_y_juggernaut_01", + "u_m_y_justin", + "u_m_y_mani", + "u_m_y_militarybum", + "u_m_y_paparazzi", + "u_m_y_party_01", + "u_m_y_pogo_01", + "u_m_y_prisoner_01", + "u_m_y_proldriver_01", + "u_m_y_rsranger_01", + "u_m_y_sbike", + "u_m_y_staggrm_01", + "u_m_y_tattoo_01", + "u_m_y_zombie_01", + } \ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua index a541739..aac4dc4 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -1,11 +1,27 @@ -fx_version 'adamant' +fx_version 'cerulean' game 'gta5' -shared_script 'config.lua' +author 'PlayerNo1' +description 'A player ped script' +version '2.0' -client_script 'client/*.lua' +shared_scripts { + '@ox_lib/init.lua', + 'config/config.lua', + 'config/peds.lua' +} + +client_script 'client/main.lua' server_scripts { - '@mysql-async/lib/MySQL.lua', -- Remove this if you are on QBCore - 'server/*.lua' -} \ No newline at end of file + '@oxmysql/lib/MySQL.lua', + 'server/main.lua' +} + +files { + 'locales/en.json' +} + +lua54 'yes' + +dependency 'ox_lib' \ No newline at end of file diff --git a/locales/en.json b/locales/en.json new file mode 100644 index 0000000..7c9756e --- /dev/null +++ b/locales/en.json @@ -0,0 +1,21 @@ +{ + "command_setped": "Give a designated ped to a player", + "command_pedmenu": "Shows a list of your owned peds", + "playerid": "Player Id", + "pedmodel": "Ped Model", + "invalidplayerid": "Specified Player is not online", + "invalidmodel": "Specified model is not valid!", + "pedoptions": "Ped Options", + "player": "Player", + "option": "Option", + "giveped": "Give Ped", + "removeped": "Remove Ped", + "resetped": "Reset Ped", + "resetped_description": "This will reset your ped to your default non ped menu skin.", + "nopeds": "The specified player has no peds!", + "defaultped": " ➡️ DEFAULT PED ⬅️", + "setdefault": " 🖱️ CLICK HERE TO SET THIS PED AS DEFAULT ", + "playerdefault": "This ped is the player's default ped", + "yourpeds": "Your Peds", + "removepedplayer": "%s - %s" +} \ No newline at end of file diff --git a/no1-playerped.sql b/no1-playerped.sql new file mode 100644 index 0000000..017552d --- /dev/null +++ b/no1-playerped.sql @@ -0,0 +1 @@ +CREATE TABLE `no1_playerpeds` ( `id` INT NOT NULL AUTO_INCREMENT , `identifier` VARCHAR(80) NOT NULL , `ped` VARCHAR(50) NOT NULL , `default` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), INDEX (`identifier`)) ENGINE = InnoDB; \ No newline at end of file diff --git a/server/main.lua b/server/main.lua new file mode 100644 index 0000000..de39816 --- /dev/null +++ b/server/main.lua @@ -0,0 +1,207 @@ +Framework = nil + +-- Initialise Locale -- +lib.locale() +----------------------- + +-- Check script version -- +lib.versionCheck('Seconds123/no1-playerped') + +-- MySQL queries + +local insertTable = 'INSERT INTO no1_playerpeds (`identifier`, `ped`) VALUES (@identifier, @ped)' +local removeTable = 'DELETE FROM no1_playerpeds WHERE `identifier` = @identifier AND `id` = @id' +local updateTable = 'UPDATE no1_playerpeds SET `default` = 1 WHERE `identifier` = @identifier AND `id` = @id' +local cleardefaultTable = 'UPDATE no1_playerpeds SET `default` = 0 WHERE `identifier` = @identifier' + +-- Ped Valid Function -- +local function IsPedValid(model) + local valid = false + + if Config.CustomPeds[model] then + valid = true + else + for i=1, #Config.VanillaPeds do + if model == Config.VanillaPeds[i] then + valid = true + break + end + end + end + + return valid +end + +-- Commands -- +if Config.Framework == 'esx' then + Framework = exports['es_extended']:getSharedObject() + + Framework.RegisterCommand('setped', 'admin', function(xPlayer, args, showError) + if args.playerid then + if args.model then + if IsPedValid(args.model) then + MySQL.Async.insert(insertTable, {['@identifier'] = args.playerid.identifier, ['@ped'] = args.model}) + else + TriggerClientEvent('no1-playerped:Notify', xPlayer.source, locale('invalidmodel'), 'error') + end + else + TriggerClientEvent('no1-playerped:GivePedDialogue', xPlayer.source, { + playerid = args.playerid.source, + name = args.playerid.getName(), + identifier = args.playerid.identifier + }) + end + else + TriggerClientEvent('no1-playerped:Notify', xPlayer.source, locale('invalidplayerid'), 'error') + end + end, false, {help = locale('command_setped'), validate = false, arguments = { + {name = 'playerid', help = locale('playerid'), type = 'player'}, + {name = 'model', help = locale('pedmodel'), type = 'string'} + }}) +elseif Config.Framework == 'qb' then + Framework = exports['qb-core']:GetCoreObject() + + Framework.Commands.Add('setped', locale('command_setped'), { { name = 'playerid', help = locale('playerid') }, { name = 'model', help = locale('model') } }, false, function(source, args) + local Player = Framework.Functions.GetPlayer(tonumber(args[1])) + local model = args[2] + + if Player then + if model ~= nil then + if IsPedValid(model) then + MySQL.Async.insert(insertTable, {['@identifier'] = Player.PlayerData.citizenid, ['@ped'] = model}) + else + TriggerClientEvent('no1-playerped:Notify', source, locale('invalidmodel'), 'error') + end + else + TriggerClientEvent('no1-playerped:GivePedDialogue', source, { + playerid = Player.PlayerData.source, + name = string.format('%s %s', Player.PlayerData.charinfo.firstname, Player.PlayerData.charinfo.lastname), + identifier = Player.PlayerData.citizenid + }) + end + else + TriggerClientEvent('no1-playerped:Notify', source, locale('invalidplayerid'), 'error') + end + end, Config.AdminGroups[1]) +end + +-- Functions -- + +local function GetPlayer(playerid) + if Config.Framework == 'esx' then + return Framework.GetPlayerFromId(playerid) + elseif Config.Framework == 'qb' then + return Framework.Functions.GetPlayer(playerid) + end +end + +local function GetPlayerId(playerid) + if Config.Framework == 'esx' then + return Framework.GetPlayerFromId(playerid).identifier + elseif Config.Framework == 'qb' then + return Framework.Functions.GetPlayer(playerid).PlayerData.citizenid + end +end + +local function HasPermission(playerid) + local permission = false + + if Config.Framework == 'esx' then + local xPlayer = GetPlayer(playerid) + + for i=1, #Config.AdminGroups do + if xPlayer.getGroup() == Config.AdminGroups[i] then + permission = true + break + end + end + elseif Config.Framework == 'qb' then + for i=1, #Config.AdminGroups do + if Framework.Functions.HasPermission(playerid, Config.AdminGroups[i]) then + permission = true + break + end + end + end + + return permission +end + +local function GetPlayerPeds(id) + local peds = {} + local result = MySQL.Sync.fetchAll('SELECT * FROM no1_playerpeds WHERE identifier = @identifier', { + ['@identifier'] = id + }) + + if result and result[1] then + for _, v in pairs(result) do + peds[#peds+1] = v + end + end + + return peds +end + +-- Callbacks -- + +lib.callback.register('no1-playerped:GetPlayerPeds', function(source, target) + local src = target or source + local playerid = GetPlayerId(src) + local peds = GetPlayerPeds(playerid) + return peds +end) + +lib.callback.register('no1-playerped:GetDefaultPed', function(source) + local src = source + local playerid = GetPlayerId(src) + local result = MySQL.Sync.fetchAll('SELECT * FROM no1_playerpeds WHERE identifier = @identifier AND `default` = 1', { + ['@identifier'] = playerid + }) + + if result and result[1] then + return result[1].ped + else + return false + end +end) + +-- Events -- +RegisterNetEvent('no1-playerped:SetPlayerPed', function(data) + local src = source + local model = data.model + local identifier = data.identifier + + if HasPermission(src) then + if identifier then + if IsPedValid(model) then + local insert = MySQL.Sync.insert(insertTable, {['@identifier'] = identifier, ['@ped'] = model}) + end + end + end +end) + +RegisterNetEvent('no1-playerped:DeletePlayerPed', function(data) + local src = source + local identifier = data.identifier + local id = data.id + + if HasPermission(src) then + MySQL.Async.execute(removeTable, {['@identifier'] = identifier, ['@id'] = id}) + end +end) + +RegisterNetEvent('no1-playerped:SetDefaultPed', function(data) + local src = source + local identifier = GetPlayerId(src) + local id = data.id + local ped = data.ped + + if identifier then + MySQL.Async.execute(cleardefaultTable, {['@identifier'] = identifier}, function() + MySQL.Async.execute(updateTable, {['@identifier'] = identifier, ['@id'] = id}) + TriggerClientEvent('no1-playerped:SetPlayerPed', src, ped) + end) + end +end) + + diff --git a/server/pedModels.lua b/server/pedModels.lua deleted file mode 100644 index a1c9417..0000000 --- a/server/pedModels.lua +++ /dev/null @@ -1,747 +0,0 @@ -Peds = {} - -Peds.DLCList = { - {modelName = "example"}, -} - -Peds.VanillaList = { - {modelName = "a_c_boar"}, - {modelName = "a_c_cat_01"}, - {modelName = "a_c_chickenhawk"}, - {modelName = "a_c_chimp"}, - {modelName = "a_c_chop"}, - {modelName = "a_c_cormorant"}, - {modelName = "a_c_cow"}, - {modelName = "a_c_coyote"}, - {modelName = "a_c_crow"}, - {modelName = "a_c_deer"}, - {modelName = "a_c_dolphin"}, - {modelName = "a_c_fish"}, - {modelName = "a_c_hen"}, - {modelName = "a_c_humpback"}, - {modelName = "a_c_husky"}, - {modelName = "a_c_killerwhale"}, - {modelName = "a_c_mtlion"}, - {modelName = "a_c_pig"}, - {modelName = "a_c_pigeon"}, - {modelName = "a_c_poodle"}, - {modelName = "a_c_pug"}, - {modelName = "a_c_rabbit_01"}, - {modelName = "a_c_rat"}, - {modelName = "a_c_retriever"}, - {modelName = "a_c_rhesus"}, - {modelName = "a_c_rottweiler"}, - {modelName = "a_c_seagull"}, - {modelName = "a_c_sharkhammer"}, - {modelName = "a_c_sharktiger"}, - {modelName = "a_c_shepherd"}, - {modelName = "a_c_stingray"}, - {modelName = "a_c_westy"}, - {modelName = "a_f_m_beach_01"}, - {modelName = "a_f_m_bevhills_01"}, - {modelName = "a_f_m_bevhills_02"}, - {modelName = "a_f_m_bodybuild_01"}, - {modelName = "a_f_m_business_02"}, - {modelName = "a_f_m_downtown_01"}, - {modelName = "a_f_m_eastsa_01"}, - {modelName = "a_f_m_eastsa_02"}, - {modelName = "a_f_m_fatbla_01"}, - {modelName = "a_f_m_fatcult_01"}, - {modelName = "a_f_m_fatwhite_01"}, - {modelName = "a_f_m_ktown_01"}, - {modelName = "a_f_m_ktown_02"}, - {modelName = "a_f_m_prolhost_01"}, - {modelName = "a_f_m_salton_01"}, - {modelName = "a_f_m_skidrow_01"}, - {modelName = "a_f_m_soucent_01"}, - {modelName = "a_f_m_soucent_02"}, - {modelName = "a_f_m_soucentmc_01"}, - {modelName = "a_f_m_tourist_01"}, - {modelName = "a_f_m_tramp_01"}, - {modelName = "a_f_m_trampbeac_01"}, - {modelName = "a_f_o_genstreet_01"}, - {modelName = "a_f_o_indian_01"}, - {modelName = "a_f_o_ktown_01"}, - {modelName = "a_f_o_salton_01"}, - {modelName = "a_f_o_soucent_01"}, - {modelName = "a_f_o_soucent_02"}, - {modelName = "a_f_y_beach_01"}, - {modelName = "a_f_y_bevhills_01"}, - {modelName = "a_f_y_bevhills_02"}, - {modelName = "a_f_y_bevhills_03"}, - {modelName = "a_f_y_bevhills_04"}, - {modelName = "a_f_y_business_01"}, - {modelName = "a_f_y_business_02"}, - {modelName = "a_f_y_business_03"}, - {modelName = "a_f_y_business_04"}, - {modelName = "a_f_y_eastsa_01"}, - {modelName = "a_f_y_eastsa_02"}, - {modelName = "a_f_y_eastsa_03"}, - {modelName = "a_f_y_epsilon_01"}, - {modelName = "a_f_y_femaleagent"}, - {modelName = "a_f_y_fitness_01"}, - {modelName = "a_f_y_fitness_02"}, - {modelName = "a_f_y_genhot_01"}, - {modelName = "a_f_y_golfer_01"}, - {modelName = "a_f_y_hiker_01"}, - {modelName = "a_f_y_hippie_01"}, - {modelName = "a_f_y_hipster_01"}, - {modelName = "a_f_y_hipster_02"}, - {modelName = "a_f_y_hipster_03"}, - {modelName = "a_f_y_hipster_04"}, - {modelName = "a_f_y_indian_01"}, - {modelName = "a_f_y_juggalo_01"}, - {modelName = "a_f_y_runner_01"}, - {modelName = "a_f_y_rurmeth_01"}, - {modelName = "a_f_y_scdressy_01"}, - {modelName = "a_f_y_skater_01"}, - {modelName = "a_f_y_soucent_01"}, - {modelName = "a_f_y_soucent_02"}, - {modelName = "a_f_y_soucent_03"}, - {modelName = "a_f_y_tennis_01"}, - {modelName = "a_f_y_topless_01"}, - {modelName = "a_f_y_tourist_01"}, - {modelName = "a_f_y_tourist_02"}, - {modelName = "a_f_y_vinewood_01"}, - {modelName = "a_f_y_vinewood_02"}, - {modelName = "a_f_y_vinewood_03"}, - {modelName = "a_f_y_vinewood_04"}, - {modelName = "a_f_y_yoga_01"}, - {modelName = "a_m_m_acult_01"}, - {modelName = "a_m_m_afriamer_01"}, - {modelName = "a_m_m_beach_01"}, - {modelName = "a_m_m_beach_02"}, - {modelName = "a_m_m_bevhills_01"}, - {modelName = "a_m_m_bevhills_02"}, - {modelName = "a_m_m_business_01"}, - {modelName = "a_m_m_eastsa_01"}, - {modelName = "a_m_m_eastsa_02"}, - {modelName = "a_m_m_farmer_01"}, - {modelName = "a_m_m_fatlatin_01"}, - {modelName = "a_m_m_genfat_01"}, - {modelName = "a_m_m_genfat_02"}, - {modelName = "a_m_m_golfer_01"}, - {modelName = "a_m_m_hasjew_01"}, - {modelName = "a_m_m_hillbilly_01"}, - {modelName = "a_m_m_hillbilly_02"}, - {modelName = "a_m_m_indian_01"}, - {modelName = "a_m_m_ktown_01"}, - {modelName = "a_m_m_malibu_01"}, - {modelName = "a_m_m_mexcntry_01"}, - {modelName = "a_m_m_mexlabor_01"}, - {modelName = "a_m_m_og_boss_01"}, - {modelName = "a_m_m_paparazzi_01"}, - {modelName = "a_m_m_polynesian_01"}, - {modelName = "a_m_m_prolhost_01"}, - {modelName = "a_m_m_rurmeth_01"}, - {modelName = "a_m_m_salton_01"}, - {modelName = "a_m_m_salton_02"}, - {modelName = "a_m_m_salton_03"}, - {modelName = "a_m_m_salton_04"}, - {modelName = "a_m_m_skater_01"}, - {modelName = "a_m_m_skidrow_01"}, - {modelName = "a_m_m_socenlat_01"}, - {modelName = "a_m_m_soucent_01"}, - {modelName = "a_m_m_soucent_02"}, - {modelName = "a_m_m_soucent_03"}, - {modelName = "a_m_m_soucent_04"}, - {modelName = "a_m_m_stlat_02"}, - {modelName = "a_m_m_tennis_01"}, - {modelName = "a_m_m_tourist_01"}, - {modelName = "a_m_m_tramp_01"}, - {modelName = "a_m_m_trampbeac_01"}, - {modelName = "a_m_m_tranvest_01"}, - {modelName = "a_m_m_tranvest_02"}, - {modelName = "a_m_o_acult_01"}, - {modelName = "a_m_o_acult_02"}, - {modelName = "a_m_o_beach_01"}, - {modelName = "a_m_o_genstreet_01"}, - {modelName = "a_m_o_ktown_01"}, - {modelName = "a_m_o_salton_01"}, - {modelName = "a_m_o_soucent_01"}, - {modelName = "a_m_o_soucent_02"}, - {modelName = "a_m_o_soucent_03"}, - {modelName = "a_m_o_tramp_01"}, - {modelName = "a_m_y_acult_01"}, - {modelName = "a_m_y_acult_02"}, - {modelName = "a_m_y_beach_01"}, - {modelName = "a_m_y_beach_02"}, - {modelName = "a_m_y_beach_03"}, - {modelName = "a_m_y_beachvesp_01"}, - {modelName = "a_m_y_beachvesp_02"}, - {modelName = "a_m_y_bevhills_01"}, - {modelName = "a_m_y_bevhills_02"}, - {modelName = "a_m_y_breakdance_01"}, - {modelName = "a_m_y_busicas_01"}, - {modelName = "a_m_y_business_01"}, - {modelName = "a_m_y_business_02"}, - {modelName = "a_m_y_business_03"}, - {modelName = "a_m_y_cyclist_01"}, - {modelName = "a_m_y_dhill_01"}, - {modelName = "a_m_y_downtown_01"}, - {modelName = "a_m_y_eastsa_01"}, - {modelName = "a_m_y_eastsa_02"}, - {modelName = "a_m_y_epsilon_01"}, - {modelName = "a_m_y_epsilon_02"}, - {modelName = "a_m_y_gay_01"}, - {modelName = "a_m_y_gay_02"}, - {modelName = "a_m_y_genstreet_01"}, - {modelName = "a_m_y_genstreet_02"}, - {modelName = "a_m_y_golfer_01"}, - {modelName = "a_m_y_hasjew_01"}, - {modelName = "a_m_y_hiker_01"}, - {modelName = "a_m_y_hippy_01"}, - {modelName = "a_m_y_hipster_01"}, - {modelName = "a_m_y_hipster_02"}, - {modelName = "a_m_y_hipster_03"}, - {modelName = "a_m_y_indian_01"}, - {modelName = "a_m_y_jetski_01"}, - {modelName = "a_m_y_juggalo_01"}, - {modelName = "a_m_y_ktown_01"}, - {modelName = "a_m_y_ktown_02"}, - {modelName = "a_m_y_latino_01"}, - {modelName = "a_m_y_methhead_01"}, - {modelName = "a_m_y_mexthug_01"}, - {modelName = "a_m_y_motox_01"}, - {modelName = "a_m_y_motox_02"}, - {modelName = "a_m_y_musclbeac_01"}, - {modelName = "a_m_y_musclbeac_02"}, - {modelName = "a_m_y_polynesian_01"}, - {modelName = "a_m_y_roadcyc_01"}, - {modelName = "a_m_y_runner_01"}, - {modelName = "a_m_y_runner_02"}, - {modelName = "a_m_y_salton_01"}, - {modelName = "a_m_y_skater_01"}, - {modelName = "a_m_y_skater_02"}, - {modelName = "a_m_y_soucent_01"}, - {modelName = "a_m_y_soucent_02"}, - {modelName = "a_m_y_soucent_03"}, - {modelName = "a_m_y_soucent_04"}, - {modelName = "a_m_y_stbla_01"}, - {modelName = "a_m_y_stbla_02"}, - {modelName = "a_m_y_stlat_01"}, - {modelName = "a_m_y_stwhi_01"}, - {modelName = "a_m_y_stwhi_02"}, - {modelName = "a_m_y_sunbathe_01"}, - {modelName = "a_m_y_surfer_01"}, - {modelName = "a_m_y_vindouche_01"}, - {modelName = "a_m_y_vinewood_01"}, - {modelName = "a_m_y_vinewood_02"}, - {modelName = "a_m_y_vinewood_03"}, - {modelName = "a_m_y_vinewood_04"}, - {modelName = "a_m_y_yoga_01"}, - {modelName = "cs_amandatownley"}, - {modelName = "cs_andreas"}, - {modelName = "cs_ashley"}, - {modelName = "cs_bankman"}, - {modelName = "cs_barry"}, - {modelName = "cs_beverly"}, - {modelName = "cs_brad"}, - {modelName = "cs_bradcadaver"}, - {modelName = "cs_carbuyer"}, - {modelName = "cs_casey"}, - {modelName = "cs_chengsr"}, - {modelName = "cs_chrisformage"}, - {modelName = "cs_clay"}, - {modelName = "cs_dale"}, - {modelName = "cs_davenorton"}, - {modelName = "cs_debra"}, - {modelName = "cs_denise"}, - {modelName = "cs_devin"}, - {modelName = "cs_dom"}, - {modelName = "cs_dreyfuss"}, - {modelName = "cs_drfriedlander"}, - {modelName = "cs_fabien"}, - {modelName = "cs_fbisuit_01"}, - {modelName = "cs_floyd"}, - {modelName = "cs_guadalope"}, - {modelName = "cs_gurk"}, - {modelName = "cs_hunter"}, - {modelName = "cs_janet"}, - {modelName = "cs_jewelass"}, - {modelName = "cs_jimmyboston"}, - {modelName = "cs_jimmydisanto"}, - {modelName = "cs_joeminuteman"}, - {modelName = "cs_johnnyklebitz"}, - {modelName = "cs_josef"}, - {modelName = "cs_josh"}, - {modelName = "cs_karen_daniels"}, - {modelName = "cs_lamardavis"}, - {modelName = "cs_lazlow"}, - {modelName = "cs_lestercrest"}, - {modelName = "cs_lifeinvad_01"}, - {modelName = "cs_magenta"}, - {modelName = "cs_manuel"}, - {modelName = "cs_marnie"}, - {modelName = "cs_martinmadrazo"}, - {modelName = "cs_maryann"}, - {modelName = "cs_michelle"}, - {modelName = "cs_milton"}, - {modelName = "cs_molly"}, - {modelName = "cs_movpremf_01"}, - {modelName = "cs_movpremmale"}, - {modelName = "cs_mrk"}, - {modelName = "cs_mrs_thornhill"}, - {modelName = "cs_mrsphillips"}, - {modelName = "cs_natalia"}, - {modelName = "cs_nervousron"}, - {modelName = "cs_nigel"}, - {modelName = "cs_old_man1a"}, - {modelName = "cs_old_man2"}, - {modelName = "cs_omega"}, - {modelName = "cs_orleans"}, - {modelName = "cs_paper"}, - {modelName = "cs_patricia"}, - {modelName = "cs_priest"}, - {modelName = "cs_prolsec_02"}, - {modelName = "cs_russiandrunk"}, - {modelName = "cs_siemonyetarian"}, - {modelName = "cs_solomon"}, - {modelName = "cs_stevehains"}, - {modelName = "cs_stretch"}, - {modelName = "cs_tanisha"}, - {modelName = "cs_taocheng"}, - {modelName = "cs_taostranslator"}, - {modelName = "cs_tenniscoach"}, - {modelName = "cs_terry"}, - {modelName = "cs_tom"}, - {modelName = "cs_tomepsilon"}, - {modelName = "cs_tracydisanto"}, - {modelName = "cs_wade"}, - {modelName = "cs_zimbor"}, - {modelName = "csb_abigail"}, - {modelName = "csb_agent"}, - {modelName = "csb_anita"}, - {modelName = "csb_anton"}, - {modelName = "csb_ballasog"}, - {modelName = "csb_bride"}, - {modelName = "csb_burgerdrug"}, - {modelName = "csb_car3guy1"}, - {modelName = "csb_car3guy2"}, - {modelName = "csb_chef"}, - {modelName = "csb_chef2"}, - {modelName = "csb_chin_goon"}, - {modelName = "csb_cletus"}, - {modelName = "csb_cop"}, - {modelName = "csb_customer"}, - {modelName = "csb_denise_friend"}, - {modelName = "csb_fos_rep"}, - {modelName = "csb_g"}, - {modelName = "csb_groom"}, - {modelName = "csb_grove_str_dlr"}, - {modelName = "csb_hao"}, - {modelName = "csb_hugh"}, - {modelName = "csb_imran"}, - {modelName = "csb_jackhowitzer"}, - {modelName = "csb_janitor"}, - {modelName = "csb_maude"}, - {modelName = "csb_money"}, - {modelName = "csb_mp_agent14"}, - {modelName = "csb_mweather"}, - {modelName = "csb_ortega"}, - {modelName = "csb_oscar"}, - {modelName = "csb_paige"}, - {modelName = "csb_popov"}, - {modelName = "csb_porndudes"}, - {modelName = "csb_prologuedriver"}, - {modelName = "csb_prolsec"}, - {modelName = "csb_ramp_gang"}, - {modelName = "csb_ramp_hic"}, - {modelName = "csb_ramp_hipster"}, - {modelName = "csb_ramp_marine"}, - {modelName = "csb_ramp_mex"}, - {modelName = "csb_rashcosvki"}, - {modelName = "csb_reporter"}, - {modelName = "csb_roccopelosi"}, - {modelName = "csb_screen_writer"}, - {modelName = "csb_stripper_01"}, - {modelName = "csb_stripper_02"}, - {modelName = "csb_tonya"}, - {modelName = "csb_trafficwarden"}, - {modelName = "csb_undercover"}, - {modelName = "csb_vagspeak"}, - {modelName = "g_f_importexport_01"}, - {modelName = "g_f_y_ballas_01"}, - {modelName = "g_f_y_families_01"}, - {modelName = "g_f_y_lost_01"}, - {modelName = "g_f_y_vagos_01"}, - {modelName = "g_m_importexport_01"}, - {modelName = "g_m_m_armboss_01"}, - {modelName = "g_m_m_armgoon_01"}, - {modelName = "g_m_m_armlieut_01"}, - {modelName = "g_m_m_chemwork_01"}, - {modelName = "g_m_m_chiboss_01"}, - {modelName = "g_m_m_chicold_01"}, - {modelName = "g_m_m_chigoon_01"}, - {modelName = "g_m_m_chigoon_02"}, - {modelName = "g_m_m_korboss_01"}, - {modelName = "g_m_m_mexboss_01"}, - {modelName = "g_m_m_mexboss_02"}, - {modelName = "g_m_y_armgoon_02"}, - {modelName = "g_m_y_azteca_01"}, - {modelName = "g_m_y_ballaeast_01"}, - {modelName = "g_m_y_ballaorig_01"}, - {modelName = "g_m_y_ballasout_01"}, - {modelName = "g_m_y_famca_01"}, - {modelName = "g_m_y_famdnf_01"}, - {modelName = "g_m_y_famfor_01"}, - {modelName = "g_m_y_korean_01"}, - {modelName = "g_m_y_korean_02"}, - {modelName = "g_m_y_korlieut_01"}, - {modelName = "g_m_y_lost_01"}, - {modelName = "g_m_y_lost_02"}, - {modelName = "g_m_y_lost_03"}, - {modelName = "g_m_y_mexgang_01"}, - {modelName = "g_m_y_mexgoon_01"}, - {modelName = "g_m_y_mexgoon_02"}, - {modelName = "g_m_y_mexgoon_03"}, - {modelName = "g_m_y_pologoon_01"}, - {modelName = "g_m_y_pologoon_02"}, - {modelName = "g_m_y_salvaboss_01"}, - {modelName = "g_m_y_salvagoon_01"}, - {modelName = "g_m_y_salvagoon_02"}, - {modelName = "g_m_y_salvagoon_03"}, - {modelName = "g_m_y_strpunk_01"}, - {modelName = "g_m_y_strpunk_02"}, - {modelName = "hc_driver"}, - {modelName = "hc_gunman"}, - {modelName = "hc_hacker"}, - {modelName = "ig_abigail"}, - {modelName = "ig_agent"}, - {modelName = "ig_amandatownley"}, - {modelName = "ig_andreas"}, - {modelName = "ig_ashley"}, - {modelName = "ig_avon"}, - {modelName = "ig_ballasog"}, - {modelName = "ig_bankman"}, - {modelName = "ig_barry"}, - {modelName = "ig_benny"}, - {modelName = "ig_bestmen"}, - {modelName = "ig_beverly"}, - {modelName = "ig_brad"}, - {modelName = "ig_bride"}, - {modelName = "ig_car3guy1"}, - {modelName = "ig_car3guy2"}, - {modelName = "ig_casey"}, - {modelName = "ig_chef"}, - {modelName = "ig_chef2"}, - {modelName = "ig_chengsr"}, - {modelName = "ig_chrisformage"}, - {modelName = "ig_clay"}, - {modelName = "ig_claypain"}, - {modelName = "ig_cletus"}, - {modelName = "ig_dale"}, - {modelName = "ig_davenorton"}, - {modelName = "ig_denise"}, - {modelName = "ig_devin"}, - {modelName = "ig_dom"}, - {modelName = "ig_dreyfuss"}, - {modelName = "ig_drfriedlander"}, - {modelName = "ig_fabien"}, - {modelName = "ig_fbisuit_01"}, - {modelName = "ig_floyd"}, - {modelName = "ig_g"}, - {modelName = "ig_groom"}, - {modelName = "ig_hao"}, - {modelName = "ig_hunter"}, - {modelName = "ig_janet"}, - {modelName = "ig_jay_norris"}, - {modelName = "ig_jewelass"}, - {modelName = "ig_jimmyboston"}, - {modelName = "ig_jimmydisanto"}, - {modelName = "ig_joeminuteman"}, - {modelName = "ig_johnnyklebitz"}, - {modelName = "ig_josef"}, - {modelName = "ig_josh"}, - {modelName = "ig_karen_daniels"}, - {modelName = "ig_kerrymcintosh"}, - {modelName = "ig_lamardavis"}, - {modelName = "ig_lazlow"}, - {modelName = "ig_lestercrest_2"}, - {modelName = "ig_lestercrest"}, - {modelName = "ig_lifeinvad_01"}, - {modelName = "ig_lifeinvad_02"}, - {modelName = "ig_magenta"}, - {modelName = "ig_malc"}, - {modelName = "ig_manuel"}, - {modelName = "ig_marnie"}, - {modelName = "ig_maryann"}, - {modelName = "ig_maude"}, - {modelName = "ig_michelle"}, - {modelName = "ig_milton"}, - {modelName = "ig_molly"}, - {modelName = "ig_money"}, - {modelName = "ig_mp_agent14"}, - {modelName = "ig_mrk"}, - {modelName = "ig_mrs_thornhill"}, - {modelName = "ig_mrsphillips"}, - {modelName = "ig_natalia"}, - {modelName = "ig_nervousron"}, - {modelName = "ig_nigel"}, - {modelName = "ig_old_man1a"}, - {modelName = "ig_old_man2"}, - {modelName = "ig_omega"}, - {modelName = "ig_oneil"}, - {modelName = "ig_orleans"}, - {modelName = "ig_ortega"}, - {modelName = "ig_paige"}, - {modelName = "ig_paper"}, - {modelName = "ig_patricia"}, - {modelName = "ig_popov"}, - {modelName = "ig_priest"}, - {modelName = "ig_prolsec_02"}, - {modelName = "ig_ramp_gang"}, - {modelName = "ig_ramp_hic"}, - {modelName = "ig_ramp_hipster"}, - {modelName = "ig_ramp_mex"}, - {modelName = "ig_rashcosvki"}, - {modelName = "ig_roccopelosi"}, - {modelName = "ig_russiandrunk"}, - {modelName = "ig_screen_writer"}, - {modelName = "ig_siemonyetarian"}, - {modelName = "ig_solomon"}, - {modelName = "ig_stevehains"}, - {modelName = "ig_stretch"}, - {modelName = "ig_talina"}, - {modelName = "ig_tanisha"}, - {modelName = "ig_taocheng"}, - {modelName = "ig_taostranslator"}, - {modelName = "ig_tenniscoach"}, - {modelName = "ig_terry"}, - {modelName = "ig_tomepsilon"}, - {modelName = "ig_tonya"}, - {modelName = "ig_tracydisanto"}, - {modelName = "ig_trafficwarden"}, - {modelName = "ig_tylerdix"}, - {modelName = "ig_vagspeak"}, - {modelName = "ig_wade"}, - {modelName = "ig_zimbor"}, - {modelName = "mp_f_boatstaff_01"}, - {modelName = "mp_f_cardesign_01"}, - {modelName = "mp_f_chbar_01"}, - {modelName = "mp_f_cocaine_01"}, - {modelName = "mp_f_counterfeit_01"}, - {modelName = "mp_f_deadhooker"}, - {modelName = "mp_f_execpa_01"}, - {modelName = "mp_f_execpa_02"}, - {modelName = "mp_f_forgery_01"}, - {modelName = "mp_f_freemode_01"}, - {modelName = "mp_f_helistaff_01"}, - {modelName = "mp_f_meth_01"}, - {modelName = "mp_f_misty_01"}, - {modelName = "mp_f_stripperlite"}, - {modelName = "mp_f_weed_01"}, - {modelName = "mp_g_m_pros_01"}, - {modelName = "mp_m_avongoon"}, - {modelName = "mp_m_boatstaff_01"}, - {modelName = "mp_m_bogdangoon"}, - {modelName = "mp_m_claude_01"}, - {modelName = "mp_m_cocaine_01"}, - {modelName = "mp_m_counterfeit_01"}, - {modelName = "mp_m_exarmy_01"}, - {modelName = "mp_m_execpa_01"}, - {modelName = "mp_m_famdd_01"}, - {modelName = "mp_m_fibsec_01"}, - {modelName = "mp_m_forgery_01"}, - {modelName = "mp_m_freemode_01"}, - {modelName = "mp_m_g_vagfun_01"}, - {modelName = "mp_m_marston_01"}, - {modelName = "mp_m_meth_01"}, - {modelName = "mp_m_niko_01"}, - {modelName = "mp_m_securoguard_01"}, - {modelName = "mp_m_shopkeep_01"}, - {modelName = "mp_m_waremech_01"}, - {modelName = "mp_m_weapexp_01"}, - {modelName = "mp_m_weapwork_01"}, - {modelName = "mp_m_weed_01"}, - {modelName = "mp_s_m_armoured_01"}, - {modelName = "player_one"}, - {modelName = "player_two"}, - {modelName = "player_zero"}, - {modelName = "s_f_m_fembarber"}, - {modelName = "s_f_m_maid_01"}, - {modelName = "s_f_m_shop_high"}, - {modelName = "s_f_m_sweatshop_01"}, - {modelName = "s_f_y_airhostess_01"}, - {modelName = "s_f_y_bartender_01"}, - {modelName = "s_f_y_baywatch_01"}, - {modelName = "s_f_y_cop_01"}, - {modelName = "s_f_y_factory_01"}, - {modelName = "s_f_y_hooker_01"}, - {modelName = "s_f_y_hooker_02"}, - {modelName = "s_f_y_hooker_03"}, - {modelName = "s_f_y_migrant_01"}, - {modelName = "s_f_y_movprem_01"}, - {modelName = "s_f_y_ranger_01"}, - {modelName = "s_f_y_scrubs_01"}, - {modelName = "s_f_y_sheriff_01"}, - {modelName = "s_f_y_shop_low"}, - {modelName = "s_f_y_shop_mid"}, - {modelName = "s_f_y_stripper_01"}, - {modelName = "s_f_y_stripper_02"}, - {modelName = "s_f_y_stripperlite"}, - {modelName = "s_f_y_sweatshop_01"}, - {modelName = "s_m_m_ammucountry"}, - {modelName = "s_m_m_armoured_01"}, - {modelName = "s_m_m_armoured_02"}, - {modelName = "s_m_m_autoshop_01"}, - {modelName = "s_m_m_autoshop_02"}, - {modelName = "s_m_m_bouncer_01"}, - {modelName = "s_m_m_ccrew_01"}, - {modelName = "s_m_m_chemsec_01"}, - {modelName = "s_m_m_ciasec_01"}, - {modelName = "s_m_m_cntrybar_01"}, - {modelName = "s_m_m_dockwork_01"}, - {modelName = "s_m_m_doctor_01"}, - {modelName = "s_m_m_fiboffice_01"}, - {modelName = "s_m_m_fiboffice_02"}, - {modelName = "s_m_m_fibsec_01"}, - {modelName = "s_m_m_gaffer_01"}, - {modelName = "s_m_m_gardener_01"}, - {modelName = "s_m_m_gentransport"}, - {modelName = "s_m_m_hairdress_01"}, - {modelName = "s_m_m_highsec_01"}, - {modelName = "s_m_m_highsec_02"}, - {modelName = "s_m_m_janitor"}, - {modelName = "s_m_m_lathandy_01"}, - {modelName = "s_m_m_lifeinvad_01"}, - {modelName = "s_m_m_linecook"}, - {modelName = "s_m_m_lsmetro_01"}, - {modelName = "s_m_m_mariachi_01"}, - {modelName = "s_m_m_marine_01"}, - {modelName = "s_m_m_marine_02"}, - {modelName = "s_m_m_migrant_01"}, - {modelName = "s_m_m_movalien_01"}, - {modelName = "s_m_m_movprem_01"}, - {modelName = "s_m_m_movspace_01"}, - {modelName = "s_m_m_paramedic_01"}, - {modelName = "s_m_m_pilot_01"}, - {modelName = "s_m_m_pilot_02"}, - {modelName = "s_m_m_postal_01"}, - {modelName = "s_m_m_postal_02"}, - {modelName = "s_m_m_prisguard_01"}, - {modelName = "s_m_m_scientist_01"}, - {modelName = "s_m_m_security_01"}, - {modelName = "s_m_m_snowcop_01"}, - {modelName = "s_m_m_strperf_01"}, - {modelName = "s_m_m_strpreach_01"}, - {modelName = "s_m_m_strvend_01"}, - {modelName = "s_m_m_trucker_01"}, - {modelName = "s_m_m_ups_01"}, - {modelName = "s_m_m_ups_02"}, - {modelName = "s_m_o_busker_01"}, - {modelName = "s_m_y_airworker"}, - {modelName = "s_m_y_ammucity_01"}, - {modelName = "s_m_y_armymech_01"}, - {modelName = "s_m_y_autopsy_01"}, - {modelName = "s_m_y_barman_01"}, - {modelName = "s_m_y_baywatch_01"}, - {modelName = "s_m_y_blackops_01"}, - {modelName = "s_m_y_blackops_02"}, - {modelName = "s_m_y_blackops_03"}, - {modelName = "s_m_y_busboy_01"}, - {modelName = "s_m_y_chef_01"}, - {modelName = "s_m_y_clown_01"}, - {modelName = "s_m_y_construct_01"}, - {modelName = "s_m_y_construct_02"}, - {modelName = "s_m_y_cop_01"}, - {modelName = "s_m_y_dealer_01"}, - {modelName = "s_m_y_devinsec_01"}, - {modelName = "s_m_y_dockwork_01"}, - {modelName = "s_m_y_doorman_01"}, - {modelName = "s_m_y_dwservice_01"}, - {modelName = "s_m_y_dwservice_02"}, - {modelName = "s_m_y_factory_01"}, - {modelName = "s_m_y_fireman_01"}, - {modelName = "s_m_y_garbage"}, - {modelName = "s_m_y_grip_01"}, - {modelName = "s_m_y_hwaycop_01"}, - {modelName = "s_m_y_marine_01"}, - {modelName = "s_m_y_marine_02"}, - {modelName = "s_m_y_marine_03"}, - {modelName = "s_m_y_mime"}, - {modelName = "s_m_y_pestcont_01"}, - {modelName = "s_m_y_pilot_01"}, - {modelName = "s_m_y_prismuscl_01"}, - {modelName = "s_m_y_prisoner_01"}, - {modelName = "s_m_y_ranger_01"}, - {modelName = "s_m_y_robber_01"}, - {modelName = "s_m_y_sheriff_01"}, - {modelName = "s_m_y_shop_mask"}, - {modelName = "s_m_y_strvend_01"}, - {modelName = "s_m_y_swat_01"}, - {modelName = "s_m_y_uscg_01"}, - {modelName = "s_m_y_valet_01"}, - {modelName = "s_m_y_waiter_01"}, - {modelName = "s_m_y_winclean_01"}, - {modelName = "s_m_y_xmech_01"}, - {modelName = "s_m_y_xmech_02_mp"}, - {modelName = "s_m_y_xmech_02"}, - {modelName = "u_f_m_corpse_01"}, - {modelName = "u_f_m_drowned_01"}, - {modelName = "u_f_m_miranda"}, - {modelName = "u_f_m_promourn_01"}, - {modelName = "u_f_o_moviestar"}, - {modelName = "u_f_o_prolhost_01"}, - {modelName = "u_f_y_bikerchic"}, - {modelName = "u_f_y_comjane"}, - {modelName = "u_f_y_corpse_01"}, - {modelName = "u_f_y_corpse_02"}, - {modelName = "u_f_y_hotposh_01"}, - {modelName = "u_f_y_jewelass_01"}, - {modelName = "u_f_y_mistress"}, - {modelName = "u_f_y_poppymich"}, - {modelName = "u_f_y_princess"}, - {modelName = "u_f_y_spyactress"}, - {modelName = "u_m_m_aldinapoli"}, - {modelName = "u_m_m_bankman"}, - {modelName = "u_m_m_bikehire_01"}, - {modelName = "u_m_m_doa_01"}, - {modelName = "u_m_m_edtoh"}, - {modelName = "u_m_m_fibarchitect"}, - {modelName = "u_m_m_filmdirector"}, - {modelName = "u_m_m_glenstank_01"}, - {modelName = "u_m_m_griff_01"}, - {modelName = "u_m_m_jesus_01"}, - {modelName = "u_m_m_jewelsec_01"}, - {modelName = "u_m_m_jewelthief"}, - {modelName = "u_m_m_markfost"}, - {modelName = "u_m_m_partytarget"}, - {modelName = "u_m_m_prolsec_01"}, - {modelName = "u_m_m_promourn_01"}, - {modelName = "u_m_m_rivalpap"}, - {modelName = "u_m_m_spyactor"}, - {modelName = "u_m_m_streetart_01"}, - {modelName = "u_m_m_willyfist"}, - {modelName = "u_m_o_filmnoir"}, - {modelName = "u_m_o_finguru_01"}, - {modelName = "u_m_o_taphillbilly"}, - {modelName = "u_m_o_tramp_01"}, - {modelName = "u_m_y_abner"}, - {modelName = "u_m_y_antonb"}, - {modelName = "u_m_y_babyd"}, - {modelName = "u_m_y_baygor"}, - {modelName = "u_m_y_burgerdrug_01"}, - {modelName = "u_m_y_chip"}, - {modelName = "u_m_y_corpse_01"}, - {modelName = "u_m_y_cyclist_01"}, - {modelName = "u_m_y_fibmugger_01"}, - {modelName = "u_m_y_guido_01"}, - {modelName = "u_m_y_gunvend_01"}, - {modelName = "u_m_y_hippie_01"}, - {modelName = "u_m_y_imporage"}, - {modelName = "u_m_y_juggernaut_01"}, - {modelName = "u_m_y_justin"}, - {modelName = "u_m_y_mani"}, - {modelName = "u_m_y_militarybum"}, - {modelName = "u_m_y_paparazzi"}, - {modelName = "u_m_y_party_01"}, - {modelName = "u_m_y_pogo_01"}, - {modelName = "u_m_y_prisoner_01"}, - {modelName = "u_m_y_proldriver_01"}, - {modelName = "u_m_y_rsranger_01"}, - {modelName = "u_m_y_sbike"}, - {modelName = "u_m_y_staggrm_01"}, - {modelName = "u_m_y_tattoo_01"}, - {modelName = "u_m_y_zombie_01"}, - } \ No newline at end of file diff --git a/server/server.lua b/server/server.lua deleted file mode 100644 index 1f55229..0000000 --- a/server/server.lua +++ /dev/null @@ -1,119 +0,0 @@ -if Config.Framework == 'esx' then - MySQL.ready(function() - MySQL.Async.execute("ALTER TABLE `users` ADD COLUMN IF NOT EXISTS `ped` VARCHAR(255) DEFAULT 'none'", {}) - end) - - local ESX = nil - - if Config.ESXversion == '1.1' or Config.ESXversion == '1.2' then - TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) - elseif Config.ESXversion == 'legacy' then - ESX = exports['es_extended']:getSharedObject() - end - - local function SetPlayerPed(identifier, model) - MySQL.Async.execute("UPDATE `users` SET `ped` = @ped WHERE `identifier` = @identifier", { - ['@ped'] = model, - ['@identifier'] = identifier - }) - end - - local function RegisterCmd(version) - if version == '1.1' then - TriggerEvent('es:addGroupCommand', 'setped', 'admin', function(source, args, user) - local src = source - local xTarget = ESX.GetPlayerFromId(tonumber(args[1])) - local pedModel = tostring(args[2]) - - if xTarget then - if ValidPedModel(pedModel) or pedModel == "none" then - SetPlayerPed(xTarget.identifier, pedModel) - - if pedModel == "none" then - TriggerClientEvent('no1-playerped:client:ResetPlayerPed', xTarget.source) - TriggerClientEvent('chat:addMessage', src, {args = {'^1SYSTEM', ('You have reset %s ped to default!'):format(xTarget.name)}}) - else - TriggerClientEvent('no1-playerped:client:SetPlayerPed', xTarget.source, pedModel) - TriggerClientEvent('chat:addMessage', src, {args = {'^1SYSTEM', ('You have set %s ped to %s!'):format(xTarget.name, pedModel)}}) - end - else - TriggerClientEvent('chat:addMessage', xPlayer.source, {args = {'^1SYSTEM', 'Invalid Ped Model!'}}) - end - else - TriggerClientEvent('chat:addMessage', src, {args = {'^1SYSTEM', 'Invalid PlayerID!'}}) - end - end, function(source, args, user) - TriggerClientEvent('chat:addMessage', src, {args = { '^1SYSTEM', 'Insufficient Permissions.' }}) - end, {help = 'Set a ped to player', params = {{name = "player", help = "playerid"}, {name = "model", help = "ped model"}}}) - elseif version == '1.2' or version == 'legacy' then - ESX.RegisterCommand('setped', 'admin', function(xPlayer, args, showError) - local xTarget = ESX.GetPlayerFromId(args.target) - - if xTarget then - if ValidPedModel(args.model) or args.model == "none" then - SetPlayerPed(xTarget.identifier, args.model) - - if args.model == "none" then - TriggerClientEvent('no1-playerped:client:ResetPlayerPed', xTarget.source) - TriggerClientEvent('chat:addMessage', xPlayer.source, {args = {'^1SYSTEM', ('You have reset %s ped to default!'):format(xTarget.name)}}) - else - TriggerClientEvent('no1-playerped:client:SetPlayerPed', xTarget.source, args.model) - TriggerClientEvent('chat:addMessage', xPlayer.source, {args = {'^1SYSTEM', ('You have set %s ped to %s!'):format(xTarget.name, args.model)}}) - end - else - TriggerClientEvent('chat:addMessage', xPlayer.source, {args = {'^1SYSTEM', 'Invalid Ped Model!'}}) - end - else - TriggerClientEvent('chat:addMessage', xPlayer.source, {args = {'^1SYSTEM', 'Invalid PlayerID!'}}) - end - end, true, {help = 'Set a ped to player', validate = true, arguments = { - {name = 'target', help = 'playerid', type = 'number'}, - {name = 'model', help = 'ped model', type = 'string'} - }}) - end - end - - RegisterCmd(Config.ESXversion) - - ESX.RegisterServerCallback('no1-playerped:server:GetPlayerPed', function(source, cb) - local xPlayer = ESX.GetPlayerFromId(source) - - MySQL.Async.fetchScalar('SELECT `ped` FROM users WHERE `identifier` = @identifier', { - ['@identifier'] = xPlayer.identifier - }, function(result) - cb(result) - end) - end) -elseif Config.Framework == 'qbcore' then - -- Not done yet -end - -local validModel = false - -function ValidPedModel(pedModel) - if pedModel and type(pedModel) == 'string' then - for i = 1, #Peds.VanillaList do - local validPed = Peds.VanillaList[i] - if pedModel == validPed.modelName then - --print("Valid Model: ["..tostring(pedModel).."] found.") - validModel = true - return true - end - end - if Config.allowDLCPeds then - for i = 1, #Peds.DLCList do - local validPed = Peds.DLCList[i] - if pedModel == validPed.modelName then - --print("Valid DLC Model: ["..tostring(pedModel).."] found.") - validModel = true - return true - end - end - end - validModel = false - if not validModel then --[[print("Ped Model: "..pedModel.." failed model check.")]] return false end - else - --print("Invaild Model: ["..tostring(pedModel).."].") - end -end -