[RELEASE] XNLRankBar ('Fully' working original GTA Rankbar / XP Bar NATIVELY! - with original GTA Levels!)

Glad i could help :slight_smile:
Goodluck with the rest of the script :slight_smile:

1 Like

Can you please help me with my inquiry?
Thank you

Sorry i really can’t help with the:

I have RP server and I was wondering how player can gain XP every 10 min for example and when selling items from ESX JOBS

part you’re asking.

I will explain why:
First of I don’t have an FiveM server at all anymore (i didn’t even backup-ed my own SQL files or main server scripts), so i’m not able to test and confirm anything.

But more importantly, you’re using ESX, which is a framework which i have never used, nor will I ever use it. This is NOT a ‘grudge’ or so against the ESX framework, but because I have made my own Framework back then, to make a true custom server.

The basic thing you need to setup to get the XP working is that it’s being saved to the database,
and then reloaded when the player re-joins the server later. After that you will either need to make an plugin which ‘hooks onto’ the (ESX) Jobs and rewards XP. Or you might even need to edit the ESX Jobs themselves so you can include XP distribution into them.

I do not know if those jobs have ‘mission completed triggers’ you can use, or that there are external calls for it to use (without needing to alter the original ESX files etc). If it’s a decent framework (and i REALLY don’t know if that’s the case, this is NOT as insult for ESX), it should have proper documentation (or atleast comments in the source code) on how to use certain functions or how to add them.

So for that matter i would recommend you to just look at the documentation of your framework and start experimenting with that :slight_smile:

WARNING THOUGH:
IF you decide to edit/alter mainfiles from your framework, you might need to ‘re-edit’ then everytime when you update the framework with security patches etc. So make sure to check the documentation first to see if and how you can hook extra functions/calls to the existing routines without altering the main code/framework.

Dear @VenomXNL

Thank you very much for your words.
I really appreciate the help, and will try what you said.

:heart::heart:

1 Like

I’m getting a script error;
SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:924: No such export Exp_XNL_AddPlayerXP in resource XNLRankBar

EDIT - Turns out that trying to figure out something at 7 am after no sleep isnt great =( I had added it to the server script instead of the client script. Silly me, this is here incase anyone makes the same silly mistake.

1 Like

how can i put this in the licence shop, i want to the players need level 10 to buy the licence weapons please somebody help me !!

Short answer: You can’t :wink:

This script has nothing to do with ‘regulating access’ to objects, weapons, vehicles, missions etc etc etc.

“All” this script does is (re-)implement the normal GTA V/GTA Online rankbar and it’s animations.
so people can use it on their server instead of making ‘basic text overlays’. This was part of a server I was working on which re-introduced LOTS of functions, animations and UI elements which where ‘missing’ (or non working) in FiveM.

So this has literally nothing todo with saving levels, getting or assigning XP etc etc, that all needs to either be present on your server or you’ll need to make it yourself custom for your server (of which i HIGHLY recommend the latter due to the experiance level you’ll gain and the fact that your server will be much more unique compared to many of the ‘copy-paste-AnyFrameWorkNameHere’ servers :slight_smile:

1 Like

Thanks for your update of your own late night mistake (which i’m all to much familiar with myself haha), and for making it a ‘public tip’ for others whom might run into the same issue someday :slight_smile:

1 Like

but i was playing in a server with the same rank bar script and if you want guns you need to buy the licence with level 10

Well than they are probably using my interface script (which is awesome of course), or they made their own variant (either inspired on mine or not), and they made their own implementation to lock weapons to do certain levels.

However locking levels and showing the levels/XP on screen litterally has nothing to do with each other, the only thing both ‘functions’ had in common is that they work with/read the XP levels, that’s it :slight_smile:

How do i know (in regards to: “with the same rank bar script”) : Well because I’m literally THE developer/programmer of this rankbar script :wink: So i’m 10.0000% certain that this (MY) script doesn’t do any handling like that at all :wink:

My server back in the days i still made FiveM scripts ALSO had lots of ‘rank limited’ options (like certain jobs, vehicles, weapons, houses etc), but that was in no way part of the Rankbar script.

That was completely integrated into my own Framework system.

So depending on what framework you’re using (assuming you are considering the type of question you’ve asked), you could look and ask around a bit to see if other people have some ‘level locking scripts’ for your framework (ESX or VRp for example) :slight_smile:

Hope this explained it a bit more elaborately for you :slight_smile:

im new and i love this script, how to make it working? do i replace this code in config.lua or where?

How do you get the value from the database when a player joins?

For example, a player has played for one hour and has 1000 xp in the column of the database.
He disconects
When he connects how to set the previous 1000 xp to XNL_CurrentPlayerXP

Did you find how to set the initial to the value it has previously on the database?

Using this on ESX my server, thanks for the good resource. With the well written blocks it was easy to make it save to a database and reload when a player joins.

-cheers

2 Likes

Thanks :slight_smile: nice to read a feedback like this from time to time :slight_smile:
Mostly it’s that people ask “why” it’s not saving to the dB, so definitely a
positive response when I read that the comment blocks have proven to be useful :slight_smile:

1 Like

been using this since march as server loyalty XP everyone loves it! good work man

1 Like

Thanks! Much appreciated :smiley: glad it’s a useful addition to your server :slight_smile:

1 Like

hi , im trying to give every kill xp to the killer and cant figure it out , im using the esx verison of this xp system… any help asap

Oh what a beautiful BEAUTIFUL person! Love your script! I have to work on a level and quest design before to use it now! Thank you for that! Good work

1 Like

Great Script

1 Like