How to save in nvault?
Hi guys,
I try to edit my plugin in which VIP has an option of selecting one of 4 models per team, I just try to make it save the option, so with every map change he doesn't have to type /modele again. I tried it myself but it just doesn't save the option, any suggestions? Code:
#include <amxmodx> |
Re: How to save in nvault?
Just by saving everything doesn't mean you will still get the model...
Check your saved arrays/variables/booleans and set a model according to their values on player spawn. https://forums.alliedmods.net/showthread.php?t=91503 |
Re: How to save in nvault?
Sorry I'm stupid, which function exactly should I use?
|
Re: How to save in nvault?
Code:
register_clcmd("say /modele |
Re: How to save in nvault?
Im Polish, sorry ;) .
I like you guys! Can I get help anyway? |
Re: How to save in nvault?
this thread help you ? https://forums.alliedmods.net/showthread.php?t=290692
|
Re: How to save in nvault?
Quote:
What you gotta do: 1) Create a boolean which holds true or false according to if the player has the model saved or not. You should set to true if the player has the model saved. 2) On player disconnect, you should save the data of the boolean. (Variable which holds 0/1 would work too) 3) On player connect, load that same boolean (Craxor explained pretty well on how to do it) 4) On player spawn POST, you should set this model. (Remember that this should only be done once, you can do this by creating another boolean which holds true or false according to if the player already spawned his first time or not. |
Re: How to save in nvault?
I explained how to use nvault, anyway Key and Data are Strings as default, when you save multiple numbers in data you need to parse() them and after to convert from str to num so it's more easy to save models.
Napoleon, all you ideas are dismised, just save a fucking model directly and load on spawn post ( i believe? ) without any kind of boolean. ( If he wants private models for each players to be saved ). |
Re: How to save in nvault?
Quote:
|
Re: How to save in nvault?
Quote:
About the condition , is_user_alive, hihih, not always a condition is needed, depdends of the situations ... here it's better to use nvault_lookup() to check for the model, this can repleace the booleans. Something like that should be formated your publics: PHP Code:
|
All times are GMT -4. The time now is 06:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.