Raised This Month: $204 Target: $400
 51% 

Showing results 1 to 25 of 500
Search took 0.68 seconds.
Search: Posts Made By: Bugsy
Forum: Suggestions / Requests 02-15-2020, 15:03
Replies: 18
Views: 573
Posted By Bugsy
Re: Reserve slot for disconnected player

Ok.. try this version. It will not work properly with bots since they all share the same authid.


#include <amxmodx>

#define MAX_PLAYERS 32

const SLOT_COUNT = 5;
const SLOT_NOT_FOUND = -1;
Forum: Suggestions / Requests 02-14-2020, 20:11
Replies: 18
Views: 573
Posted By Bugsy
Re: Reserve slot for disconnected player

Take make sure I understand correctly, assume the below:

Max players = 32
Players on the server = 6 (including me)

If I disconnect, you want it to not allow anyone else to connect except me,...
Forum: Suggestions / Requests 02-14-2020, 18:26
Replies: 18
Views: 573
Posted By Bugsy
Re: Reserve slot for disconnected player

It's only going to prevent others from connecting if current player count + actively reserved slots >= max players. Isn't this what you'd want?
Forum: Scripting Help 02-14-2020, 08:48
Replies: 14
Views: 213
Posted By Bugsy
Re: For help

For plugins this large please save as a .sma file and attach it to the thread. Or at a minimum, use php tags around the code.
Forum: Suggestions / Requests 02-13-2020, 18:53
Replies: 18
Views: 573
Posted By Bugsy
Re: Reserve slot for disconnected player

You have to provide some details. I was getting weird behavior testing with bots since I think they reconnect sooner than the slot is created for a disconnecting player. Let me know what happens so I...
Forum: Suggestions / Requests 02-13-2020, 00:27
Replies: 18
Views: 573
Posted By Bugsy
Re: Reserve slot for disconnected player

Added this condition to client_authorized.


else if ( iSlotID != -1 )
{
g_siSlots[ iSlotID ][ AuthID ][ 0 ] = EOS;
g_siSlots[ iSlotID ][ DisconnectTime ] = 0;
...
Forum: Suggestions / Requests 02-12-2020, 23:52
Replies: 18
Views: 573
Posted By Bugsy
Re: Reserve slot for disconnected player

All of those bullets are making my head hurt. I give you props for putting that much thought into it.

But the fact that the slots will be freed every time a player connects and disconnects, you...
Forum: Suggestions / Requests 02-12-2020, 23:09
Replies: 18
Views: 573
Posted By Bugsy
Re: Reserve slot for disconnected player

It will clear his slot since his slot id will return a non -1 value on connect and subsequently clear it. Also, all slots are pruned on every player connect and disconnect so it should not ever...
Forum: Suggestions / Requests 02-12-2020, 21:05
Replies: 18
Views: 573
Posted By Bugsy
Re: Reserve slot for disconnected player

Not tested, and reserved slots are lost at map change. Set SLOT_COUNT as needed.


#include <amxmodx>

#define MAX_PLAYERS 32

const SLOT_COUNT = 5;

enum SlotInfo
Forum: Scripting Help 02-12-2020, 10:48
Replies: 10
Views: 181
Posted By Bugsy
Re: prefix

What question do you have for doing this? Or is this a request for someone to do it for you?
Forum: Scripting Help 02-11-2020, 21:22
Replies: 10
Views: 181
Posted By Bugsy
Re: prefix

Why don't you send the chat line to ColorChat() with the prefix?
Forum: Scripting Help 02-10-2020, 20:23
Replies: 4
Views: 194
Posted By Bugsy
Re: get_array_byref?

Here's an example setting string and an array


#include <amxmodx>

public plugin_init()
{
register_plugin( "String/Array in Dynamic Natives" , "0.1" , "bugsy" );
}
Forum: Scripting Help 02-10-2020, 18:56
Replies: 4
Views: 194
Posted By Bugsy
Re: get_array_byref?

Can you show an example of what you're trying to accomplish?
Forum: Scripting Help 02-09-2020, 22:34
Replies: 8
Views: 386
Posted By Bugsy
Re: Remove hours

https://forums.alliedmods.net/showthread.php?t=320027
Forum: Scripting Help 02-08-2020, 17:19
Replies: 8
Views: 386
Posted By Bugsy
Re: Remove hours

You need to add a variable, or DATA_REMOVED in your enum, to store the players total reduction time, as I have in my code. Be sure to set this to 0 when needed as I have in my code

Then replace
...
Forum: Scripting Help 02-07-2020, 18:39
Replies: 11
Views: 292
Posted By Bugsy
Re: Plaflag board

My code above is fixed.
Forum: Scripting Help 02-07-2020, 12:34
Replies: 11
Views: 292
Posted By Bugsy
Re: Plaflag board

Not necessary to use a switch when you can pass team directly to the array as I did.
Forum: Scripting Help 02-07-2020, 11:13
Replies: 11
Views: 292
Posted By Bugsy
Re: Plaflag board

I didn't test compile since I'm on my phone. Do you get the same warning when compiling the revised code? If so I'll take a look later when I get home.
Forum: Scripting Help 02-07-2020, 07:45
Replies: 11
Views: 292
Posted By Bugsy
Re: Plaflag board

I fixed the above code
Forum: Scripting Help 02-06-2020, 19:16
Replies: 5
Views: 251
Posted By Bugsy
Re: Benefits of using a thinking entity?

Here's some threads on the topic. Seems like it doesn't really matter, difference comes in when you need it to repeat faster than 0.1 interval since set_task() is clamped at that. I've personally...
Forum: Scripting Help 02-05-2020, 15:49
Replies: 8
Views: 213
Posted By Bugsy
Re: Question about nVault Timestamps

If you're touching the data the timestamp should theoretically reflect that.
Forum: Scripting Help 02-05-2020, 15:09
Replies: 8
Views: 213
Posted By Bugsy
Re: Question about nVault Timestamps

So what you need to do is use nvault_lookup() which allows you to get the current timestamp. Then call set or pset, followed by a touch using the timestamp retrieved with lookup.
Forum: Scripting Help 02-05-2020, 14:46
Replies: 8
Views: 213
Posted By Bugsy
Re: Question about nVault Timestamps

The fact that the timestamp is 0 makes it a permanent record. There is no separate field in a vault record that would allow both a timestamp and permanent status. So you can make a set record...
Forum: Scripting Help 02-05-2020, 14:33
Replies: 8
Views: 213
Posted By Bugsy
Re: Question about nVault Timestamps

All pset does is set the timestamp to 0, so there is no timestamp on permanent records.
Forum: Scripting Help 02-05-2020, 08:47
Replies: 11
Views: 292
Posted By Bugsy
Re: Plaflag board

Untested

// Includes
#include < amxmodx >
#include < jctf >

enum Teams
{
TEAM_NONE = 0,
TEAM_RED,
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 22:03.


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