So, I got this idea for a script where a player can report another player, I then want the GOTV to automatically spectate The Susbject in 1st person for 5 or so minutes, while recording a csgo demo for evidence to review. Lastly I want the GOTV to dumb all data in a specific forum, ready for mods to review...
I'm pretty new at SourcePawn and not familiar with it's boundries at all.... I've only coded some really basic scripts and done a fair ammount of reading...
I've already invested a good ammount of time in this project, and just now realized the size of this task, for a newbie like me
My idea for the script? Is it even possible or am I wasting my time??
This is 90% of the progress I've made:
Code:
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1
#pragma newdecls required
public Plugin myinfo =
{
name = "JML Report",
author = "Denaegte",
description = "Allows players to !report other players, hopefully teach them a lesson? make them reconsider life?
Probably not, but at least I managed to their unbearable presence + negative and destructive behaviour for a while...
After a player gets reported, the CSGO TV bot automatically starts to spectacte The Suspect in 1st person,
until a 5 minute demo has been captured as evidence. Lastly the information are sent to an Admin Forum - ready for review.",
version = "0.3",
url = "jml.lissner.me"
};
public void OnPluginStart()
{
RegConsoleCmd("sm_report", player_report);
RegConsoleCmd("sm_rapport", player_rapport);
}
public Action player_report(int client, int args){
if(args <= 0){
new String:clientName[50]
new playerCount = 0
new index = 1
playerCount = GetClientCount(true)
new Handle:playerMenu = CreateMenu(Handle_PlayerSelect)
SetMenuTitle("%T","Select a Player to Report: ", playerReport )
while (index <= playerCount)
{
if(IsClientConnected(index) && IsClientInGame(index))
{
MenuAction_Display: { SetMenuTitle("%T", "Begrundelse", playerMenu')
GetClientName(index, clientName, sizeof(clientName))
AddMenuItem(playerMenu, clientName, clientName)
}
++index
}
DisplayMenu(playerMenu, client, true)
return Plugin_Handled;}
}
}
}