Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Question Create event to use item that already has been created

morango

Gold Elite
Joined
Jan 29, 2022
Messages
39
Reaction score
187
Points
256
Location
world
Hello, somebody know how to create a event to use a item that already as been created, for example I already have a fixtool and I can use it but I want to create a event for when I trigger that event I use a fixtool, can somebody help me ?
 

snitchers

Developer
Joined
Oct 12, 2021
Messages
72
Solutions
4
Reaction score
1,657
Points
306
Location
Netherlands
Hello, somebody know how to create a event to use a item that already as been created, for example I already have a fixtool and I can use it but I want to create a event for when I trigger that event I use a fixtool, can somebody help me ?
Don't know what your framework is but for ESX :

Code:
ESX.RegisterUsableItem('fixtool', function(source)
    do whatever you want in here..
end)

for QBCore:

Code:
QBCore.Functions.CreateUseableItem('fixtool', function(source)
    do whatever you want...
end)
 

morango

Gold Elite
Joined
Jan 29, 2022
Messages
39
Reaction score
187
Points
256
Location
world
I already have that but the one that I am asking for its for example I want to do a event that when I trigger that event I use a fixtool, how can I do that ?
 

snitchers

Developer
Joined
Oct 12, 2021
Messages
72
Solutions
4
Reaction score
1,657
Points
306
Location
Netherlands
I already have that but the one that I am asking for its for example I want to do a event that when I trigger that event I use a fixtool, how can I do that ?
What if you create just a netevent and check (hasitem) if the user has item and do the same code in your usable item code ?
 
Top