Level XP System
-delete-
|
Re: Level XP System
You have no idea what you wrote there... i'm wondering how it works at all...
Cannot help you right now, but search a tutorial on task ids around the forums, it looks like you have no idea how to set a task and remove it |
Re: Level XP System
Quote:
|
Re: Level XP System
PHP Code:
|
Re: Level XP System
I copied it from another code. I'm still confused. Can you post the exact code because i'm confused from your comments, also you didn't use "vaultkey" anywhere.
|
Re: Level XP System
Idk if the saving/loading functions are correct, but you surely messed up when it comes to player ids and tasks...
|
Re: Level XP System
Quote:
|
Re: Level XP System
Quote:
Why people using prefixses or sufixes ? like LEVELMOD_%S for keys .. why ? Because that's how we save in old times when we was using the normal vault, vault.inc NOT nvault.inc, because Vault.inc don't create private files, all of the plugins wich use vault.inc save all the keys and data in vault.ini from vault. To do not mix them we using prefixes or specials symbols , Just thiink if they are five plugins wich all using keys as name, one saving models, one frags, one deaths. "Craxor" "1" "Craxor "Vip.mdl" "Craxor" "0" wich is imposibile, Nvault create separate files so you can use put directly the name as a key or steamid (better) because only one plugin wich use nvault will create a private file for that plugin wich use nvault. nvault_open( "VaultName" ); Ok ... now ? How Nvault Save ... You will use nvault natives to save inside of the vault file, the syntax is like that: "Key" , "Data" , "Timpestamp" Ignore timestamp and other stuffs if you're begginer, focus only on key / data. So, let me tell you logicaly: You're saving a KEY , and each key have own DATA, but the key is one wich you use to retrive the data. In your case the key is SteamID and data is Level and Xp, will save both of them as a single string and parse them into 2 args: PHP Code:
If you have any question for proper understand, ask. Edit: About your natives: Code:
You do not format them correct, when you register natives, they aren't like stocks, you neet to use othe natives to call each parameter, like that: Code:
|
Re: Level XP System
Thank You, there was some small typos in your nVault code but I fixed it, Also about the natives, I honestly knew that i needed to use get_param but somebody told me my method was ok so I skipped it. Edited my post.
|
Re: Level XP System
About natives - > Who told you that? Did you test it ?
Btw, in my code the only wrong thing is that i use format() insteand of formatex(). Anyway, my no#1 advice is to take 'each' native from nvault.inc and try to study each one in part to understand in a deep way how it works, take time, is not easy at the beginning. However, your code works now on testing? Edit: Also you should call SaveData(id) in client_disconnect and LoadData in client_authorized. nvault_open native and rest of stuff from plugin_cfg() you can safety use in plugin_init() even if is same you don't need to do that there, just for sake of my dear <3 . from levelsay: new name[33], change 33 to 32. and you have lloooot of things to change but i have no more time, sorry :D |
All times are GMT -4. The time now is 18:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.