Rules
FAQ
Members List
Search
Register
Login
Raised This Month: $32
Target: $400
8%
Search Forums
Show Threads
Show Posts
Advanced Search
Go to Page...
Page 1 of 2
1
2
>
Showing results 1 to 25 of 43
Search took
0.01
seconds.
Search:
Posts Made By:
Bugsy
Forum:
Code Snippets/Tutorials
05-20-2022, 22:32
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
This thread is not really for help with fixing plugins. Please post your question in Scripting Help or Suggestions/Requests if you want someone to do it for you.
If you have a question specific to...
Forum:
Code Snippets/Tutorials
05-01-2022, 20:34
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
May be unrelated to your current issue but may cause other unexpected behavior.
In a few areas you are assuming a record will be found and that you'll have an iTS value to check. If a record is...
Forum:
Code Snippets/Tutorials
05-01-2022, 19:01
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
The logic I gave you will work, but the way you designed your plugin may need some adjustment to allow it to work.
Forum:
Code Snippets/Tutorials
05-01-2022, 11:55
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
If the item is remaining the same, there's no need to call formatex()/nvault_set(), since all you need to do is update the timestamp on an existing record.
public MoreTime( id ) // Buy Time for...
Forum:
Code Snippets/Tutorials
04-30-2022, 23:57
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
Ok, then do not call nvault_prune(), just check if the timestamp is expired how you did above.
if iTS >= get_systime() - Item still valid/not expired
if iTS < get_systime() - Item expired
Forum:
Code Snippets/Tutorials
04-30-2022, 23:38
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
If the intent is to show the menu only if the vault record exists, you'd do:
@SkinsMenu( id )
{
new szData[ 64 ], szID[ 3 ], szVal[ 12 ], iTS, iMenu;
if ( nvault_lookup( g_iVault,...
Forum:
Code Snippets/Tutorials
04-30-2022, 22:34
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
//plugin_cfg - Clear out everything that is in the vault up until current time
//This will eliminate all records that have expired
nvault_prune( vault , 0 , get_systime() );
//give playe...
Forum:
Code Snippets/Tutorials
04-30-2022, 22:21
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
Set the timestamp of the item to a future date when you want it to expire using nvault_touch(). On plugin_cfg(), call nvault_prune( vault , 0 , get_systime() ). When a player attempts to use an item,...
Forum:
Code Snippets/Tutorials
09-09-2020, 19:13
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
1. The player cannot execute the command if he is not connected, remove the is_user_connected() check.
2. Ensure this player has teh flags..or remove the if(access()) check.
3. Why are you...
Forum:
Code Snippets/Tutorials
09-08-2020, 22:06
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
Your savedata and loaddata look good, though you can just do: iMoney[id] = nvault_get(iVault, szAuth )
Forum:
Code Snippets/Tutorials
09-08-2020, 21:40
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
What do you mean "it didnt get reset"? I think you need to learn more of the basic stuff before jumping in to this if you are having problems.
Based on this code I can tell you are not...
Forum:
Code Snippets/Tutorials
09-08-2020, 21:11
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
This is probably the simplest nvault transaction, I'm not sure what you do not understand. This is as simple as I can get it.
#include <amxmodx>
#include <nvault>
#define MAX_PLAYERS 32
...
Forum:
Code Snippets/Tutorials
09-08-2020, 20:20
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
Think about it logically.
1. Read this tutorial again
2. Read how nvault_remove() works, specifically what you pass to it.
http://www.amxmodx.org/api/nvault/nvault_remove
public...
Forum:
Code Snippets/Tutorials
09-08-2020, 19:23
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
It looks like you are trying to remove a record by it's value, which, based on the variable name, will likely not be unique. You should store data using steam id as key and then pass that to...
Forum:
Code Snippets/Tutorials
09-24-2016, 14:04
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
I agree with all that. The only argument I make is when we are talking AMX-X plugins, the steam-id should be stored in a string. Whether you include STEAM_0:0: is up to you, but there will be...
Forum:
Code Snippets/Tutorials
09-24-2016, 12:31
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
That's the point I was getting at. I agree that from a database/table design perspective the integer wins. From a plugin perspective, it doesn't matter whether it's stored as a string or integer...
Forum:
Code Snippets/Tutorials
09-24-2016, 12:03
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
How would you pass an integer into the query? Wouldn't the steam id always go into a SQL query string? I agree with you in the table design setting the steamid as in integer, 4 bytes would always be...
Forum:
Code Snippets/Tutorials
09-24-2016, 11:42
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
Yes, but from a plugin perspective you would still be better off storing the steam id as string, right?
I think the control needs to be registered properly but I'm not sure. I am on Windows 7...
Forum:
Code Snippets/Tutorials
09-24-2016, 10:45
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
With your code, Black Rose, it will appear to work correctly to users while in reality it is not.
It is storing the data in nVault with a single character as the key because it is using the...
Forum:
Code Snippets/Tutorials
09-23-2016, 14:18
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
The maximum number of players that is supported is 32, hence MAX_PLAYERS = 32 is used.
The + 1 is done strictly for sizing an array. Like I said, you could set it directly to 33 but it is not...
Forum:
Code Snippets/Tutorials
09-23-2016, 14:01
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
You can do that, but MAX_PLAYERS is 32 so its not technically proper to set it to 33 directly.
Forum:
Code Snippets/Tutorials
09-23-2016, 12:54
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
Its not complicated if the variable (global) has a different scope. Give me an example for how this would affect portability.
Forum:
Code Snippets/Tutorials
09-23-2016, 11:42
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
Because that is all it needs to be called. The value will never change during a user's connection to your server. Is it fun to call it more than once? I dont understand what point you're trying to...
Forum:
Code Snippets/Tutorials
09-22-2016, 20:52
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
@Black Rose -- I don't see the advantage of converting the steam id to an integer when using nvault. You would then need to convert it back to a string to use it as a key when saving and loading data...
Forum:
Code Snippets/Tutorials
02-12-2016, 20:01
Replies:
132
Sticky:
nVault Tutorial
Views:
163,385
Posted By
Bugsy
Re: nVault Tutorial
public SaveGravity( id )
{
new szKey[40] , szGravity[11] , szAuthID[35];
@@ get_user_authid( id, szAuthID, charsmax( szAuthID ) );
//You should store all player id's in a global array so it...
Showing results 1 to 25 of 43
Page 1 of 2
1
2
>
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
Server Discussion
Source Servers (SRCDS)
HL1 Servers (HLDS)
AMX Mod X
News
Bug Reports
General
Off-Topic
Plugins
Suggestions / Requests
Approved Plugins
New Plugin Submissions
Unapproved/Old Plugins
Translation Request
High-Traffic Plugins
GunGame
UAIO (Ultimate All-In-One Plugin)
xREDIRECT
CSDM
AMX Super
RuneMod
Zombie Plague Mod
SuperHero Mod
News
Tech Support
Scripting Help
Off-Topic / General Chat
Heroes
Suggestions / Requests
Approved Heroes
New Submissions
Unapproved/Old Heroes
Module Heroes
SuperHero Mod Stats - By 123
(OLD) Bug Reports
Scripting
Scripting Help
Code Snippets/Tutorials
Module Coding
Donor Access
SourceMod
News
General
Plugins
Plugins
Unapproved Plugins
Plugin/Gameplay Ideas and Requests
High-Traffic Plugins
SourceMod Anti-Cheat
Zombie:Reloaded
SourceBans / SourceBans++
VSH / Freak Fortress
Store
SM_Hosties
HLstatsX:CE
Scripting
Extensions
Snippets and Tutorials
Donor Access
Metamod: Source
Metamod:Source Plugins
Metamod:Source Questions
Coding MM:S Plugins & SM Extensions
Hosted Stuff
Asherkin's Plugins
TFDodgeball
TF2Items
SteamTools
Bail's Plugins
CSDM
CS:S DM
Off-Topic & Trash
Off-Topic
Trash
All times are GMT -4. The time now is
23:51
.
DMCA
-
Archive
-
Top
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode