Quote:
Originally Posted by L4D2Noob
Code:
L 08/21/2022 - 16:36:45: SourceMod error session started
L 08/21/2022 - 16:36:45: Info (map "cs_cs16_assault") (file "/game/cstrike/addons/sourcemod/logs/errors_20220821.log")
L 08/21/2022 - 16:36:45: [SM] Exception reported: A vote is already in progress
L 08/21/2022 - 16:36:45: [SM] Blaming: voteAlltalk.smx
L 08/21/2022 - 16:36:45: [SM] Call stack trace:
L 08/21/2022 - 16:36:45: [SM] [0] VoteMenu
L 08/21/2022 - 16:36:45: [SM] [1] Line 799, /groups/sourcemod/compiler-1.8/include/menus.inc::VoteMenuToAll
L 08/21/2022 - 16:36:45: [SM] [2] Line 70, /home/forums/content/files/2/7/8/4/5/1/161715.attach::OnClientSayCommand
L 08/21/2022 - 16:52:10: Error log file session closed.
|
PHP Code:
//public Action OnClientSayCommand(int client, const char[] command, const char[] sArgs)
public void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs)
{
if (client && StrEqual(sArgs, "!alltalk\0", false))
{
if (voteTimes >= maxVote)
{
PrintToChat(client, "\x04[Vote-AllTalk]\x03 There was already an AllTalk vote.");
return;
}
if (!IsNewVoteAllowed())
{
PrintToChat(client, "\x04[Vote-AllTalk]\x03 Vote in progress or cooldown is active.");
return;
}
ShowActivity2(client, "[SM] ", "Initiated Vote alltalk");
LogAction(client, -1, "\"%L\" used vote-alltalk", client);
new Handle:menu = CreateMenu(Handle_VoteMenu);
SetMenuTitle(menu, "Turn on all Talk so you can hear my jokes?");
AddMenuItem(menu, "notsure1", "Yes");
AddMenuItem(menu, "notsure2", "No");
SetMenuExitButton(menu, false);
VoteMenuToAll(menu, 18);
return;
}
}
__________________