Raised This Month: $209 Target: $400
 52% 

Showing results 1 to 25 of 500
Search took 0.05 seconds.
Search: Posts Made By: Bugsy
Forum: Code Snippets/Tutorials 07-22-2021, 23:17
Replies: 22
Views: 16,953
Posted By Bugsy
Re: [TUT] Introduction to sockets

The native sockets are blocking sockets which isn't ideal for a game server. What you linked are non-blocking/asynchronous, which are better for gameplay,
Forum: Scripting Help 07-22-2021, 16:43
Replies: 9
Views: 179
Posted By Bugsy
Re: Invalid array handler

Did you try making 1 the minimum valid array handle, instead of 0?
Forum: Scripting Help 07-17-2021, 12:11
Replies: 12
Views: 780
Posted By Bugsy
Re: Store Attacker damage in dinamic array for every victim

It loops through all players with i, and for each player it loops through all players again with p, skipping when i = p, since a player cannot hurt himself. My example only shows damage issued, but...
Forum: Scripting Help 07-16-2021, 10:35
Replies: 12
Views: 780
Posted By Bugsy
Re: Store Attacker damage in dinamic array for every victim

Is this what you're trying to do?


#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

new const Version[] = "0.1";

#define MAX_PLAYERS 32
Forum: Scripting Help 07-15-2021, 22:31
Replies: 12
Views: 780
Posted By Bugsy
Re: Store Attacker damage in dinamic array for every victim

Again, I think the 3d array solution is fine. Why do you want the data stored in the array and then to find said data based on the player name that you search.

Please explain what you are trying...
Forum: Scripting Help 07-14-2021, 09:58
Replies: 6
Solved title
Views: 677
Posted By Bugsy
Re: title

They both work the same way, the value just goes in the opposite direction.
Forum: Scripting Help 07-14-2021, 07:45
Replies: 12
Views: 780
Posted By Bugsy
Re: Store Attacker damage in dinamic array for every victim

I don't understand why the 3d array approach wouldn't work. You would always pass the victim, attacker, and damage amount, so you will have all data. Please better explain where your hiccup is so we...
Forum: Scripting Help 07-13-2021, 20:37
Replies: 6
Solved title
Views: 677
Posted By Bugsy
Re: title

p = 5
test = p--

//test = 5

p = 5
test = --p

//test = 4
Forum: Scripting Help 07-12-2021, 18:11
Replies: 4
Views: 323
Posted By Bugsy
Re: Multiple Results in Query

UNION will work, but why not just set the query conditionally?

if ( some condition is true )
SELECT A, B, C
else
SELECT D, E, F


"Of course I can put the select in the procedure and...
Forum: General 07-11-2021, 01:52
Replies: 2
Views: 450
Posted By Bugsy
Forum: Suggestions / Requests 07-07-2021, 20:58
Replies: 1
Views: 169
Posted By Bugsy
Re: Nvault to Sql

Scripting help is to get help Scripting, not to ask someone to do the work for you. Moved to Suggestions/Requests.
Forum: Suggestions / Requests 07-07-2021, 07:54
Replies: 4
Views: 467
Posted By Bugsy
Re: Remove NVG Sound?

Try this? https://forums.alliedmods.net/showthread.php?t=45461
Forum: Scripting Help 07-05-2021, 10:40
Replies: 7
Views: 424
Posted By Bugsy
Re: Save, read and compare user IP in fvault

You do not need to store both the name and IP in the vault data since the name is stored as the key, so you'll always have it. Try this:

An assumption is 1 ip per player name


#include...
Forum: Scripting Help 07-04-2021, 10:07
Replies: 7
Views: 424
Posted By Bugsy
Re: Save, read and compare user IP in fvault

There are a few things that need fixing in your code, below is part of your problem. I recommend you instead use nvault with nvault array, it will be easier to store multiple pieces of data for a...
Forum: Scripting Help 07-03-2021, 16:05
Replies: 9
Views: 481
Posted By Bugsy
Re: i need help when i work with function for this happens

In some cases you can post only the line causing an issue/error, but in this case it is the surrounding code that is the issue. Post either the entire function or entire plugin.
Forum: Scripting Help 06-29-2021, 22:32
Replies: 14
Views: 626
Posted By Bugsy
Re: gather data from game server

Cool, no problem.

With your above code

copy(buf, charsmax(buf), "RESPONSE")
Sock_SendTo(addr, port, buf, strlen(buf), error)
You should send strlen( buf ) + 1 to include the...
Forum: Scripting Help 06-29-2021, 22:02
Replies: 14
Views: 626
Posted By Bugsy
Re: gather data from game server

I'm not sure, it's odd that other natives are defined but SendTo is not.
Forum: Scripting Help 06-26-2021, 20:19
Replies: 5
Views: 350
Posted By Bugsy
Re: Suicide Event

Any time, sport.
Forum: Scripting Help 06-26-2021, 10:24
Replies: 5
Views: 350
Posted By Bugsy
Re: Suicide Event

#include <amxmodx>

public plugin_init()
{
register_event( "DeathMsg" , "Event_DeathMsg" , "a" );
}

public Event_DeathMsg()
{
new iAttacker = read_data( 1 );
Forum: Plugin/Gameplay Ideas and Requests 06-26-2021, 00:08
Replies: 6
Views: 419
Posted By Bugsy
Forum: Plugin/Gameplay Ideas and Requests 06-25-2021, 23:53
Replies: 6
Views: 419
Posted By Bugsy
Forum: Scripting Help 06-25-2021, 23:13
Replies: 14
Views: 626
Posted By Bugsy
Re: gather data from game server

Try sockets2, I am pretty sure I made the sockets non-blocking



#include <amxmodx>
#include <sockets2>

new g_Socket;

public plugin_init()
Forum: Scripting Help 06-25-2021, 15:12
Replies: 5
Views: 350
Posted By Bugsy
Re: Suicide Event

For fall suicide, attacker = 0, IIRC
Forum: Scripting Help 06-24-2021, 12:39
Replies: 14
Views: 626
Posted By Bugsy
Re: gather data from game server

https://forums.alliedmods.net/showpost.php?p=525368&postcount=15
Forum: Scripting Help 06-24-2021, 12:19
Replies: 14
Views: 626
Posted By Bugsy
Re: gather data from game server

Try this module (https://forums.alliedmods.net/showthread.php?t=60026), using socket_unblock() to eliminate the lag
Showing results 1 to 25 of 500

 
Forum Jump

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


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