Raised This Month: $12 Target: $400
 3% 

Showing results 1 to 25 of 420
Search took 0.01 seconds.
Search: Posts Made By: MAGNAT2645
Forum: Scripting 02-23-2024, 06:39
Replies: 1
Views: 336
Posted By MAGNAT2645
Re: Pass an array to a function

public Action Test(client, args)
{
ArrayList MyArray = new ArrayList(ByteCountToCells(PLATFORM_MAX_PATH));
MyFunc(MyArray, "sound/hit/", "kevlar");
// Do something with MyArray and...
Forum: Plugins 11-10-2023, 14:50
Replies: 32
Views: 5,798
Posted By MAGNAT2645
Re: [TF2|API] Training Messsages

Doesn't work for me. I hear message sound but no message is displayed.
Tried within my plugins and with sm_rsay command.
Forum: Extensions 10-09-2023, 01:49
Replies: 20
Views: 15,113
Posted By MAGNAT2645
Re: [ANY?/TF2] SourceTools - NPC Framework & SDK Tools

Yeah, sure (https://github.com/TF2-DMB/CBaseNPC/issues/47).
Forum: Extensions 09-26-2023, 13:57
Replies: 20
Views: 15,113
Posted By MAGNAT2645
Re: [ANY?/TF2] SourceTools - NPC Framework & SDK Tools

Cool extension but it crashes my Linux server when i run "quit" command to stop the server. There are no any errors or dumps. Accelerator doesn't seem to notice this kind of crash because it happens...
Forum: Scripting 04-18-2022, 08:27
Replies: 2
Views: 570
Posted By MAGNAT2645
Re: Where to get information about pawn VM opcodes?

There's a reference guide (https://hlmod.ru/threads/spravochnik-bajt-kod-sourcepawn.44301/) (Russian) about opcodes, but it might be a little outdated. More advanced tutorials about SourcePawn and...
Forum: Scripting 03-10-2022, 12:34
Replies: 4
Views: 698
Posted By MAGNAT2645
Re: Generate file depend date

That's because you're doing it only in OnPluginStart which is called only once after server start or when you (re)load the plugin manually.
You should rebuild the path at least in OnMapStart which...
Forum: Scripting 03-10-2022, 11:06
Replies: 4
Views: 698
Posted By MAGNAT2645
Re: Generate file depend date

Post the full code because i don't see how you create files.

EDIT 1: Here are some examples how to write logs (if that's what you want)


// Using LogToFile/LogToFileEx
//...
Forum: Scripting 02-17-2022, 11:58
Replies: 5
Views: 825
Posted By MAGNAT2645
Re: About ThrowNativeError

Okay then, thanks.
Forum: Scripting 02-17-2022, 08:03
Replies: 5
Views: 825
Posted By MAGNAT2645
Re: About ThrowNativeError

I thought so. But anyway thanks for the answers.
But i'm still not sure about using ThrowNativeError inside non-native functions which are called by natives.
Like this:

stock void...
Forum: Scripting 02-13-2022, 11:55
Replies: 5
Views: 825
Posted By MAGNAT2645
About ThrowNativeError

Is it fine to ThrowNativeError in a function which is called by a native?
Like here...
Forum: Scripting 01-30-2022, 05:26
Replies: 3
Views: 742
Posted By MAGNAT2645
Re: What's wrong with my client loop?

When you use any function from includes, check error notes if there are any.
For example, GetClientTeam (https://sourcemod.dev/#/clients/function.GetClientTeam):


It helps you understand what...
Forum: Scripting 01-24-2022, 10:39
Replies: 1
Views: 718
Posted By MAGNAT2645
Re: Polymorphism Function

SourcePawn is not like C++ (the only similarity is probably syntax) and other OOLs.
There can be only one function L4D2_SpawnInfected with only one prototype.

You can define typesets (a set of...
Forum: Scripting 12-02-2021, 09:32
Replies: 3
Views: 876
Posted By MAGNAT2645
Re: Make weapon_ entity untouchable

I am pretty sure you can use SetEntityMoveType right after DispatchSpawn. Or with RequestFrame instead of a timer.
Forum: Plugins 11-16-2021, 17:42
Replies: 24
Views: 25,196
Posted By MAGNAT2645
Re: [TF2] Slender Fortress Modified (v1.7.0, 11/10/21)

You should compile it on SM 1.10+, not the 1.11.
Forum: Extensions 11-09-2021, 05:09
Replies: 99
Views: 113,800
Posted By MAGNAT2645
Re: [EXTENSION] Sound Info Library v1.0.1

Thanks, but i meant native functions in the methodmap.
For example:

property float LengthFloat
{
public native get();
}

property int Year
{
Forum: Extensions 11-05-2021, 13:49
Replies: 99
Views: 113,800
Posted By MAGNAT2645
Re: [EXTENSION] Sound Info Library v1.0.1

Hi. Can you please also implement methodmap natives (in the extension) from this?

methodmap SoundFile < Handle {
/**
* Opens a sound file.
*
* @note Sound files are closed with...
Forum: Scripting 10-05-2021, 09:58
Replies: 3
Views: 1,112
Posted By MAGNAT2645
Re: FrontLine plugin

Just add a check before GetEntityClassname (line 437)
Like this:

new iWeaponEnt = GetEntPropEnt(attacker, Prop_Send, "m_hActiveWeapon");
if (iWeaponEnt != -1 &&...
Forum: Scripting 08-26-2021, 16:42
Replies: 1
Views: 805
Posted By MAGNAT2645
Re: map music mod

In the AmbientSHook you can check if the sample is the beacon sound and such, and then return Plugin_Continue;


public Action:AmbientSHook(String:sample[PLATFORM_MAX_PATH], &entity,...
Forum: Snippets and Tutorials 08-20-2021, 19:00
Replies: 83
Views: 134,699
Posted By MAGNAT2645
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

As i said, it's not that useful. You can use it in a macro to join text (and put it without quotes).

#define ERROR(%0) PrintToServer( "ERROR: " ... #%0 )

int a = 5;
int b = 0;
int c;
if ( b...
Forum: Snippets and Tutorials 08-19-2021, 14:17
Replies: 83
Views: 134,699
Posted By MAGNAT2645
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

You can also mention the "stringize" operator (inherited from Pawn) which converts arguments to packed strings in a macro.
I don't find it that useful but still here's an example:

// Note that...
Forum: Scripting 07-16-2021, 05:13
Replies: 3
Views: 1,568
Posted By MAGNAT2645
Re: How do I prevent rockets from exploding when they collide with each other?

AFAIK in this case projectile will also go through VPhysics entities (not only other projectiles).
Forum: Scripting 07-16-2021, 05:04
Replies: 2
Views: 792
Posted By MAGNAT2645
Re: what happens if we forget closehandle

SourceMod can also detect possible memory leaks and will unload plugins with too many handles.
Memory leaks will be logged to sourcemod_fatal.log (in root folder of your game) and to...
Forum: Scripting 07-15-2021, 09:29
Replies: 3
Views: 1,568
Posted By MAGNAT2645
Re: How do I prevent rockets from exploding when they collide with each other?

Have you tried CollisionHook (https://forums.alliedmods.net/showthread.php?t=197815)'s CH_ShouldCollide?
Forum: Plugins 07-11-2021, 18:41
Replies: 25
Views: 7,058
Posted By MAGNAT2645
Re: [ANY] Plugin Updates Checker (1.0) [11-Jul-2021]

You can use Discord/Slack API (https://forums.alliedmods.net/showthread.php?t=292663) as optional plugin (there are some examples like modules) and create a key for discord.cfg:

"sm_updates" //...
Forum: Scripting 07-08-2021, 14:01
Replies: 3
Views: 1,807
Posted By MAGNAT2645
Re: Can an author help me ?

Try to replace

if (GetUserFlagBits(client) == ADMFLAG_CUSTOM3) {

with

if ((GetUserFlagBits(client) & ADMFLAG_CUSTOM3) == ADMFLAG_CUSTOM3) {
Showing results 1 to 25 of 420

 
Forum Jump

All times are GMT -4. The time now is 20:44.


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