Giter VIP home page Giter VIP logo

gang's Introduction

Fivem Stand A Lone Gang System

This stand a lone resource adds Gang System with armories, vehicle garages and ability for gang members to search, handcuff people and much more. Developed by Erfan Ebrahimi

Demo

you can sea video of this script in YouTube

Requirements

  • This stand a lone resource and nothing required

  • Pay attention! If you want to use armories, search and salary system of gang, you should sync resource with your FiveM core like ESX.

    • For syncing this resource with your core just need too add your core function to esxBaseFunction.lua or other core you use.
    • We add ESX and QBus core as default to this resource(Do not forget change your baseFunction file in the end of __resource.lua).

Download & Installation

Using fvm

fvm install --save --folder=gang yeganehha/gang

Using Git

cd resources
git clone https://github.com/yeganehha/gang [gang]/gang

Manually

Installation

  • Import gang.sql in your database

  • Sync BaseFunction.lua with your core (If your core is not ESX or QBus)

    • If your core is not ESX or QBus replace

        server_script 'esxBaseFunction.lua'
        client_script 'esxBaseFunction.lua'
      

      with

        server_script 'BaseFunction.lua'
        client_script 'BaseFunction.lua'
      

      in end of __resource.lua

    • If your core is QBus replace

        server_script 'esxBaseFunction.lua'
        client_script 'esxBaseFunction.lua'
      

      with

        server_script 'BaseFunction.lua'
        client_script 'BaseFunction.lua'
      

      in end of __resource.lua

  • Add this to your server.cfg:

add_principal identifier.steam:xxxxxxxxxx group.gangManager
add_ace resource.gang command.add_ace allow
start gang

change xxxxxxxxxx to your steam hex to access manage gangs

  • If you want change config you should modify config.lua file

  • Restart your Fivem Server

  • go in your server and use /gangs command (if not change from config.lua) to open admin menu

  • in creat gang, dont forget add expire time and other configuration

  • palyer can use /gang command to refresh gang data in client

exports

you can use bellow exports in other client files

export description usage Example
isOwnGangVehicle check is vehicle related Player Gang for lock or unlock cars door. If you use esx_carlock , you can download file from here. local vehicle = GetVehiclePedIsIn(PlayerPedId()) exports['gang']:isOwnGangVehicle(vehicle)
getGangID Get Playr Gang ID Any Where You Want exports['gang']:getGangID()
getGangGrade Get Playr Gang Grade (0 for boss) Any Where You Want exports['gang']:getGangGrade()
getGangName Get Playr Gang Name in HUD or Any Where You Want exports['gang']:getGangName()
getGangGradeName Get Playr Gang Grade Name in HUD or Any Where You Want exports['gang']:getGangGradeName()

Special thank

Thank you for contributing to the progress and well-being of the project ๐Ÿ–ค

Legal

License

gang - gang script for Fivem

Copyright (C) 2020-2020 Erfan Ebrahimi

This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.

This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.

You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.

gang's People

Contributors

yeganehha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gang's Issues

QXMYSQL

Hello, i am ussing oxmyslq with qb-core, but there is error in client, main lua 108, is it becouse I am using oxmysql instead of mysql-async, I tried changing it to oxmysql in resource.lua and ofc changed to qbbasefunction.

add gang name and grade in customui

hi i need help to add a label in customui for gang name and grade
i wanna replace that on job2 codes
html

<div class="stat" id="job2">
		<div class="icon"><img src="img/jobs/unemployed2.png"></div><span>job - jobgrade</span>
	</div>

js

else if (event.data.action == "setValue2"){
			if (event.data.key == "job2"){
				setjob2Icon(event.data.icon2)
			}
			setValue(event.data.key, event.data.value)

client

	local job2 = data.job2
	SendNUIMessage({action = "setValue2", key = "job2", value = job2.label.." - "..job2.grade_label, icon2 = job2.name})

RegisterNetEvent('esx:setJob2')
AddEventHandler('esx:setJob2', function(job2)
  SendNUIMessage({action = "setValue2", key = "job2", value = job2.label.." - "..job2.grade_label, icon2 = job2.name})
end)

Not working?

I followed all the instructions. It doesn't work. What does adding core function mean? I found the script initially on cfx.re forum. It won't set blips, and doesn't do anything. I can see the menu to set myself as a member but afterwards, nothing comes up. what button pulls up gang menu?

Invalid Permission

Seems like everything works when following the steps.

I also ensured I added my steam identifier hex where it asked me to.

When I am in game and do /gangs it says "Invalid Permission"
Am I missing something else that I was supposed to add to give myself permission to access the /gangs?

duplication issue

It is possible to dupe items when 2 players have the F5 menu open and both confiscate.

Can you fix this please?

gang sql

image

this sctipt is kicking my server to high ms :(

ADD car to gang

so i buy the car and when i want to like put it in the gang garage it doesnt let me it sais to change license plate and i change that to but it still doesnt let me store the car
and can you give ma an example of the sql that goes in gang car
like in the sql its like gang id license vehicle type stored
what shouls i put for stored and type

Foreign key constraint

gangs_grade (errno: 150 "Foreign key constraint is incorrectly formed") when importing sql

problems

dup problem in search on dead body and add close menu in far distance (still open they can take items from each other when they are not near each other)

dup problem in search on dead body = when someone dead we can take his items and after revive he have all items

Esx_inventoryhud integration

Hi and sorry for the issue.

Is there a way to integrate the esx_inventoryhud interface when opening the armory or searching users?

I think this is not simple since the native sql interaction from inventoryhud search for datastore with gangs name...

maybe you can think about this even if this resouce is not related to any framework...

Problem with MySQL

hi i have one question , i have issue with mysql after starting server, but script works can you help me ?

Creating script environments for gang
[ERROR] [MySQL] An critical error happens on MySQL for query "UPDATE gangs_vehicle SET stored = true WHERE stored = @stored {@stored=False}": Object reference not set to an instance of an object. at MySqlConnector.Core.ConnectionPool.GetPool (System.String connectionString) [0x0001a] in <149068887d4e4bc08e7b4c05a59a923b>:0

at MySql.Data.MySqlClient.MySqlConnection.CreateSessionAsync (System.Nullable`1[T] ioBehavior, System.Threading.CancellationToken cancellationToken) [0x00012] in <149068887d4e4bc08e7b4c05a59a923b>:0

at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1+ConfiguredValueTaskAwaiter[TResult].GetResult () [0x0001e] in <4ac30274d31c4b8099694c24336fcb22>:0

at MySql.Data.MySqlClient.MySqlConnection.OpenAsync (System.Nullable`1[T] ioBehavior, System.Threading.CancellationToken cancellationToken) [0x000bc] in <149068887d4e4bc08e7b4c05a59a923b>:0

at MySQLAsync.Operation1[TResult].ExecuteAsync (System.String query, System.Collections.Generic.IDictionary2[TKey,TValue] parameters, CitizenFX.Core.CallbackDelegate callback, System.Boolean debug) [0x000aa] in <6f835765886c4fada3e5ffb1ffcd6998>:0
Started resource gang

Can't see gang on server join

When joining the server after a reboot, or just logging out and coming back, you can no longer see or access gang blips or anything.

This happens both on server reboot, and on rejoining the server after you've joined the gang.

In order to fix it, an ADMIN has to go into /gangs and re-set the blip location and everything shows back up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.