Raised This Month: $51 Target: $400
 12% 

Infractions - Early Stages


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
QuantumToast
Member
Join Date: May 2017
Location: US
Old 06-13-2017 , 18:58   Infractions - Early Stages
#1

Hello to you all. I just started learning how to write a plugin for my server, since I could not seem to find anything that met my needs. It's in its very early stages, and I don't have that much experience with the SourcePawn language, but seeing as it's very similar in structure to C++/Java, I have been not having too much issue. I'm going to post a link to what I have so far, since it's a little lengthy: https://pastebin.com/VkuKxuGW
Here's my mental map for what Infractions is supposed to accomplish:
  • Allow admins to stack "infractions" on players who break rules (and print a warning message to them in chat)
  • Also allow admins to possibly add a "reason" with an infraction, so others know why the player has infractions
  • Upon reaching certain amounts of infractions, a defined action is taken against the player, such as kicking or banning
  • Possibly, allow infractions to slowly decrease over time
  • Hook into certain commands like sm_kick, sm_ban, etc, to increment infractions
  • A sm_infractions.cfg file (name subject to change) that is created and populated with players and their SteamIDs or other sources of identification as they have infractions stacked against them
I have some basic functionality in place, namely that the plugin does hook into the commands I specified in the code, as all it does now is print a message in console that something was "done". I also successfully registered all the cvars I've deemed necessary so far.
However, at this point I seem to be suffering from a combination of writer's block and confusion, and have a few questions that may help guide me:
  1. How do I process arguments for a command like sm_kick or sm_ban?
  2. Branching off the previous question, can I process the target of one command and use them as the target for another?
  3. How do I create a structured file like I described above?
  4. Are there any features you'd like to see implemented other than the aforementioned?
Thanks all for your wonderful help!

Edit: Apparently, I can't bother to pay attention, and I posted this in the AMX section instead of the Sourcemod section. Disregard, I guess >.< I'm not sure how to delete this post :/

Last edited by QuantumToast; 06-13-2017 at 19:05.
QuantumToast is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 06-14-2017 , 03:02   Re: Infractions - Early Stages
#2

does this look like a sourcemod place to you? well not for me
__________________
retired chump
DjSoftero is offline
Closed Thread



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 11:04.


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