[Release][ESX] Give all players item or weapon or money, Now can set time to auto give!

This is my first release
a simple plugin, hope you like :smiley:

You can give all players item or money or weapon with command
also you can setting auto give time in config to all players

In Game Commands:

/giveallitem <item> <count> 
/giveallweapon <weapon> <ammo amount>
/addallmoney <account> <amount>

image
image
image

On Console Commands: (need changed prefix to “_”)

_giveallitem <item> <count> 
_giveallweapon <weapon> <ammo amount>
_addallmoney <account> <amount>

image

Config:

Config.AllowAdminInGameCommand = true -- Commands: /giveallitem <item> <count>, /giveallweapon <weapon> <ammo amount>, /addallmoney <account> <amount>
Config.EnableServerCommand = true -- you can using command on console to give. but command prefix need changed to "_", example: _giveallitem, _giveallweapon, _addallmoney

-- how many minutes to give. if don't want, you can type false
Config.TimeGiveItem = 30
Config.TimeGiveMoney = false 
Config.TimeGiveWeapon = false
-- do you want random the auto give stuff of one?
Config.RandomGiveItem = false
Config.RandomGiveMoney = false
Config.RandomGiveWeapon = false

Config.Items = {
	{name = 'water', count = 1},
--	{name = 'bread', count = 2}
}

Config.Money = {
	{account = 'bank', amount = 500},
 	{account = 'money', amount = 500},
--	{account = 'black_money', amount = 100}
}

Config.Weapon = {
	{weaponName = 'WEAPON_PISTOL', amount = 10}, -- amount is ammo count
--	{weaponName = 'WEAPON_FIREEXTINGUISHER', amount = 2000}
}

GitHub download link

13 Likes

goodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgood

Thank the lord this isn’t client-side lmao.

you able to add automatique give a X time
exemple : 1h all player receve pistol or medic kit

2 Likes

Nice release, good thing that it’s properly serversided for once. Do keep in mind that ESX is moving away from EssentialMode in the near future which will break compatibility with scripts using es:addGroupCommand server events.

1 Like

updated ! :smiley:

1 Like

man thx :smiley:

1 Like

Tried to command but there’s nothing happened

do you using command in game or console?

ok sorry, I found problem and fixed :sweat_smile:
but console command prefix need changed to “_”
example:
_giveallitem _giveallweapon _addallmoney

You need to update download the newest :wink:

How i need to change code if i want give weapons for group like mod in the server?

Unable to enable automatic donation time

can you send me your config settings?

Sorry, i have found the problem, thank you


Please, help(((

Any idea why the commands don’t exist after the script loads succesfully?
Running latest ESX…

1 Like

you can change any command code to RegisterCommand to register command

1 Like

what do i have to put in account?

Hi,

I have a question. Do you have an idea how to setup a random chance for the item. I wanna use Config.Items = {
{name = ‘water’, count = 1},
– {name = ‘bread’, count = 2}
}
but i want that each hour there will be 1 bread or 1 water per exemple.

Thank you if you can help anyway nice script :slight_smile:

1 Like

:arrow_up: Update!
You can setup in config:

-- do you want random the auto give stuff of one?
Config.RandomGiveItem = false
Config.RandomGiveMoney = false
Config.RandomGiveWeapon = false