Raised This Month: $18 Target: $400
 4% 

Showing results 1 to 25 of 500
Search took 0.04 seconds.
Search: Posts Made By: Bugsy
Forum: Scripting Help Today, 10:07
Replies: 5
Views: 173
Posted By Bugsy
Re: Event when user gets a new weapon

Another way you can try is the WeapPickup event
Forum: Scripting Help 12-06-2022, 13:50
Replies: 5
Views: 173
Posted By Bugsy
Re: Event when user gets a new weapon

Add fakemeta

new iWeaponBits = pev( id , pev_weapons );
Forum: Scripting Help 12-04-2022, 01:44
Replies: 5
Views: 173
Posted By Bugsy
Re: Event when user gets a new weapon

You can try Ham_AddPlayerItem. This thread has some examples: https://forums.alliedmods.net/showthread.php?t=85632

To get all of his weapons, you can use pev( id , pev_weapons ), which will give...
Forum: Scripting Help 11-21-2022, 11:12
Replies: 2
Views: 125
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: 484
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: 248
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: 272
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,238
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: 359
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: 902
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: 902
Posted By Bugsy
Re: please add nvault

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

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

I made a revision, try again
Forum: Suggestions / Requests 08-03-2022, 23:31
Replies: 10
Views: 902
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: 429
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: 355
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: 902
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: 576
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: 576
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: 433
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: 576
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: 576
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,187
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,187
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.
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 18:38.


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