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

Showing results 1 to 25 of 500
Search took 0.03 seconds.
Search: Posts Made By: DJ Tsunami
Forum: Scripting 02-24-2021, 08:07
Replies: 12
Views: 349
Posted By DJ Tsunami
Re: KeyValues not working

I don't know, works fine for me:

char filePath[PLATFORM_MAX_PATH + 1];
char scoreTag[MAXPLAYERS + 1][64];
char chatColor[MAXPLAYERS + 1][64];
char nameColor[MAXPLAYERS + 1][64];

public void...
Forum: Scripting 02-24-2021, 06:54
Replies: 12
Views: 349
Posted By DJ Tsunami
Re: KeyValues not working

See the last example on the wiki: https://wiki.alliedmods.net/KeyValues_(SourceMod_Scripting)#KeyValue_Creation

You need to use SetString to store values under the steamID key. An empty section...
Forum: Scripting 02-24-2021, 05:17
Replies: 12
Views: 349
Posted By DJ Tsunami
Re: KeyValues not working

Yes, although I don't see any reason why JumpToKey would ever return false here, so I think the if statement is unnecessary.

return; at the end of a function is also unnecessary.
Forum: Scripting 02-24-2021, 05:03
Replies: 12
Views: 349
Posted By DJ Tsunami
Re: KeyValues not working

You're passing true to JumpToKey to create the key if it doesn't exist, so naturally it will always return true. Then you need to use ExportToFile to make the key show up in the file.
Forum: Extensions 02-20-2021, 07:24
Replies: 98
Views: 50,141
Posted By DJ Tsunami
Re: REST in Pawn 1.2 - HTTP client for JSON REST APIs (Updated 2021/02/07)

If a LogMessage at the top of FrameHook doesn't spam your log file or the server console, then your game frame hook isn't firing, which explains why requests aren't processed.

If it's a public...
Forum: Extensions 02-18-2021, 11:42
Replies: 98
Views: 50,141
Posted By DJ Tsunami
Re: REST in Pawn 1.2 - HTTP client for JSON REST APIs (Updated 2021/02/07)

Which game is your server running, and what Linux distribution and version are you using?

I can send a debug version for Linux that prints everything that happens during the HTTP request, but if...
Forum: Extensions 02-15-2021, 11:04
Replies: 98
Views: 50,141
Posted By DJ Tsunami
Re: REST in Pawn 1.2 - HTTP client for JSON REST APIs (Updated 2021/02/07)

I did the same with version 1.2.3 and it works fine:


Maybe try another HTTP extension like SteamWorks to see if it really is an issue with REST in Pawn, or if there is an issue with your server....
Forum: Extensions 02-15-2021, 09:35
Replies: 98
Views: 50,141
Posted By DJ Tsunami
Re: REST in Pawn 1.2 - HTTP client for JSON REST APIs (Updated 2021/02/07)

You are missing http:// in your URL. I would also check your sourcemod/logs folder for errors.
Forum: Plugin/Gameplay Ideas and Requests 02-14-2021, 02:34
Replies: 5
Views: 363
Posted By DJ Tsunami
Re: [L4D2] - Problem in the .sp code

You don't need the path to SourceMod to load a translations file, just call LoadTranslations(sTranslationFile);
Forum: General 02-11-2021, 07:26
Replies: 5
Views: 282
Posted By DJ Tsunami
Re: SourcePawn compiler suggestion

You are storing strings in an integer array. So those warnings are not so useless after all.

To use different variable types in an array probably want to use enum structs...
Forum: Scripting 01-23-2021, 10:43
Replies: 3
Views: 220
Posted By DJ Tsunami
Re: Stripping everything but knife [CS:GO]

Because you used || instead of &&, so even if the string doesn't contain "knife", it will still continue if the string also doesn't contain "bayonet".
Forum: General 01-17-2021, 08:00
Replies: 8
Views: 704
Posted By DJ Tsunami
Re: Why doesn't my SourceMod work on Linux?

You cannot copy your SourceMod installation from Windows to Linux, you need to download Metamod:Source and SourceMod for Linux:

https://metamodsource.net/downloads.php?branch=stable...
Forum: Extensions 01-10-2021, 08:49
Replies: 568
Views: 539,041
Posted By DJ Tsunami
Re: [EXTENSION] Socket (3.0.1)

Use an HTTP extension like SteamWorks or REST in Pawn.
Forum: Scripting 01-07-2021, 05:16
Replies: 4
Views: 452
Posted By DJ Tsunami
Re: [ANY] Check if player is a different one

See the second example on https://wiki.alliedmods.net/Timers_(SourceMod_Scripting)#Simple_Values.

You want to pass the userid or client serial to the callback, which is unique for each client.
Forum: Scripting 01-04-2021, 10:30
Replies: 3
Views: 492
Posted By DJ Tsunami
Re: What did the FindAdminByIdentity?

No, admins are read from the files or the database and stored in an in-memory cache. Functions like FindAdminByIdentity and RemoveAdmin then use that cache to find and remove admins.

There are no...
Forum: Plugin/Gameplay Ideas and Requests 12-27-2020, 13:10
Replies: 1
Views: 175
Posted By DJ Tsunami
Re: Array must be indexed

StringToInt(argument2)
Forum: Plugins 12-27-2020, 08:23
Replies: 2,176
Views: 1,371,177
Posted By DJ Tsunami
Re: Advertisements 2.0 (Updated 2016/03/23)

Your includes don't match your compiler version. Compile with the latest stable SourceMod release (https://www.sourcemod.net/downloads.php?branch=stable).
Forum: Plugins 12-24-2020, 15:48
Replies: 2,176
Views: 1,371,177
Posted By DJ Tsunami
Re: Advertisements 2.0 (Updated 2016/03/23)

That means your advertisements.smx was compiled for SourceMod 1.11, and will not load on 1.10. Just overwrite your advertisements.smx with the one from the latest release.
Forum: General 12-20-2020, 16:37
Replies: 1
Views: 366
Posted By DJ Tsunami
Re: Any GetPlayerImmunity function?

public void OnClientPostAdminCheck(int client)
{
AdminId admin = GetUserAdmin(client);

if (admin != INVALID_ADMIN_ID)
{
int immunity = admin.ImmunityLevel;
}
}
Forum: Scripting 12-20-2020, 14:00
Replies: 1
Views: 461
Posted By DJ Tsunami
Re: [CS:GO] For loop declaration is invalid :)

You can't put logic in the global scope. You need to put it inside a function, like OnPluginStart.

https://wiki.alliedmods.net/Introduction_to_SourceMod_Plugins#Getting_code_to_run
Forum: Plugins 12-15-2020, 06:32
Replies: 2,176
Views: 1,371,177
Posted By DJ Tsunami
Re: Advertisements 2.0 (Updated 2016/03/23)

No, you would have to edit the plugin for that. I believe it's currently around 7 seconds to match a hint message. You can change the number 5 on line 242...
Forum: Extensions 12-09-2020, 09:50
Replies: 98
Views: 50,141
Posted By DJ Tsunami
Re: REST in Pawn 1.2 - HTTP client for JSON REST APIs (Updated 2020/09/13)

I can't reproduce this, are you sure you are using http://? You should only need a valid SSL certificate when using https://.
Forum: Scripting 12-06-2020, 05:37
Replies: 5
Views: 951
Posted By DJ Tsunami
Re: [Help!] Showing Expiration Time of client from Sourcebans Donation Control

WHERE steam_id '%s';
You are missing an = here. You should add error handling in SQLCheckPerkQuery so you can catch mistakes in your query.

You are also passing GetClientUserId(client) to...
Forum: Plugins 12-03-2020, 15:46
Replies: 2,176
Views: 1,371,177
Posted By DJ Tsunami
Re: Advertisements 2.0 (Updated 2016/03/23)

The chat colors have to be lowercase now. I've only had one other person complain about it, so I haven't bothered to fix it.
Forum: Plugins 12-03-2020, 13:53
Replies: 2,176
Views: 1,371,177
Posted By DJ Tsunami
Re: Advertisements 2.0 (Updated 2016/03/23)

Which game? And these are colors in chat messages?
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 23:24.


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