Ace, the Vintage of Sheckles wrote
do you know if lockbreakers are the same or no.
No, but I can make them like that if you guys want.
Definitely just let me know, and I'm not too sure if myback has modified the mod since I last touched it or else i'd have done it already.
Ace, the Vintage of Sheckles wrote
In the words of myback:
"its not that easy/simple"
na lmao this is easily done with
A: sql
B: clientprefs
C: manually banning the retard cop if they rejoin to avoid timeout
I could make it a player command with a voting menu if the community would prefer that instead
here is option C:
Global Variables:
new bool:g_bTimeout[MAXPLAYERS + 1] = false;
new Float:g_fTimeoutLeft[MAXPLAYERS + 1] = 0.0;
Command Callback:
public Action:Command_timeoutCop(Client, iArgs)
{
if(iArgs != 2)
{
if(Client == 0)
{
PrintToConsole(Client, "[RP] Invalid Syntax: sm_timeoutCop <player> <length (mins)>");
return Plugin_Handled;
}
PrintToConsole(Client, "[RP] Invalid Syntax: sm_timeoutCop <player> <length (mins)>");
CPrintToChat(Client, "{green}[RP]{white} Invalid Syntax: sm_timeoutCop <player> <length (mins)>");
return Plugin_Handled;
}
decl String:sArg1[32], String:sArg2[32];
GetCmdArg(1, sArg1, sizeof(sArg1));
GetCmdArg(2, sArg2, sizeof(sArg2));
new String:sTargetName[MAX_TARGET_LENGTH];
new iTargetList[MAXPLAYERS], iTargetCount;
new bool:bMultiLang;
if ((iTargetCount = ProcessTargetString(
sArg1,
Client,
iTargetList,
MAXPLAYERS,
COMMAND_FILTER_CONNECTED,
sTargetName,
sizeof(sTargetName),
bMultiLang)) <= 0)
{
if(Client == 0)
{
PrintToConsole(Client, "[RP] Invalid Target: %s", sArg1);
return Plugin_Handled;
}
PrintToConsole(Client, "[RP] Invalid Target: %s", sArg1);
CPrintToChat(Client, "{green}[RP]{white} Invalid Target: %s", sArg1);
return Plugin_Handled;
}
for(new i = 0; i < iTargetCount; i++)
{
g_bTimeout[iTargetList[i]] = true;
g_fTimeoutLeft[iTargetList[i]] += StringToInt(sArg2);
CPrintToChat(iTargetList[i], "{green}[RP]{white} Admin %N has timed you out of cop for %i minutes", Client, StringToInt(sArg2));
}
return Plugin_Handled;
}
put this inside of Command_switchStealth underneath iscuffed:
else if(g_bTimeout[Client])
{
CPrintToChat(Client, "{green}[RP]{white} You have been timed out of cop by an admin");
}
place this inside displayHud, underneath the probation thing(it's what i did, really just put it anywhere not affected by conditions..)
if(g_bTimeout[Client])
{
g_fTimeoutLeft[Client] -= 1.0;
if(g_fTimeoutLeft[Client] <= 0.0)
{
g_bTimeout[Client] = false;
CPrintToChat(Client, "{green}[RP]{white} Your timeout period has expired");
}
}