Monthly Target: $400 Donations: $311
 77% 

Showing results 1 to 25 of 500
Search took 0.08 seconds.
Search: Posts Made By: Bugsy
Forum: Scripting Help Yesterday, 18:49
Replies: 9
Views: 208
Posted By Bugsy
Re: Edit a word inside a text file

Sorry that you don't understand it but try it and see, it does work. The only issue that I'm aware of at this point is:

When an szFind[] value gets cut-off between file reads around the buffer...
Forum: Scripting Help Yesterday, 16:24
Replies: 6
Views: 160
Posted By Bugsy
Re: Confused about using functions including "health"

My only suggestion would be to use a single thinking entity that regenerates all players via a loop. With your method, you are constantly re-creating tasks for each player and it is an expensive...
Forum: Scripting Help Yesterday, 10:49
Replies: 9
Views: 208
Posted By Bugsy
Re: Edit a word inside a text file

This will replace every instance of szFind with szReplaceWith in a file. Keep in mind that this reads the file in DATA_BUFFER_SIZE chunks and if szFind is located between chunks then it will not get...
Forum: Scripting Help 05-18-2015, 21:07
Replies: 8
Views: 189
Posted By Bugsy
Re: Question about nvault

I've only seen vaults become corrupt from not closing properly. This can happen if your server crashes or if you do not call nvault_close() before map-change/shutdown. I would try to resolve the...
Forum: Suggestions / Requests 05-12-2015, 13:24
Replies: 3
Views: 71
Posted By Bugsy
Re: Double Knife Frag [SEARCH]

#include <amxmodx>
#include <hamsandwich>

public plugin_init()
{
register_event( "DeathMsg" , "knife_death" , "a" , "4=knife" );
}

public knife_death()
{
Forum: Scripting Help 05-12-2015, 08:51
Replies: 21
Views: 363
Posted By Bugsy
Re: nVault or SQL?

Its no question that nvault is faster, better, and easier for basic transactions. But when you have a vault with tens of thousands+ entries and you need a top15, it's painful. You could calculate the...
Forum: Scripting Help 05-11-2015, 22:29
Replies: 13
Views: 167
Posted By Bugsy
Re: Mysql Problems, Reseting.

This tutorial is decent: https://forums.alliedmods.net/showthread.php?t=46779
Forum: Scripting Help 05-11-2015, 18:44
Replies: 13
Views: 167
Posted By Bugsy
Re: Mysql Problems, Reseting.

client_disconnect() is useful, I just try to avoid calling functions on players there. If it's data that is stored in variables then it's fine to do the actual save procedure at disconnect. In your...
Forum: Scripting Help 05-11-2015, 12:59
Replies: 21
Views: 363
Posted By Bugsy
Re: nVault or SQL?

Nvault can do everything that you said SQL can. The OP needs sorting which is why SQL was recommended. Did you read any other posts in this thread?
Forum: Plugin/Gameplay Ideas and Requests 05-10-2015, 13:56
Replies: 2
Views: 81
Posted By Bugsy
Forum: Scripting Help 05-10-2015, 13:54
Replies: 13
Views: 167
Posted By Bugsy
Re: Mysql Problems, Reseting.

You are calling Save_PlayerLevel() at client_disconnect() which could be your problem. Show us your Save_PlayerLevel() function.
Forum: Scripting Help 05-10-2015, 13:51
Replies: 21
Views: 363
Posted By Bugsy
Re: nVault or SQL?

Any time sorting is needed I would lean towards SQL. Its inefficient to do with nvault, and it gets worse the bigger your vault gets. SQL is built for it.
Forum: Code Snippets/Tutorials 05-09-2015, 18:08
Replies: 58
Sticky: nVault Tutorial
Views: 27,737
Posted By Bugsy
Re: nVault Tutorial

Added nvault_remove() which I somehow forgot and added return values for each function.
Forum: Scripting Help 05-09-2015, 11:12
Replies: 5
Views: 127
Posted By Bugsy
Re: [help] data and key on nVault

nvault_lookup() should be used and will always give an accurate result; it will return 0 if no record exists or 1 if a record was found.

iExists = nvault_lookup( iVault , "bugsy" , szVal ,...
Forum: Suggestions / Requests 05-08-2015, 22:51
Replies: 6
Views: 131
Posted By Bugsy
Re: Nick Words

Supports up to 5 names out of the box. I added comments if you want to increase this. Set min word limit via cvar.



#include <amxmodx>

new const Version[] = "0.1";

new g_pMinWords;
Forum: Scripting Help 05-08-2015, 22:32
Replies: 23
Views: 1,150
Posted By Bugsy
Re: Hours is not saved

OP please chime in to let me know your exact requirements.

As far as I understand, you would like an admin to be able to have up to X warnings in a month, if they exceed X within 1 month then they...
Forum: Scripting Help 05-08-2015, 11:51
Replies: 24
Views: 322
Posted By Bugsy
Re: NVault_Prune Certain Hour

This one is better and precise, at the exact moment 24 hours passes he will be able to use the command again.
Forum: Scripting Help 05-08-2015, 10:31
Replies: 24
Views: 322
Posted By Bugsy
Re: NVault_Prune Certain Hour

Give this a try. The prune that is used here is just for cleanup and it does not impact the decision as to whether or not the player can use the command. It will prevent your vault file from getting...
Forum: Scripting Help 05-08-2015, 09:25
Replies: 24
Views: 322
Posted By Bugsy
Re: NVault_Prune Certain Hour

You could just check the timestamp of the existing nvault entry to see if a day has passed. If you go this route, you can ditch the entire pruning method.
Forum: Scripting Help 05-08-2015, 08:06
Replies: 24
Views: 322
Posted By Bugsy
Re: NVault_Prune Certain Hour

But then you say you need to clear the data from nvault before map change for the players to not encounter issues.. What issues are there?
Forum: Scripting Help 05-08-2015, 08:00
Replies: 24
Views: 322
Posted By Bugsy
Re: NVault_Prune Certain Hour

What is it not doing that you need it to do?
Forum: Scripting Help 05-07-2015, 17:29
Replies: 3
Views: 85
Posted By Bugsy
Re: [HELP] where is the error?

You need to explain your issue. You can't expect someone to compile and run your plugin and try to figure out what you don't like about it.
Forum: Scripting Help 05-07-2015, 08:57
Replies: 26
Views: 580
Posted By Bugsy
Re: Remove Characters

My code was written with the assumption that the player connects with a 'clean' name. If that's not the case, it obviously will not work like you want it to.
Forum: Scripting Help 05-06-2015, 12:21
Replies: 24
Views: 322
Posted By Bugsy
Re: NVault_Prune Certain Hour

Does the freemode command write to vault or touch the record? If so then the timestamp will be updated and the entry will not get pruned.
Forum: Scripting Help 05-06-2015, 11:45
Replies: 23
Views: 1,150
Posted By Bugsy
Re: Hours is not saved

Ok, I understand now, basically each warn needs a timestamp and logic to prune the warns if they are older than 30 days.
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 07:09.


Powered by vBulletin®
Copyright ©2000 - 2015, vBulletin Solutions, Inc.
Theme made by Freecode