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

Showing results 1 to 25 of 102
Search took 0.01 seconds.
Search: Posts Made By: adma
Forum: Scripting 04-24-2020, 20:56
Replies: 2
Views: 753
Posted By adma
Re: [TF2] A plugin I'm making inconsistently crashes my server.

Try use AcceptEntityInput(index, "Kill") instead of RemoveEdict
Forum: Scripting Help 04-24-2020, 20:42
Replies: 2
Views: 831
Posted By adma
Re: Methodmap Inheritance

Woops, sent to the wrong section. This was meant to go in SourceMod scripting.
Forum: Scripting Help 04-24-2020, 20:40
Replies: 2
Views: 831
Posted By adma
Methodmap Inheritance

#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

int g_prop1; // Variable to store prop value for Parent instance
int g_prop2; // Variable to store prop value for Child...
Forum: Scripting 05-12-2019, 22:02
Replies: 2
Views: 1,614
Posted By adma
Re: [TF2] Remove all weapons from player

Ignore, misunderstood the question

static int iWeaponWearables[] = {
133, // Gunboats
444, // Mantreads
405, // Ali Baba's Wee Booties
608, // Bootlegger
231, // Darwin's Danger...
Forum: Scripting 05-04-2019, 09:51
Replies: 1
Views: 1,082
Posted By adma
Re: I want to make a Loop shape variable..

if (p_iResult1 == p_iResult2) LogMessage("Tie");
else if ((p_iResult1 - p_iResult2) % 3 == 1) LogMessage("1 wins!");
else LogMessage("2 wins!");

I used Google
Forum: Scripting 04-07-2019, 01:11
Replies: 1
Views: 1,322
Posted By adma
Re: [HELP] Knifes for VIP and for ALL

Inside menus.sp there is a function called CreateKnifeMenu (https://github.com/kgns/weapons/blob/06f75f72d9d038a8fb4600bb854c7497daf3c383/addons/sourcemod/scripting/weapons/menus.sp#L67)

Use...
Forum: Scripting 04-05-2019, 19:43
Replies: 15
Views: 4,184
Posted By adma
Re: Help to make cooldown plugin and add the player to mysql

Sorry, I opened this thread and it marked it read and I forgot to reply. You can use the SMJansson extension (https://forums.alliedmods.net/showthread.php?t=184604) to decode that JSON and grab the...
Forum: Scripting 04-04-2019, 09:36
Replies: 8
Views: 2,558
Posted By adma
Re: [TF2 MvM] Refund all upgrades on a client?

Now, im not sure about this but there is a user message called MVMResetPlayerUpgradeSpending. It is sent when a player refunds. You should probably hook that usermsg and try figure out what gets...
Forum: Scripting 04-03-2019, 06:02
Replies: 15
Views: 4,184
Posted By adma
Re: Help to make cooldown plugin and add the player to mysql

Show JSON structure and we can find a solution from there.
Forum: Scripting 04-03-2019, 06:00
Replies: 15
Views: 4,184
Posted By adma
Re: Help to make cooldown plugin and add the player to mysql

I just created the code based on what gjedde outlined:


I can see the issue you have outlined norway, and there are definitely ways to implement a different type of system without that exploit....
Forum: Scripting 04-03-2019, 03:18
Replies: 15
Views: 4,184
Posted By adma
Re: Help to make cooldown plugin and add the player to mysql

No problem, I updated my original post changing the INSERT statement so it updates the ban_expiry if the steamid already exists in the database.
Forum: Scripting 04-03-2019, 03:03
Replies: 15
Views: 4,184
Posted By adma
Re: Help to make cooldown plugin and add the player to mysql

I was bored so here is an example for you. In theory this should work but it is untested.
This adds a 5min timer against someones steamid when they disconnect and if they reconnect while timer is...
Forum: Scripting 03-31-2019, 04:51
Replies: 5
Views: 1,890
Posted By adma
Re: Small problem in this plugin

I've had issues with counting dead players when someones dies. The way I got it to work was using RequestFrame (https://sm.alliedmods.net/new-api/functions/RequestFrame) to delay the check by a frame.
Forum: Scripting 03-31-2019, 00:20
Replies: 3
Views: 2,375
Posted By adma
Re: csgo; How to change model color

https://forums.alliedmods.net/showthread.php?t=75520
FunCommandsX has /colorize and /colorme functionality.
Forum: Scripting 03-30-2019, 19:06
Replies: 10
Views: 2,618
Posted By adma
Re: Error 017 Undefined symbol "Client_InfoPanel" + others

No, Sourcemod triggers the command function when a player does the command. You just tell Sourcemod what to do when you register your commands using RegConsoleCmd() and RegAdminCmd(). You can think...
Forum: Scripting 03-30-2019, 18:54
Replies: 10
Views: 2,618
Posted By adma
Re: Error 017 Undefined symbol "Client_InfoPanel" + others

Examine: RegConsoleCmd("sm_showkeys", Client_InfoPanel, "on/off speed/showkeys center panel");

When you create a command in Sourcepawn, you give
1. The command - "sm_showkeys"
2. The action...
Forum: Scripting 03-30-2019, 09:58
Replies: 1
Views: 1,825
Posted By adma
Re: errors when trying to compile store edit

Undefined symbol means the function isnt defined anywhere in the file. You are probably missing #include <zephstocks>


You cannot use BoolValue with your variable g_cvarEnable. BoolVariable...
Forum: Scripting 03-26-2019, 22:39
Replies: 11
Views: 2,953
Posted By adma
Re: Enum or array inside query callback

Oh wow, it is too. When I read "real data types" I auto assumed memory allocation was different also. Nice to know!
Forum: Scripting 03-26-2019, 08:54
Replies: 11
Views: 2,953
Posted By adma
Re: Enum or array inside query callback

You close it after you use it for the last time. If you try to use a handle after you've closed it, you will run into errors because that handle doesn't exist anymore.
Forum: Scripting 03-26-2019, 08:24
Replies: 11
Views: 2,953
Posted By adma
Re: Enum or array inside query callback

You can use the datapack until all Handles pointing to the datapack are closed, so yes, you can pass it through multiple callbacks and then close the handle at the end - as long as it is guaranteed...
Forum: Scripting 03-25-2019, 07:08
Replies: 11
Views: 2,953
Posted By adma
Re: Enum or array inside query callback

Before SourcePawn 1.7, you used to use a concept called a "tag" on variables instead of actual "types" as there was only one type known by the compiler, called a "cell" (4 bytes). Tags were prepended...
Forum: Scripting 03-25-2019, 03:32
Replies: 4
Views: 1,540
Posted By adma
Re: [CSGO] how i can create vote menu only for ct or tr ??

This line is wrong:
char Char_BufferText[32], Char_RequesterName[64] = GetClientName(client);

"Strings" are just arrays of characters with a 0 as the last element. For example, "hello" is the...
Forum: Scripting 03-24-2019, 22:30
Replies: 11
Views: 2,953
Posted By adma
Re: Enum or array inside query callback

To add onto Fyren's answer, you can also use DataPacks (https://sm.alliedmods.net/new-api/datapack/DataPack).
In your case,
enum eventContent
{
String:m_eventType[64],
...
Forum: Scripting 03-24-2019, 06:18
Replies: 10
Views: 4,641
Posted By adma
Re: About EmitSoundToClient()

1. PrecacheSound does not need "sounds/" in the path
2. You need to AddFileToDownloadsTable (https://sm.alliedmods.net/new-api/sdktools_stringtables/AddFileToDownloadsTable) the custom sounds....
Forum: Scripting 03-23-2019, 23:22
Replies: 4
Views: 1,540
Posted By adma
Re: [CSGO] how i can create vote menu only for ct or tr ??

1. Build your Menu (https://sm.alliedmods.net/new-api/menus/Menu)
2. Create array with only CT/T
3. Use VoteMenu (https://sm.alliedmods.net/new-api/menus/VoteMenu) to send vote to only the clients...
Showing results 1 to 25 of 102

 
Forum Jump

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


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