Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Commit

Permalink
Merge pull request #49 from FiveM-Scripts/v1.3.1
Browse files Browse the repository at this point in the history
V1.3.1
  • Loading branch information
ghermans authored Dec 24, 2017
2 parents 97a54cc + dc37e64 commit 0ca89ca
Show file tree
Hide file tree
Showing 20 changed files with 957 additions and 663 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Guidelines for bug reports:

- Use the github issue search - check if the issue is already reported.
- Check if the issue has been fixed - try to reproduce it using the lastest master or development branch in the repo.
- Check if the issue has been fixed - try to reproduce it using the lastest version.
- isolate the problem - So the community doesn't have hard times finding the possible bug.

## Labels
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog
All notable changes to this project will be documented in this file.

## v1.3.1
This release contains some improvements to the resource and as a Christmas gift we added the vehicle shop with CouchDB and MySQL support.

- Added GTA:O chat as a option that you can enable or disable in the config file. Keep in mind that this chat does not support commands.
- Premium Deluxe Motorsport where players can buy multiple vehicles.
- Added Lesters office.
- Added Humane Labs and Research blip.
- Fixed Database table creation for MariaDB.
- Fixed Office banner and ped skin.
- Removed wanted and voice head display, we will add this feature soon in Cops-Fivem.

## v1.3
- Added mysql-async support.
- Removed the stats preview since this will get replaced in the future.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# fs_freemode
[![Version](https://img.shields.io/badge/Version-1.3-brightgreen.svg)]()
[![Version](https://img.shields.io/badge/Version-v1.3.1-brightgreen.svg)]()
<a href="https://discord.gg/Cgr5FU6" title="Chat on Discord"><img alt="Discord Status" src="https://discordapp.com/api/guilds/285462938691567627/widget.png"></a>

## Requirements
Expand Down
3 changes: 2 additions & 1 deletion __resource.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ client_scripts {
'libs/events.lua',
'libs/scoreboard.lua',
'libs/warmenu.lua',
'config/vehicles.lua',
'config.lua',
'client.lua',
'int/comedy.lua',
'int/office.lua',
'int/vehicles.lua',
'int/weapons.lua',
'int/warehouses.lua',
'ext/locations.lua',
Expand All @@ -36,5 +38,4 @@ server_scripts {
'database.lua',
'libs/db.lua',
'server.lua',
'int/weapons_s.lua'
}
61 changes: 15 additions & 46 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ AddEventHandler('onClientMapStart', function()
end)

AddEventHandler("playerSpawned", function(spawn)
local playerID = PlayerId()
local player = GetPlayerPed(-1)
local playerName = GetPlayerName(playerID)

Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), 'FE_THDR_GTAO', Setup.ServerName)
if Setup.DisplayWelcomeNotification then
TriggerEvent("fs_freemode:notify", "CHAR_SOCIAL_CLUB", 4, 2, Setup.ServerName, false, i18n.translate("welcome_message") .. playerName)
end

SetAudioFlag("LoadMPData", true)
SetAudioFlag("WantedMusicDisabled", Setup.WantedMusicDisabled)
local player = GetPlayerPed(-1)
local playerID = PlayerId()
local playerName = GetPlayerName(playerID)

AddTextEntry('FE_THDR_GTAO', Setup.ServerName)
if Setup.DisplayWelcomeNotification then
TriggerEvent("fs_freemode:notify", "CHAR_SOCIAL_CLUB", 4, 2, Setup.ServerName, false, i18n.translate("welcome_message") .. playerName)
end

GiveWeaponToPed(player, GetHashKey("WEAPON_PISTOL"), 100, false, true)
GiveWeaponToPed(player, GetHashKey("WEAPON_KNIFE"), true, true)
spawned = true
TriggerServerEvent("fs_freemode:playerSpawned")

if Setup.SetTextChatEnabled then
SetTextChatEnabled(true)
else
SetTextChatEnabled(false)
end

TriggerServerEvent("fs_freemode:playerSpawned")
end)

Citizen.CreateThread(function()
Expand All @@ -37,33 +36,3 @@ Citizen.CreateThread(function()
end
end
end)

Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
-- Check if the player is wanted
if Setup.WantedHeadDisplay == true then
if GetPlayerWantedLevel(PlayerId()) ~= 0 then
gamerTagId = CreateMpGamerTag(GetPlayerPed(-1), "", false, false, "", 0)
SetMpGamerTagWantedLevel(gamerTagId, PlayerId())
SetMpGamerTagVisibility(gamerTagId, 7, true)
SetMpGamerTagAlpha(gamerTagId, 7, 240)
else
SetMpGamerTagVisibility(gamerTagId, 7, false)
end
end

-- Check if the player is talking
if Setup.VoiceHeadDisplay == true then
local pid = GetPlayerServerId(PlayerId())
if NetworkIsPlayerTalking(pid) then
gamerTagId = CreateMpGamerTag(GetPlayerPed(-1), "", false, false, "", 0)
SetMpGamerTagWantedLevel(gamerTagId, PlayerId())
SetMpGamerTagVisibility(gamerTagId, 4, true)
SetMpGamerTagAlpha(gamerTagId, 4, 240)
else
SetMpGamerTagVisibility(gamerTagId, 4, false)
end
end
end
end)
6 changes: 2 additions & 4 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ Setup = {}
Setup.ServerName = "My Server"
Setup.DisplayWelcomeNotification = true
Setup.blips = true
Setup.Money = 500000
Setup.Money = 800000
Setup.NativeMoney = false
Setup.Currency = "$"
Setup.WantedMusicDisabled = true
Setup.WantedHeadDisplay = true
Setup.VoiceHeadDisplay = true
Setup.SpawnPickups = true
Setup.pvp = true
Setup.debug = false
Setup.SetTextChatEnabled = false

PickupItems = {
"PICKUP_ARMOUR_STANDARD",
Expand Down
189 changes: 189 additions & 0 deletions config/vehicles.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
-- No need to change the CarGroups table.
carGroups = {
{name="Compacts", type="compacts"},
{name="Coupes", type="coupes"},
{name="Muscle", type="muscle"},
{name="Off-Road", type="offroad"},
{name="Sedans", type="sedans"},
{name="Sports", type="sports"},
{name="Sport Classics", type="sportclassics"},
{name="Super", type="super"},
{name="SUVs", type="suvs"},
{name="Vans", type="vans"}
}

-- Change vehicle prices below
compacts = {
{name= "Blista", costs = 15000, model = "blista"},
{name= "Brioso R/A", costs = 155000, model = "brioso"},
{name= "Dilettante", costs = 25000, model = "Dilettante"},
{name= "Issi", costs = 18000, model = "issi2"},
{name= "Panto", costs = 85000, model = "panto"},
{name= "Prairie", costs = 30000, model = "prairie"},
{name= "Rhapsody", costs = 120000, model = "rhapsody"}
}

coupes = {
{name= "Cognoscenti Cabrio", costs = 180000, model = "cogcabrio"},
{name= "Exemplar", costs = 200000, model = "exemplar"},
{name= "F620", costs = 80000, model= "f620"},
{name= "Felon", costs = 90000, model= "felon"},
{name= "Felon GT", costs = 95000, model= "felon2"},
{name= "Jackal", costs = 60000, model= "jackal"},
{name= "Oracle", costs = 80000, model= "oracle"},
{name= "Oracle XS", costs = 82000, model= "oracle2"},
{name= "Sentinel", costs = 90000, model= "sentinel"},
{name= "Sentinel XS", costs = 60000, model= "sentinel2"},
{name= "Windsor", costs = 800000, model= "windsor"},
{name= "Windsor Drop", costs = 850000, model= "windsor2"},
{name= "Zion", costs = 60000, model = "zion"},
{name= "Zion Cabrio", costs = 65000, model = "zion2"}
}

sedans = {
{name = "Asea", costs = 1000000, model = "asea"},
{name = "Asterope", costs = 1000000, model = "asterope"},
{name = "Cognoscenti", costs = 1000000, model = "cognoscenti"},
{name = "Cognoscenti(Armored)", costs = 1000000, model = "cognoscenti2"},
{name = "Cognoscenti 55", costs = 1000000, model = "cognoscenti3"},
{name = "Cognoscenti 55(Armored", costs = 1500000, model = "ZENTORNO"},
{name = "Fugitive", costs = 24000, model = "fugitive"},
{name = "Glendale", costs = 200000, model = "glendale"},
{name = "Ingot", costs = 9000, model = "ingot"},
{name = "Intruder", costs = 16000, model = "intruder"},
{name = "Premier", costs = 10000, model = "premier"},
{name = "Primo", costs = 9000, model = "primo"},
{name = "Primo Custom", costs = 9500, model = "primo2"},
{name = "Regina", costs = 8000, model = "regina"},
{name = "Schafter", costs = 65000, model = "schafter2"},
{name = "Stanier", costs = 10000, model = "stanier"},
{name = "Stratum", costs = 10000, model = "stratum"},
{name = "Stretch", costs = 30000, model = "stretch"},
{name = "Super Diamond", costs = 250000, model = "superd"},
{name = "Surge", costs = 38000, model = "surge"},
{name = "Tailgater", costs = 55000, model = "tailgater"},
{name = "Warrener", costs = 120000, model = "warrener"},
{name = "Washington", costs = 15000, model = "washington"}
}

sports = {
{name= "9F", costs = 120000, model = "ninef"},
{name= "9F Cabrio", costs = 130000, model = "ninef2"},
{name= "Alpha", costs = 150000, model = "alpha"},
{name= "Banshee", costs = 105000, model = "banshee"},
{name= "Bestia GTS", costs = 610000, model = "bestiagts"},
{name= "Blista Compact", costs = 42000, model = "blista"},
{name= "Buffalo", costs = 35000, model = "buffalo"},
{name= "Buffalo S", costs = 96000, model = "buffalo2"},
{name= "Carbonizzare", costs = 195000, model = "carbonizzare"},
{name= "Comet", costs = 100000, model = "comet2"},
{name= "Comet Retro Custom", costs = 100000, model = "comet2"},
{name= "Coquette", costs = 138000, model = "coquette"},
{name= "Drift Tampa", costs = 995000, model = "tampa2"},
{name= "Feltzer", costs = 130000, model = "feltzer2"},
{name= "Furore GT", costs = 448000, model = "furoregt"},
{name= "Fusiladzae", costs = 36000, model = "fusilade"},
{name= "Jester", costs = 240000, model = "jester"},
{name= "Jester(Racecar)", costs = 350000, model = "jester2"},
{name= "Kuruma", costs = 95000, model = "kuruma"},
{name= "Lynx", costs = 1735000, model = "lynx"},
{name= "Massacro", costs = 275000, model = "massacro"},
{name= "Massacro(Racecar)", costs = 385000, model = "massacro2"},
{name= "Omnis", costs = 701000, model = "omnis"},
{name= "Ruiner 2000", costs=5745600, model= "ruiner2"},
{name= "Penumbra", costs = 24000, model = "penumbra"},
{name= "Rapid GT", costs = 140000, model = "rapidgt"},
{name= "Rapid GT Convertible", costs = 150000, model = "rapidgt2"},
{name= "Schafter V12", costs = 140000, model = "schafter3"},
{name= "Sultan", costs = 12000, model = "sultan"},
{name= "Surano", costs = 110000, model = "surano"},
{name= "Tropos", costs = 816000, model = "tropos"},
{name= "Verkierer", costs = 695000, model = "verlierer2"}
}

sportclassics = {
{name = "Casco", costs = 680000, model = "casco"},
{name = "Coquette Classic", costs = 665000, model = "coquette2"},
{name = "JB 700", costs = 350000, model = "jb700"},
{name = "Pigalle", costs = 400000, model = "pigalle"},
{name = "Stinger", costs = 850000, model = "stinger"},
{name = "Stinger GT", costs = 875000, model = "stingergt"},
{name = "Stirling GT", costs = 975000, model = "feltzer3"},
{name = "Z-Type", costs = 950000, model = "ztype"}
}

super = {
{name = "Adder", costs = 1000000, model = "adder"},
{name = "Banshee 900R", costs = 565000, model = "banshee2"},
{name = "Bullet", costs = 155000, model = "bullet"},
{name = "Cheetah", costs = 650000, model = "cheetah"},
{name = "Entity XF", costs = 795000, model = "entityxf"},
{name = "ETR1", costs = 199500, model = "sheava"},
{name = "FMJ", costs = 1750000, model = "fmj"},
{name = "Infernus", costs = 440000, model = "infernus"},
{name = "Osiris", costs = 1950000, model = "osiris"},
{name = "RE-7B", costs = 2475000, model = "le7b"},
{name = "Reaper", costs = 1595000, model = "reaper"},
{name = "Sultan RS", costs = 795000, model = "sultanrs"},
{name = "T20", costs = 2200000, model = "t20"},
{name = "Turismo R", costs = 500000, model = "turismor"},
{name = "Tyrus", costs = 2550000, model = "tyrus"},
{name = "Vacca", costs = 240000, model = "vacca"},
{name = "Voltic", costs = 150000, model = "voltic"},
{name = "X80 Proto", costs = 2700000, model = "prototipo"},
{name = "Zentorno", costs = 725000, model = "zentorno"}
}

muscle = {
{name = "Blade", costs = 160000, model = "blade"},
{name = "Buccaneer", costs = 29000, model = "buccaneer"},
{name = "Chino", costs = 225000, model = "chino"},
{name = "Coquette BlackFin", costs = 695000, model = "coquette3"},
{name = "Dominator", costs = 35000, model = "dominator"},
{name = "Dukes", costs = 62000, model = "dukes"},
{name = "Gauntlet", costs = 32000, model = "gauntlet"},
{name = "Hotknife", costs = 90000, model = "hotknife"},
{name = "Faction", costs = 36000, model = "faction"},
{name = "Nightshade", costs = 585000, model = "nightshade"},
{name = "Picador", costs = 9000, model = "picador"},
{name = "Sabre Turbo", costs = 15000, model = "sabregt"},
{name = "Tampa", costs = 375000, model = "tampa"},
{name = "Virgo", costs = 195000, model = "virgo"},
{name = "Vigero", costs = 21000, model = "vigero"},
}

offroad = {
{name = "Bifta", costs = 75000, model = "bifta"},
{name = "Blazer", costs = 8000, model = "blazer"},
{name = "Brawler", costs = 715000, model = "brawler"},
{name = "Bubsta 6x6", costs = 249000, model = "dubsta3"},
{name = "Dune Buggy", costs = 20000, model = "dune"},
{name = "Rebel", costs = 22000, model = "rebel2"},
{name = "Sandking", costs = 38000, model = "sandking"},
{name = "The Liberator", costs = 550000, model = "monster"},
{name = "Trophy Truck", costs = 550000, model = "trophytruck"},
}

suvs = {
{name = "Baller", costs = 90000, model = "baller"},
{name = "Cavalcade", costs = 60000, model = "cavalcade"},
{name = "Grabger", costs = 35000, model = "granger"},
{name = "Huntley S", costs = 195000, model = "huntley"},
{name = "Landstalker", costs = 58000, model = "landstalker"},
{name = "Radius", costs = 32000, model = "radi"},
{name = "Rocoto", costs = 85000, model = "rocoto"},
{name = "Seminole", costs = 30000, model = "seminole"},
{name = "XLS", costs = 253000, model = "xls"}
}

vans = {
{name = "Bison", costs = 30000, model = "bison"},
{name = "Bobcat XL", costs = 23000, model = "bobcatxl"},
{name = "Gang Burrito", costs = 65000, model = "gburrito"},
{name = "Journey", costs = 15000, model = "journey"},
{name = "Minivan", costs = 30000, model = "minivan"},
{name = "Paradise", costs = 25000, model = "paradise"},
{name = "Rumpo", costs = 13000, model = "rumpo"},
{name = "Surfer", costs = 11000, model = "surfer"},
{name = "Youga", costs = 16000, model = "youga"}
}
4 changes: 3 additions & 1 deletion database.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
-- no need to change this, use convars instead
-- Check the documentation https://freemode.readme.io/docs/getting-started
database = {
driver = GetConvar('database_driver', 'mysql-async'),
driver = GetConvar('database_driver', 'couchdb'),
host = GetConvar('es_couchdb_url', '127.0.0.1'),
port = GetConvar('es_couchdb_port', '5984'),
username = GetConvar('es_couchdb_password', 'admin:changeme')
Expand Down
16 changes: 9 additions & 7 deletions ext/locations.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local locations = {
{name="Altruist Cult Camp", id=269, c=4, x=-1042.29, y=4910.17, z=94.92},
{name="Ammu-Nation", id=110, c=4, x=1701.292, y=3750.450, z=34.365},
{name="Ammu-Nation", id=110, c=4, x=237.428, y=-43.655, z=69.698},
{name="Ammu-Nation", id=110, c=4, x=843.604, y=-1017.784, z=27.546},
Expand All @@ -12,24 +13,23 @@ local locations = {
{name="Carwash", id=100, x=55.7, y=-1391.3, z=30.5},
{name="Carwash", id=100, x=-699.320, y=-941.078, z=19.077},
{name="Comedy Club", id=102, x=-420.087, y=264.681, z=83.1927},
{name="Movie Theater", id=135, c=4, x= 300.788, y= 200.752, z= 104.385},
{name="Movie Theater", id=135, c=4, x= -1423.954, y= -213.62, z= 46.5},
{name="Movie Theater", id=135, c=4, x=302.907, y= 135.939, z= 160.946},
{name="Masks store", id=362, c=4, x= -1166.284, y= -1586.368, z=4.377},
{name="Strip club", id=121, c=4, x=134.476, y=-1307.887, z=28.983},
{name="Tequil-La La", id=93, c=4, x=-565.171, y=276.625, z=83.286},
{name="Gang", id=437, c=9, x=298.68, y=-2010.10, z=20.07},
{name="Gang", id=437, c=9, x=86.64, y=-1924.60, z=20.79},
{name="Gang", id=437, c=9, x=-183.52, y=-1632.62, z=33.34},
{name="Gang", id=437, c=9, x=989.37, y=-1777.56, z=31.32},
{name="Gang", id=437, c=9, x=960.24, y=-140.31, z=74.50},
{name="Gang", id=437, c=9, x=-1042.29, y=4910.17, z=94.92},
{name="Gang", id=437, c=9, x=29.4838, y=3735.593, z=38.688},
{name="Gang", id=437, c=9, x=-455.752, y=-1711.884, z=18.642},
{name="FIB", id=106, c=4, x=105.455, y=-745.483, z=44.754},
{name="Lester", id=77, c=4, x=718.413, y=-981.006, z=24.124},
{name="Police station", id=60, c=4, x=425.130, y=-979.558, z=30.711},
{name="Police station", id=60, c=4, x=1859.234, y= 3678.742, z=33.690},
{name="Police station", id=60, c=4, x=-438.862, y=6020.768, z=31.490},
{name="Police station", id=60, c=4, x=818.221, y=-1289.883, z=26.300},
{name="Premium Deluxe MotorSport", id=326, c=4, x=-67.264, y=-1091.146, z=26.632},
{name="Prison", id=285, c=4, x=1679.049, y=2513.711, z=45.565},
{name="Yacht", id=410, c=4, x=-2045.800, y=-1031.200, z=11.900},
{name="Warehouse", id=473, c=4, x=958.50, y=-1586.30, z=30.0},
Expand All @@ -40,8 +40,8 @@ local locations = {
{name="Meth Production", id=499, c=4, x=1179.732, y=-3114.203, z=6.028},
{name="Money Production", id=500, c=4, x=639.35, y=2769.65, z=30},
{name="Fake ID Production", id=498, c=4, x=378.646, y=-834.4833, z=29.292},
{name="Office", id=475, c=4, x=-79.25, y=-833.75, z=30},
{name="Bunker", id=557, c=4, x=2110.75, y=3326.50, z=30.0}
{name="Office", id=475, c=4, x=-43.954, y=-796.541, z=44.225},
{name="Humane Labs", id=80, c=4, x=3624.632, y=3756.963, z=28.516}
}

Citizen.CreateThread(function()
Expand Down Expand Up @@ -120,5 +120,7 @@ Citizen.CreateThread(function()
RequestIpl("ex_exec_warehouse_placement_interior_1_int_warehouse_s_dlc_milo")
RequestIpl("ex_exec_warehouse_placement_interior_0_int_warehouse_m_dlc_milo")
RequestIpl("ex_exec_warehouse_placement_interior_2_int_warehouse_l_dlc_milo")
RequestIpl("ex_dt1_11_office_02b")
RequestIpl("ex_dt1_11_office_02c")
RequestIpl("id2_14_during_door")
RequestIpl("id2_14_during1")
end)
Loading

0 comments on commit 0ca89ca

Please sign in to comment.