Raised This Month: $128 Target: $400
 32% 

Showing results 1 to 25 of 338
Search took 0.01 seconds.
Search: Posts Made By: MAGNAT2645
Forum: Scripting Yesterday, 16:10
Replies: 2
Views: 125
Posted By MAGNAT2645
Re: MethodMaps

You can't have storage with methodmaps but you can use enum structs.

Example 1:

enum struct PlayerInfo {
char stringArray[5][256]; // 5 - number of strings (array size), 256 - max length...
Forum: Scripting 11-17-2020, 08:29
Replies: 4
Views: 501
Posted By MAGNAT2645
Re: Problems with GetClientName

You can just pass client index for %N:

for (int i = 1; i <= MaxClients; i++) {
if ( IsClientConnected( i ) )
PrintToChatAll( "Index: %i | Name: %N", i, i );
}
Forum: Scripting 11-15-2020, 06:47
Replies: 3
Views: 351
Posted By MAGNAT2645
Forum: Scripting 11-15-2020, 06:28
Replies: 3
Views: 351
Posted By MAGNAT2645
Re: List of all types available in sourcepawn?

SourcePawn basically has only one real type - cell (signed 32bit integer) but it's internal.
Compiler understands these types (every type is same 4-byte integer basically, even bool):
- int
- enum...
Forum: Scripting 11-13-2020, 07:40
Replies: 6
Views: 489
Posted By MAGNAT2645
Re: Invalid Timer Handle crash

If your timer is stored into global variable you should use this example

public void OnMapEnd() {
KillTimer( g_hTimer );
g_hTimer = null;
}

or just

public void OnMapEnd() {
Forum: Scripting 11-13-2020, 06:50
Replies: 2
Views: 306
Posted By MAGNAT2645
Re: GetClientWeapon Compile Errors

char weaponclass[32];
GetClientWeapon(client, weaponclass, sizeof(weaponclass));

You don't need to specify variable type if you're passing it as argument since function prototype already...
Forum: Scripting 11-10-2020, 17:00
Replies: 1
Views: 321
Posted By MAGNAT2645
Re: SourcePawn Menu API

1) Menu_Test1 is a command callback. args parameter contains number of arguments passed with command. For example

sm_mycommand arg1 arg2 "something3"

args = 3

2) and 3)
param1 and param2...
Forum: Scripting 11-02-2020, 19:28
Replies: 3
Views: 308
Posted By MAGNAT2645
Re: Data type

1) Yes, if function argument doesn't have a tag it will be treated as int.
2) There are some wrappers (https://github.com/alliedmodders/sourcemod/blob/master/plugins/include/float.inc#L308-L388) for...
Forum: Snippets and Tutorials 10-29-2020, 18:50
Replies: 3
Views: 2,532
Posted By MAGNAT2645
Re: [INC] Queue - FIFO

Queue is based on ArrayList so it's not surprising.
Forum: Scripting 10-28-2020, 08:29
Replies: 10
Views: 452
Posted By MAGNAT2645
Re: help with error 147: new-style declarations are required

Comment and #pragma newdecls optional are same because newdecls are optional by default (so you can mix SM 1.6 and SM 1.7+ syntaxes).
Forum: Snippets and Tutorials 09-28-2020, 08:09
Replies: 9
Views: 3,659
Posted By MAGNAT2645
Re: [SP] ConfigMap: StringMap & SMCParser

That's just a stock which returns true (only if string treated as true) or false (in any other case), you don't have to use it. It was just an example of simple/advanced conversion.
Forum: Coding MM:S Plugins & SM Extensions 09-27-2020, 11:38
Replies: 3
Views: 1,726
Posted By MAGNAT2645
Re: Extension Compilation

Wrong forum.
(Also sorry, i can't help you with compilation.)
Forum: Snippets and Tutorials 09-27-2020, 03:34
Replies: 9
Views: 3,659
Posted By MAGNAT2645
Re: [SP] ConfigMap: StringMap & SMCParser

I have this stock:

#define _BOOL(%1) view_as< bool >( %1 )

stock bool StringToBool(const char[] str, bool simple=true) {
if ( simple )
return _BOOL( StringToInt( str ) );

if ( strcmp(...
Forum: Snippets and Tutorials 09-25-2020, 08:59
Replies: 9
Views: 3,659
Posted By MAGNAT2645
Re: [SP] ConfigMap: StringMap & SMCParser

You can put __nullable__ into methodmap definition like

methodmap ConfigMap < StringMap __nullable__ {


and then you are able to use
ConfigMap hCfg = new ConfigMap();

EDIT: Nevermind, it...
Forum: Plugins 09-15-2020, 03:36
Replies: 2
Views: 438
Posted By MAGNAT2645
Re: [TF2] Friendly - 09/14/2020

There's already Friendly plugins with same functions on the forum.

1) As i know (non)friendlies still can hurt (non)friendlies by using some plugins. For example: RTD...
Forum: Scripting 09-06-2020, 11:59
Replies: 3
Views: 667
Posted By MAGNAT2645
Re: Anyway to control (facial) flex animations in-game?

I mean you can't just control client-side things (in TF2, CS, L4D etc.) like how you want. GMod has modified engine so it can "communicate" (do things like changing bodygroups so every client will...
Forum: Scripting 09-04-2020, 09:30
Replies: 3
Views: 667
Posted By MAGNAT2645
Re: Anyway to control (facial) flex animations in-game?

Not really, flex animations are client-side and SourceMod can't control client-side things like GMod does it.
Forum: Extensions 08-25-2020, 06:32
Replies: 810
Views: 357,668
Posted By MAGNAT2645
Re: [ANY] SteamWorks

Oh, the "git132" version? I think it works fine (used it once and it was fine) but why do I need to use an older version?
No way to fix this bug with the new version?

EDIT: None of GitHub...
Forum: Extensions 08-24-2020, 08:12
Replies: 810
Views: 357,668
Posted By MAGNAT2645
Re: [ANY] SteamWorks

Do you mean SteamTools? I use SteamWorks since it has more functions (at least that's what I think).
Forum: Scripting 08-23-2020, 13:20
Replies: 7
Views: 549
Posted By MAGNAT2645
Re: [HELP] How to align right scored

Here's example but you will need to get string max length for sFormat (if you use ORDER BY <column> DESC then you can get max length from first qrating result and just save it to integer variable).
Forum: Extensions 08-23-2020, 12:58
Replies: 810
Views: 357,668
Posted By MAGNAT2645
Re: [ANY] SteamWorks

Sorry for possible spam (i just want to find a solution) but what about this (https://forums.alliedmods.net/showpost.php?p=2709420&postcount=780) problem?
I use last build and SW Game Description...
Forum: Scripting 08-17-2020, 12:08
Replies: 3
Views: 573
Posted By MAGNAT2645
Re: [TF2] Interact with texture of brushes?

I don't know if it's possible to get surface material/texture but you should check out sdktools_trace (https://www.sourcemod.net/new-api/sdktools_trace) API (especially functions containing "Surface"...
Forum: VSH / Freak Fortress 08-15-2020, 05:54
Replies: 124
Views: 24,513
Posted By MAGNAT2645
Re: Unofficial Freak Fortress | 1.20.1

We're currently searching the problem (it has something to do with UTIL_FindCharArg function, that's why you're getting empty szClassname etc.).
Forum: Scripting 08-14-2020, 16:26
Replies: 5
Views: 442
Posted By MAGNAT2645
Re: Hook one entity button

You can create some tools to help yourself:

public void OnPluginStart() {
RegConsoleCmd( "sm_info", CMD_Info );
}

public Action CMD_Info(int client, int args) {
int iTarget =...
Forum: Scripting 08-14-2020, 15:25
Replies: 5
Views: 442
Posted By MAGNAT2645
Re: Hook one entity button

There's a lot of methods to determine entity index.
You can use FindEntityByClassname (https://www.sourcemod.net/new-api/sdktools_functions/FindEntityByClassname) but this can find ANY entity with...
Showing results 1 to 25 of 338

 
Forum Jump

All times are GMT -4. The time now is 06:11.


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