Raised This Month: $ Target: $400
 0% 

Showing results 1 to 25 of 500
Search took 0.06 seconds.
Search: Posts Made By: Bugsy
Forum: Scripting Help 11-21-2022, 11:12
Replies: 2
Views: 119
Posted By Bugsy
Re: Remove last character from string

You may also see EOS used in code, which is the same as using 0 and represents 'End Of String'. The goal is to set the desired array position as null, which signifies the end of null-terminated...
Forum: Scripting Help 09-15-2022, 23:12
Replies: 7
Views: 481
Posted By Bugsy
Re: set_task parameter confusion

If you want to pass a task ID and array of data


new arrData[ 3 ] = { 33 , 44 , 55 };
new iTaskID = 3434434;

set_task( 1.0 , "TaskFunc" , iTaskID , arrData , sizeof( arrData ) );

public...
Forum: Scripting Help 08-26-2022, 12:33
Replies: 13
Views: 606
Posted By Bugsy
Re: Case Option depend on Cvar !!!

I agree with Jim - here's an example using a cvar to control availability of a menu item.

https://forums.alliedmods.net/showpost.php?p=885282&postcount=8
Forum: Scripting Help 08-18-2022, 19:28
Replies: 5
Views: 244
Posted By Bugsy
Re: Quick Question

If you just need basic key:value saving, I'd go nvault.
Forum: Scripting Help 08-15-2022, 23:24
Replies: 2
Views: 271
Posted By Bugsy
Re: limit help

Create an array sized using MAX_PLAYERS + 1
Each time the menu is used by the player, increment it by one.
When you go to show the map, first check that they are below the count.
All variables are...
Forum: Scripting Help 08-10-2022, 19:37
Replies: 14
...
Views: 1,236
Posted By Bugsy
Re: ...

Cristian505, why would you delete your posts? One of the purposes of a forum is to leave information there so others who have similar questions can search and find it, potentially avoiding the...
Forum: Suggestions / Requests 08-08-2022, 22:36
Replies: 2
Views: 357
Posted By Bugsy
Re: Some one who knows a thing or two about sql,nault,sqlite

Or use a local database on your game server.
Forum: Suggestions / Requests 08-08-2022, 12:24
Replies: 10
Views: 901
Posted By Bugsy
Re: please add nvault

I'll need to add some logging to figure out why it's not working.
Forum: Suggestions / Requests 08-06-2022, 00:26
Replies: 10
Views: 901
Posted By Bugsy
Re: please add nvault

Try now, I fixed something.
Forum: Off-Topic 08-05-2022, 00:38
Replies: 1
...
Views: 568
Posted By Bugsy
Re: Hi

Ok bye
Forum: Suggestions / Requests 08-05-2022, 00:17
Replies: 10
Views: 901
Posted By Bugsy
Re: please add nvault

I made a revision, try again
Forum: Suggestions / Requests 08-03-2022, 23:31
Replies: 10
Views: 901
Posted By Bugsy
Re: please add nvault

Give this a try, I was not able to test.

Edit: Updated

#include <amxmodx>
#include <nvault>
#include <reapi>

#define MAX_CLIENTS 32
#define MAX_PLAYERS 32
Forum: Scripting Help 07-29-2022, 09:21
Replies: 2
Views: 426
Posted By Bugsy
Re: Dispenser

So regular players limit is controlled by cvar but you want VIP hard coded at 2?
Forum: Scripting Help 07-28-2022, 19:06
Replies: 1
Views: 353
Posted By Bugsy
Re: This or This

I always use the native version, unless I need to modify the functionality in any way.
Forum: Suggestions / Requests 07-28-2022, 00:31
Replies: 10
Views: 901
Posted By Bugsy
Re: please add nvault

Be specific with your request. What does "add nvault" mean?
Forum: Scripting Help 07-27-2022, 08:59
Replies: 9
Views: 575
Posted By Bugsy
Re: Save Entity Index with BitSum

This is why I asked for your use-case. It's not beneficial to use bit-wise operators/logic if you need to jump through hoops to accomplish it. There is likely a much simpler and economical way to do...
Forum: Scripting Help 07-26-2022, 20:52
Replies: 9
Views: 575
Posted By Bugsy
Re: Save Entity Index with BitSum

Ok, I'll try to give you a quick visual

Lets use a 3-cell array

Cell 1 - 4 bytes/32 bits - 32 bits total
A single cell is perfect for player booleans since player ID's range from 1 to 32.
[...
Forum: Scripting Help 07-26-2022, 20:34
Replies: 5
Views: 432
Posted By Bugsy
Re: Equivalent of SubString() in AMXX

Minor efficiency tweaks

new iChunkSize;
new msgMOTD = get_user_msgid("MOTD");

while( iLen > a )
{
iChunkSize = copy( chunk, a + MAX_MOTD_CHUNK > iLen ? iLen - a : MAX_MOTD_CHUNK,...
Forum: Scripting Help 07-26-2022, 20:28
Replies: 9
Views: 575
Posted By Bugsy
Re: Save Entity Index with BitSum

Take a look at the Manipulating bits outside of the bit-range of a memory cell section here https://forums.alliedmods.net/showthread.php?t=139916

I assume you are looking to store index's larger...
Forum: Scripting Help 07-26-2022, 19:43
Replies: 9
Views: 575
Posted By Bugsy
Re: Save Entity Index with BitSum

May be more work than it's worth, what are you trying to accomplish?
Forum: Scripting Help 07-26-2022, 18:25
Replies: 27
Views: 1,186
Posted By Bugsy
Re: Can I store information in player entity?

Engine is marginally faster but it would not make a difference in the majority of plugins. What if he coded his plugin in fakemeta and now is thinking he needs to redo things just because you said...
Forum: Scripting Help 07-26-2022, 17:14
Replies: 27
Views: 1,186
Posted By Bugsy
Re: Can I store information in player entity?

I'm speaking about the context/perspective of this thread/what the OP is doing.
Forum: Scripting Help 07-26-2022, 11:28
Replies: 27
Views: 1,186
Posted By Bugsy
Re: Can I store information in player entity?

I hear where he's coming from and usually push the same mindset, more efficient is always better. But we're talking about setting some attribute/value to an iuser field, which would take a large...
Forum: Scripting Help 07-26-2022, 08:34
Replies: 27
Views: 1,186
Posted By Bugsy
Re: Can I store information in player entity?

That's fair, but recommending someone switch set_pev() to entity_set_int() for something miniscule as this isn't helping much.

If they have something repeating 100x a frame, then it's a different...
Forum: Scripting Help 07-26-2022, 00:45
Replies: 27
Views: 1,186
Posted By Bugsy
Re: Can I store information in player entity?

We're talking peanuts here, and I'm am not an advocate of fakemeta or anything like that. Someone should not avoid using fakemeta due to it not being efficient.
Showing results 1 to 25 of 500

 
Forum Jump

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


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