AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Solved [CSGO]How i can write plugin which will turn of and on plugin (https://forums.alliedmods.net/showthread.php?t=341518)

Danielej1 01-28-2023 13:47

[CSGO]How i can write plugin which will turn of and on plugin
 
1 Attachment(s)
How can I make the sm_thunder command display an example of this plugin being disabled/enabled in chat?

Alex Taylor 01-28-2023 14:19

Re: [CSGO]How i can write plugin which will turn of and on plugin
 
I don't know what you want to do with this plugin, maybe you could give me a more understandable description.

And for the second time, you are working with old syntax. Which is not exactly the best

Danielej1 01-28-2023 14:27

Re: [CSGO]How i can write plugin which will turn of and on plugin
 
Quote:

Originally Posted by Alex Taylor (Post 2798157)
I don't know what you want to do with this plugin, maybe you could give me a more understandable description.

And for the second time, you are working with old syntax. Which is not exactly the best

simply if I type the sm_thunder command to pop up the information on the chat was turned on or off

Alex Taylor 01-28-2023 14:37

Re: [CSGO]How i can write plugin which will turn of and on plugin
 
1 Attachment(s)
Quote:

Originally Posted by Danielej1 (Post 2798158)
simply if I type the sm_thunder command to pop up the information on the chat was turned on or off


Exactly, if you want sm_thunder to turn off HookEvents on command, or to write to you in chat, then command.

EDIT: Unfortunately, the plugin returns with a warning, so enter this at the top like this: #pragma tabsize 0

Danielej1 01-28-2023 14:45

Re: [CSGO]How i can write plugin which will turn of and on plugin
 
Quote:

Originally Posted by Alex Taylor (Post 2798160)
Exactly, if you want sm_thunder to turn off HookEvents on command, or to write to you in chat, then command.

EDIT: Unfortunately, the plugin returns with a warning, so enter this at the top like this: #pragma tabsize 0

i cant compile :

Code:

//// lightingpowerEDITED.sp
//
// C:\Users\danie\OneDrive\Pulpit\Nowy folder\lightingpowerEDITED.sp(43) : error 001: expected token: ",", but found "{"
// C:\Users\danie\OneDrive\Pulpit\Nowy folder\lightingpowerEDITED.sp(43) : error 001: expected token: ";", but found "}"
// C:\Users\danie\OneDrive\Pulpit\Nowy folder\lightingpowerEDITED.sp(43) : error 001: expected token: ";", but found "{"
//
// 3 Errors.
//
// Compilation Time: 0,3 sec
// ----------------------------------------


Alex Taylor 01-28-2023 14:50

Re: [CSGO]How i can write plugin which will turn of and on plugin
 
Quote:

Originally Posted by Danielej1 (Post 2798161)
i cant compile :

Code:

//// lightingpowerEDITED.sp
//
// C:\Users\danie\OneDrive\Pulpit\Nowy folder\lightingpowerEDITED.sp(43) : error 001: expected token: ",", but found "{"
// C:\Users\danie\OneDrive\Pulpit\Nowy folder\lightingpowerEDITED.sp(43) : error 001: expected token: ";", but found "}"
// C:\Users\danie\OneDrive\Pulpit\Nowy folder\lightingpowerEDITED.sp(43) : error 001: expected token: ";", but found "{"
//
// 3 Errors.
//
// Compilation Time: 0,3 sec
// ----------------------------------------


Your Complier is bad.
Click To "Get Plugin" (not "Get Source") or Go to this website, and copmlie here https://spider.limetech.io/

Danielej1 01-28-2023 15:11

Re: [CSGO]How i can write plugin which will turn of and on plugin
 
Quote:

Originally Posted by Alex Taylor (Post 2798165)
Your Complier is bad.
Click To "Get Plugin" (not "Get Source") or Go to this website, and copmlie here https://spider.limetech.io/

I see one big bug, that when I turn this plugin on, all Players without Privileges have this effect could you make it so that only that particular player with the "o" Custom1 flag can see these effects?

Alex Taylor 01-28-2023 15:20

Re: [CSGO]How i can write plugin which will turn of and on plugin
 
1 Attachment(s)
Quote:

Originally Posted by Danielej1 (Post 2798167)
I see one big bug, that when I turn this plugin on, all Players without Privileges have this effect could you make it so that only that particular player with the "o" Custom1 flag can see these effects?

EDIT: This is not a bug, it was simply not included

Unfortunately, you cannot do this with the "round_freeze_end" event, but I added it to the Death Event.

Danielej1 01-28-2023 15:51

Re: [CSGO]How i can write plugin which will turn of and on plugin
 
One last simple question, can you change so that if a Player types a command who has Vip "Custom1" and types the command !sm_thunder so that only he sees this effect? is it possible?

Alex Taylor 01-29-2023 05:29

Re: [CSGO]How i can write plugin which will turn of and on plugin
 
1 Attachment(s)
Quote:

Originally Posted by Danielej1 (Post 2798173)
One last simple question, can you change so that if a Player types a command who has Vip "Custom1" and types the command !sm_thunder so that only he sees this effect? is it possible?

U can make it easily.

First make dimension to the global bool with false default value, like that:
Code:

bool bIsPluginOn[MAXPLAYERS + 1] = { false, ...};
After you've done this, from now on you have to write "iClient" after every bool and use it like that.

But with the "freezetime_end" event, everyone will see it, because you either have to solve it in a different way, or delete the whole thing.

If you have any questions, feel free to contact me on Discord, I'll help. | Alex Taylor#1988 |

Sorry for my really, really bad english.

EDIT: You need to use !thunder command, not !sm_thunder !


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

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