Raised This Month: $ Target: $400
 0% 

CSGO - Code system


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tommiczek
Junior Member
Join Date: Aug 2019
Old 12-15-2021 , 12:02   CSGO - Code system
Reply With Quote #1

Hello, i got this idea and im not good at making plugins so im asking you

When somebody types /activate

It will say "Enter code" into chat and then they will need to send code that we have creater

I want to plugin read from "codes.txt" and there i will add some code that will activate flag ARST
Sorry for my bad english, thanks.
tommiczek is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-16-2021 , 13:52   Re: CSGO - Code system
Reply With Quote #2

- command: sm_activate
After this player have to enter code in chat in 15 seconds.

When 15 seconds have pass or player enter something in chat once, chat works normally.
To try code again, use command /activate again.

Player already listed in SM admin cache can't use this command, only for non-admins.

- create admin group "codes"
or plugin fail to load. You have example file in this post.
You can change admin group privilege without editing plugin code.

- Add your "codes.txt" in ...addons/sourcemod/configs/
or plugin fail to load.
Reloading this plugin you see codes printed in server console. If not, then your codes.txt file is not Windows or Linux format.
one max. length code is 128

-else
Plugin give temporary admin access. If player disconnect, map change or someone use command sm_reloadadmins, they lose admin access.
Attached Files
File Type: sp Get Plugin or Get Source (test.sp - 76 views - 2.5 KB)
File Type: txt codes.txt (25 Bytes, 56 views)
File Type: cfg example.admin_groups.cfg (896 Bytes, 57 views)
__________________
Do not Private Message @me

Last edited by Bacardi; 12-16-2021 at 13:58.
Bacardi is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:42.


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