Raised This Month: $ Target: $400
 0% 

[CS:GO] MyJailbreak - warden, days, menu & more (Beta 14 - 13/08/18)


Post New Thread Reply   
 
Thread Tools Display Modes
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: Czech_Republic
Old 08-01-2016 , 08:56   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #191

Quote:
Originally Posted by ElleVen View Post
the !rw bug
L 08/01/2016 - 03:14:23: [SM] [0] Line 430, menuvip.sp::advert()
L 08/01/2016 - 03:15:24: [SM] Native "LogToFileEx" reported: Could not open file "/home/tcagame/TheFirePro/2212/csgo/addons/sourcemod/logs/MyJailbreak/MyJB-16-07-31.log"
L 08/01/2016 - 03:15:24: [SM] Displaying call stack trace for plugin "MyJailbreak/warden.smx":
L 08/01/2016 - 03:15:24: [SM] [0] Line 1248, warden.sp::RemoveTheWarden()
L 08/01/2016 - 03:15:24: [SM] [1] Line 1231, warden.sp::RemoveWarden()
fix pls
i cannot remove wardens...
but they can.
Create folder MyJailbreak in addons/sourcemod/logs/
NomisCZ is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 08-02-2016 , 02:02   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #192

Upcoming player icons:


coming soon!
__________________
coding & free software
shanapu is offline
NewZi
Junior Member
Join Date: Jun 2016
Old 08-02-2016 , 07:43   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #193

Prefixes in a chat don't work

L 08/01/2016 - 00:00:45: [SM] Exception reported: Invalid field "params" for message "CCSUsrMsg_SayText2"
L 08/01/2016 - 00:00:45: [SM] Blaming: simple-chatprocessor.smx()
L 08/01/2016 - 00:00:45: [SM] Call stack trace:
L 08/01/2016 - 00:00:45: [SM] [0] PbReadString
L 08/01/2016 - 00:00:45: [SM] [1] Line 353, D:\Libraries\Documents\Repos\Simple Chat Processor\scripting\simple-chatprocessor.sp::OnSayText2()
NewZi is offline
rsg
Member
Join Date: Apr 2011
Old 08-02-2016 , 08:04   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #194

Why you dont use this pack skins? http://gamebanana.com/skins/145956
rsg is offline
Send a message via Skype™ to rsg
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 08-02-2016 , 11:55   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #195

Quote:
Originally Posted by NewZi View Post
Prefixes in a chat don't work

L 08/01/2016 - 00:00:45: [SM] Exception reported: Invalid field "params" for message "CCSUsrMsg_SayText2"
L 08/01/2016 - 00:00:45: [SM] Blaming: simple-chatprocessor.smx()
L 08/01/2016 - 00:00:45: [SM] Call stack trace:
L 08/01/2016 - 00:00:45: [SM] [0] PbReadString
L 08/01/2016 - 00:00:45: [SM] [1] Line 353, D:\Libraries\Documents\Repos\Simple Chat Processor\scripting\simple-chatprocessor.sp::OnSayText2()
That's obviously a error of simple-chatproccesor. There need to be made some changes to make it working in CS:GO. However maybe u should use the search function.
good_live is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 08-02-2016 , 13:37   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #196

Quote:
Originally Posted by NewZi View Post
Prefixes in a chat don't work
For me (and many others) prefixes works well. Which version of simple-chatproccesor do you use?


Quote:
Originally Posted by rsg View Post
Why you dont use this pack skins? http://gamebanana.com/skins/145956
The warden & zombie models are just example/placeholder models.
Everyone is free to choose his favorit model.
For Team Models use sm_skinchooser. Works well with MyJB.


Quote:
Originally Posted by good_live View Post
That's obviously a error of simple-chatproccesor. There need to be made some changes to make it working in CS:GO. However maybe u should use the search function.
It need changes to make it working in CS:GO?
For me, just push the plugin on server and ready to go, works well.
__________________
coding & free software
shanapu is offline
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 08-02-2016 , 16:27   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #197

Quote:
Originally Posted by shanapu View Post
It need changes to make it working in CS:GO?
For me, just push the plugin on server and ready to go, works well.
I got the same error as mentioned above with that version.

EDIT:
Needed to add a ", 1" on line 353
Works fine for me with that edit.

PHP Code:
/************************************************************************
*************************************************************************
Simple Chat Processor
Description:
        Process chat and allows other plugins to manipulate chat.
*************************************************************************
*************************************************************************
This file is part of Simple Plugins project.

This plugin is free software: you can redistribute 
it and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the License, or
later version. 

This plugin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this plugin.  If not, see <http://www.gnu.org/licenses/>.
*************************************************************************
*************************************************************************
File Information
$Id$
$Author$
$Revision$
$Date$
$LastChangedBy$
$LastChangedDate$
$URL$
$Copyright: (c) Simple Plugins 2008-2009$
*************************************************************************
*************************************************************************
*/

#include <sourcemod>
#undef REQUIRE_PLUGIN
#include <updater>

#define PLUGIN_VERSION                "2.1.0"
#define SENDER_WORLD            0
#define MAXLENGTH_INPUT            128     // Inclues \0 and is the size of the chat input box.
#define MAXLENGTH_NAME            64        // This is backwords math to get compability.  Sourcemod has it set at 32, but there is room for more.
#define MAXLENGTH_MESSAGE        256        // This is based upon the SDK and the length of the entire message, including tags, name, : etc.

#define CHATFLAGS_INVALID        0
#define CHATFLAGS_ALL            (1 << 0)
#define CHATFLAGS_TEAM            (1 << 1)
#define CHATFLAGS_SPEC            (1 << 2)
#define CHATFLAGS_DEAD            (1 << 3)

#define ADDSTRING(%1) SetTrieValue(g_hChatFormats, %1, 1)

#define UPDATE_URL "http://dl.dropboxusercontent.com/u/83581539/ChatProcessor/updater.txt"

enum eMods
{
    
GameType_Unknown,
    
GameType_AOC,
    
GameType_CSGO,
    
GameType_CSS,
    
GameType_DOD,
    
GameType_FF,
    
GameType_HIDDEN,
    
GameType_HL2DM,
    
GameType_INS,
    
GameType_L4D,
    
GameType_L4D2,
    
GameType_NEO,
    
GameType_SGTLS,
    
GameType_TF,
    
GameType_DM,
    
GameType_ZPS,
};

new 
Handle:g_hDPArray INVALID_HANDLE;

new 
eMods:g_CurrentMod;
new 
String:g_sGameName[eMods][32] = 
{        
    
"Unknown",
    
"Age of Chivalry",
    
"Counter-Strike: GO",
    
"Counter Strike",
    
"Day Of Defeat",
    
"Fortress Forever",
    
"Hidden: Source",
    
"Half Life 2: Deathmatch",
    
"Insurgency",
    
"Left 4 Dead",
    
"Left 4 Dead 2",
    
"Neotokyo",
    
"Stargate TLS",
    
"Team Fortress 2",
    
"Dark Messiah",
    
"Zombie Panic: Source"
};

new 
Handle:g_hChatFormats INVALID_HANDLE;
new 
Handle:g_fwdOnChatMessage;
new 
Handle:g_fwdOnChatMessagePost;

new 
bool:g_bSayText2;
new    
bool:g_bAutoUpdate;

new 
g_CurrentChatType CHATFLAGS_INVALID;

public 
Plugin:myinfo =
{
    
name "Simple Chat Processor (Redux)",
    
author "Simple Plugins, Mini",
    
description "Process chat and allows other plugins to manipulate chat.",
    
version PLUGIN_VERSION,
    
url "http://forums.alliedmods.net"
};

public 
APLRes:AskPluginLoad2(Handle:myselfbool:lateString:error[], err_max)
{
    
MarkNativeAsOptional("GetUserMessageType");
    
CreateNative("GetMessageFlags"Native_GetMessageFlags);
    
RegPluginLibrary("scp");
    return 
APLRes_Success;
}

public 
OnPluginStart()
{
    new 
Handle:conVar CreateConVar("sm_scp_autoupdate""1""Is auto-update enabled?");
    
g_bAutoUpdate GetConVarBool(conVar);
    
HookConVarChange(conVarOnAutoUpdateChange);

    
g_CurrentMod GetCurrentMod();
    
g_hChatFormats CreateTrie();
    
LogMessage("[SCP] Recognized mod [%s]."g_sGameName[g_CurrentMod]);
    
    
/**
    Hook the usermessage or error out if the mod doesn't support saytext2
    */
    
new UserMsg:umSayText2 GetUserMessageId("SayText2");
    if (
umSayText2 != INVALID_MESSAGE_ID)
    {
        
g_bSayText2 true;
        
HookUserMessage(umSayText2OnSayText2true);
    }
    else
    {
        new 
UserMsg:umSayText GetUserMessageId("SayText");
        if (
umSayText != INVALID_MESSAGE_ID)
        {
            if (
g_CurrentMod != GameType_DOD)
            {
                
SetFailState("Unsupported game");
            }
            
g_bSayText2 false;
            
HookUserMessage(umSayTextOnSayTexttrue);
        }
        else
        {
            
LogError("[SCP] This mod appears not to support SayText2 or SayText.  Plugin disabled.");
            
SetFailState("Error hooking usermessage saytext2 and saytext");    
        }
    }
    
    
/**
    Get mod type and load the correct translation file
    */
    
if(g_bSayText2)
    {
        
decl String:sGameDir[32];
        
decl String:sTranslationFile[PLATFORM_MAX_PATH];
        
decl String:sTranslationLocation[PLATFORM_MAX_PATH];
        
GetGameFolderName(sGameDirsizeof(sGameDir));
        
Format(sTranslationFilesizeof(sTranslationFile), "scp.%s.phrases"sGameDir);
        
BuildPath(Path_SMsTranslationLocationsizeof(sTranslationLocation), "translations/%s.txt"sTranslationFile);
        if (
FileExists(sTranslationLocation))
        {
            
LogMessage("[SCP] Loading translation file [%s]."sTranslationFile);
            
LoadTranslations(sTranslationFile);
            if (!
GetChatFormats(sTranslationLocation))
            {
                
LogError("[SCP] Could not parse the translation file");
                
SetFailState("Could not parse the translation file");
            }
        }
        else
        {
            
LogError("[SCP] Translation file is not present");
            
SetFailState("Translation file is not present");
        }
    }

    
/**
    Create the global forwards for other plugins
    */
    
g_fwdOnChatMessage CreateGlobalForward("OnChatMessage"ET_HookParam_CellByRefParam_CellParam_StringParam_String);
    
g_fwdOnChatMessagePost CreateGlobalForward("OnChatMessage_Post"ET_IgnoreParam_CellParam_CellParam_StringParam_String);

    
g_hDPArray CreateArray();
}

public 
OnAutoUpdateChange(Handle:conVar, const String:oldVal[], const String:newVal[])
{
    
g_bAutoUpdate bool:StringToInt(newVal);
}

/**
 *
 * Updater Stuff
 * By Dr. McKay
 * Edited by Mini
 *
 */
public OnAllPluginsLoaded() 
{
    new 
Handle:convar;
    if (
LibraryExists("updater")) 
    {
        
Updater_AddPlugin(UPDATE_URL);
        
decl String:newVersion[10];
        
FormatEx(newVersionsizeof(newVersion), "%sA"PLUGIN_VERSION);
        
convar CreateConVar("scp_version"newVersion"Plugin Version"FCVAR_DONTRECORD|FCVAR_NOTIFY|FCVAR_CHEAT);
    }
    else 
    {
        
convar CreateConVar("scp_version"PLUGIN_VERSION"Plugin Version"FCVAR_DONTRECORD|FCVAR_NOTIFY|FCVAR_CHEAT);    
    }
    
HookConVarChange(convarCallback_VersionConVarChanged);
}

public 
Callback_VersionConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) 
{
    
ResetConVar(convar);
}

public 
OnLibraryAdded(const String:name[])
{
    if (!
strcmp(name"updater"))
    {
        
Updater_AddPlugin(UPDATE_URL);
    }
}

public 
Action:Updater_OnPluginDownloading()
{
    if (!
g_bAutoUpdate)
    {
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;
}

public 
Updater_OnPluginUpdated() 
{
    
ReloadPlugin();
}

public 
Action:OnSayText2(UserMsg:msg_idHandle:bf, const clients[], numClientsbool:reliablebool:init)
{
    
/**
    Get the sender of the usermessage and bug out if it is not a player
    */
    
new bool:bProtobuf = (CanTestFeatures() && GetFeatureStatus(FeatureType_Native"GetUserMessageType") == FeatureStatus_Available && GetUserMessageType() == UM_Protobuf);
    new 
cpSender;
    if (
bProtobuf)
    {
        
cpSender PbReadInt(bf"ent_idx");
    }
    else
    {
        
cpSender BfReadByte(bf);
    }

    if (
cpSender == SENDER_WORLD)
    {
        return 
Plugin_Continue;
    }
    
    
/**
    Get the chat bool.  This determines if sent to console as well as chat
    */
    
new bool:bChat;
    if (
bProtobuf)
    {
        
bChat PbReadBool(bf"chat");
    }
    else
    {
        
bChat = (BfReadByte(bf) ? true false);
    }
    
    
/**
    Make sure we have a default translation string for the message
    This also determines the message type...
    */
    
decl String:cpTranslationName[32];
    new 
buffer;
    if (
bProtobuf)
    {
        
PbReadString(bf"msg_name"cpTranslationNamesizeof(cpTranslationName));
    }
    else
    {
        
BfReadString(bfcpTranslationNamesizeof(cpTranslationName));
    }

    if (!
GetTrieValue(g_hChatFormatscpTranslationNamebuffer))
    {
        return 
Plugin_Continue;
    }
    else
    {
        if (
StrContains(cpTranslationName"all"false) != -1)
        {
            
g_CurrentChatType g_CurrentChatType CHATFLAGS_ALL;
        }
        if (
StrContains(cpTranslationName"team"false) != -1
        
||     StrContains(cpTranslationName"survivor"false) != -
        
||    StrContains(cpTranslationName"infected"false) != -1
        
||    StrContains(cpTranslationName"Cstrike_Chat_CT"false) != -
        
||    StrContains(cpTranslationName"Cstrike_Chat_T"false) != -1)
        {
            
g_CurrentChatType g_CurrentChatType CHATFLAGS_TEAM;
        }
        if (
StrContains(cpTranslationName"spec"false) != -1)
        {
            
g_CurrentChatType g_CurrentChatType CHATFLAGS_SPEC;
        }
        if (
StrContains(cpTranslationName"dead"false) != -1)
        {
            
g_CurrentChatType g_CurrentChatType CHATFLAGS_DEAD;
        }
    }
    
    
/**
    Get the senders name
    */
    
decl String:cpSender_Name[MAXLENGTH_NAME];
    if (
bProtobuf)
    {
        
PbReadString(bf"params"cpSender_Namesizeof(cpSender_Name), 0);
    }
    else if (
BfGetNumBytesLeft(bf))
    {
        
BfReadString(bfcpSender_Namesizeof(cpSender_Name));
    }
    
    
/**
    Get the message
    */
    
decl String:cpMessage[MAXLENGTH_INPUT];
    if (
bProtobuf)
    {
        
PbReadString(bf"params"cpMessagesizeof(cpMessage), 1);
    }
    else if (
BfGetNumBytesLeft(bf))
    {
        
BfReadString(bfcpMessagesizeof(cpMessage));
    }
    
    
/**
    Store the clients in an array so the call can manipulate it.
    */
    
new Handle:cpRecipients CreateArray();
    for (new 
0numClientsi++)
    {
        
PushArrayCell(cpRecipientsclients[i]);
    }
    
    
/**
    Because the message could be changed but not the name
    we need to compare the original name to the returned name.
    We do this because we may have to add the team color code to the name,
    where as the message doesn't get a color code by default.
    */
    
decl String:sOriginalName[MAXLENGTH_NAME];
    
strcopy(sOriginalNamesizeof(sOriginalName), cpSender_Name);
    
    
/**
    Start the forward for other plugins
    */
    
new Action:fResult;
    
Call_StartForward(g_fwdOnChatMessage);
    
Call_PushCellRef(cpSender);
    
Call_PushCell(cpRecipients);
    
Call_PushStringEx(cpSender_Namesizeof(cpSender_Name), SM_PARAM_STRING_UTF8|SM_PARAM_STRING_COPYSM_PARAM_COPYBACK);
    
Call_PushStringEx(cpMessagesizeof(cpMessage), SM_PARAM_STRING_UTF8|SM_PARAM_STRING_COPYSM_PARAM_COPYBACK);
    new 
fError Call_Finish(fResult);
    
    new 
chatFlags g_CurrentChatType;
    
g_CurrentChatType CHATFLAGS_INVALID;
    
    if (
fError != SP_ERROR_NONE)
    {
        
ThrowNativeError(fError"Forward failed");
        
CloseHandle(cpRecipients);
        return 
Plugin_Continue;
    }
    else if (
fResult == Plugin_Continue)
    {
        
CloseHandle(cpRecipients);
        return 
Plugin_Continue;
    }
    else if (
fResult == Plugin_Stop)
    {
        
CloseHandle(cpRecipients);
        return 
Plugin_Handled;
    }
    
    
/**
    This is the check for a name change.  If it has not changed we add the team color code
    */
    
if (StrEqual(sOriginalNamecpSender_Name))
    {
        
Format(cpSender_Namesizeof(cpSender_Name), "\x03%s"cpSender_Name);
    }
    
    
/**
    Create a timer to print the message on the next gameframe
    */
    
new Handle:cpPack CreateDataPack();

    new 
numRecipients GetArraySize(cpRecipients);
    
    
WritePackCell(cpPackcpSender);

    for (new 
0numRecipientsi++)
    {
        new 
GetArrayCell(cpRecipientsi);
        if (!
IsValidClient(x))
        {
            
numRecipients--;
            
RemoveFromArray(cpRecipientsi);
        }
    }
    
    
WritePackCell(cpPacknumRecipients);
    
    for (new 
0numRecipientsi++)
    {
        new 
GetArrayCell(cpRecipientsi);
        
WritePackCell(cpPackx);
    }
    
    
WritePackCell(cpPackbChat);
    
WritePackString(cpPackcpTranslationName);
    
WritePackString(cpPackcpSender_Name);
    
WritePackString(cpPackcpMessage);
    
PushArrayCell(g_hDPArraycpPack);
    
WritePackCell(cpPackbProtobuf);
    
WritePackCell(cpPackchatFlags);

    
CloseHandle(cpRecipients);
    
    
/**
    Stop the original message
    */
    
return Plugin_Handled;
}

public 
Action:OnSayText(UserMsg:msg_idHandle:bf, const clients[], numClientsbool:reliablebool:init)
{
    
/**
    Get the sender of the usermessage and bug out if it is not a player
    */
    
new bool:bProtobuf = (CanTestFeatures() && GetFeatureStatus(FeatureType_Native"GetUserMessageType") == FeatureStatus_Available && GetUserMessageType() == UM_Protobuf);
    new 
cpSender;
    if (
bProtobuf)
    {
        
cpSender PbReadInt(bf"ent_idx");
    }
    else
    {
        
cpSender BfReadByte(bf);
    }

    if (
cpSender == SENDER_WORLD)
    {
        return 
Plugin_Continue;
    }
    
    
/**
    Get the chat message
    */
    
decl String:message[MAXLENGTH_INPUT];
    if (
bProtobuf)
    {
        
PbReadString(bf"text"messagesizeof(message));
    }
    else
    {
        
BfReadString(bfmessagesizeof(message));
    }
    
    
/**
    Get the chat bool.  This determines if sent to console as well as chat
    */
    
if (!bProtobuf)
    {
        
BfReadBool(bf);
    }
    
    
/**
    Store the clients in an array so the call can manipulate it.
    */
    
new Handle:cpRecipients CreateArray();
    for (new 
0numClientsi++)
    {
        
PushArrayCell(cpRecipientsclients[i]);
    }
    
    
decl String:prefix[64], String:senderName[MAX_NAME_LENGTH], String:textMessage[MAXLENGTH_MESSAGE], String:buffer[MAXLENGTH_INPUT];
    
GetClientName(cpSendersenderNamesizeof(senderName));
    
Format(buffersizeof(buffer), "%s:"senderName);
    new 
pos StrContains(messagebuffer);
    
    if (
pos == 0)
    {
        
prefix[0] = '\0';
    }
    else
    {
        
Format(prefixpos 1"%s "message);
    }
    
    
g_CurrentChatType CHATFLAGS_INVALID;
    
    if (
StrContains(prefix"(Team)") != -1)
    {
        
g_CurrentChatType |= CHATFLAGS_TEAM;
    }
    if (
GetClientTeam(cpSender) <= 1)
    {
        
g_CurrentChatType |= CHATFLAGS_SPEC;
    }
    if (
StrContains(prefix"(Dead)") != -1)
    {
        
g_CurrentChatType |= CHATFLAGS_DEAD;
    }
    
    if (
g_CurrentChatType == CHATFLAGS_INVALID)
    {
        
g_CurrentChatType CHATFLAGS_ALL;
    }
    
    
ReplaceString(messagesizeof(message), "\n""");
    
strcopy(textMessagesizeof(textMessage), message[pos strlen(senderName) + 2]);
    
    
/**
    Start the forward for other plugins
    */
    
new Action:fResult;
    
Call_StartForward(g_fwdOnChatMessage);
    
Call_PushCellRef(cpSender);
    
Call_PushCell(cpRecipients);
    
Call_PushStringEx(senderNamesizeof(senderName), SM_PARAM_STRING_UTF8|SM_PARAM_STRING_COPYSM_PARAM_COPYBACK);
    
Call_PushStringEx(textMessagesizeof(textMessage), SM_PARAM_STRING_UTF8|SM_PARAM_STRING_COPYSM_PARAM_COPYBACK);
    new 
fError Call_Finish(fResult);
    
    new 
chatFlags g_CurrentChatType;
    
g_CurrentChatType CHATFLAGS_INVALID;
    
    if (
fError != SP_ERROR_NONE)
    {
        
ThrowNativeError(fError"Forward failed");
        
CloseHandle(cpRecipients);
        return 
Plugin_Continue;
    }
    else if (
fResult == Plugin_Continue)
    {
        
CloseHandle(cpRecipients);
        return 
Plugin_Continue;
    }
    else if (
fResult >= Plugin_Handled)
    {
        
CloseHandle(cpRecipients);
        return 
Plugin_Handled;
    }
    
    
GetClientName(cpSenderbuffersizeof(buffer));
    if (
StrEqual(senderNamebuffer))
    {
        
Format(senderNamesizeof(senderName), "\x03%s"senderName);
    }
    
    
/**
    Create a timer to print the message on the next gameframe
    */
    
new Handle:cpPack CreateDataPack();

    new 
numRecipients GetArraySize(cpRecipients);
    
    
WritePackCell(cpPackcpSender);

    for (new 
0numRecipientsi++)
    {
        new 
GetArrayCell(cpRecipientsi);
        if (!
IsValidClient(x))
        {
            
numRecipients--;
            
RemoveFromArray(cpRecipientsi);
        }
    }
    
    
WritePackCell(cpPacknumRecipients);
    
    for (new 
0numRecipientsi++)
    {
        new 
GetArrayCell(cpRecipientsi);
        
WritePackCell(cpPackx);
    }
    
    
WritePackString(cpPackprefix);
    
WritePackString(cpPacksenderName);
    
WritePackString(cpPacktextMessage);
    
PushArrayCell(g_hDPArraycpPack);
    
// We don't care about saving bProtobuf since we print SayText messages with PrintToChat
    
WritePackCell(cpPackchatFlags);

    
CloseHandle(cpRecipients);
    
    
/**
    Stop the original message
    */
    
return Plugin_Handled;
}

public 
OnGameFrame()
{
    for (new 
0GetArraySize(g_hDPArray); i++)
    {
        new 
Handle:pack GetArrayCell(g_hDPArrayi);
        
ResetPack(pack);
        
        
decl String:sSenderName[MAXLENGTH_NAME], String:sMessage[MAXLENGTH_INPUT];
        new 
clientHandle:recipients CreateArray();
        if (
g_bSayText2)
        {
            
client ReadPackCell(pack);
            new 
numClientsStart ReadPackCell(pack);
            new 
numClientsFinish;
            new 
clients[numClientsStart];

            for (new 
0numClientsStartx++)
            {
                new 
buffer ReadPackCell(pack);
                if (
IsValidClient(buffer))
                {
                    
clients[numClientsFinish++] = buffer;
                    
PushArrayCell(recipientsbuffer);
                }
            }
            
            new 
bool:bChat bool:ReadPackCell(pack);
            
decl String:sChatType[32];
            
ReadPackString(packsChatTypesizeof(sChatType));
            
ReadPackString(packsSenderNamesizeof(sSenderName));
            
ReadPackString(packsMessagesizeof(sMessage));
            
            
decl String:sTranslation[MAXLENGTH_MESSAGE];
            
Format(sTranslationsizeof(sTranslation), "%t"sChatTypesSenderNamesMessage);
            
            new 
Handle:bf StartMessage("SayText2"clientsnumClientsFinishUSERMSG_RELIABLE USERMSG_BLOCKHOOKS);
            
            if (
ReadPackCell(pack))
            {
                
PbSetInt(bf"ent_idx"client);
                
PbSetBool(bf"chat"bChat);

                
PbSetString(bf"msg_name"sTranslation);
                
PbAddString(bf"params""");
                
PbAddString(bf"params""");
                
PbAddString(bf"params""");
                
PbAddString(bf"params""");
            }
            else
            {
                
BfWriteByte(bfclient);
                
BfWriteByte(bfbChat);
                
BfWriteString(bfsTranslation);
            }
            
EndMessage();
        }
        else
        {
            
client ReadPackCell(pack);
            new 
numClientsStart ReadPackCell(pack);
            new 
numClientsFinish;
            new 
clients[numClientsStart];

            for (new 
0numClientsStartx++)
            {
                new 
buffer ReadPackCell(pack);
                if (
IsValidClient(buffer))
                {
                    
clients[numClientsFinish++] = buffer;
                    
PushArrayCell(recipientsbuffer);
                }
            }
            
            
decl String:sPrefix[MAXLENGTH_NAME];
            
ReadPackString(packsPrefixsizeof(sPrefix));
            
ReadPackString(packsSenderNamesizeof(sSenderName));
            
ReadPackString(packsMessagesizeof(sMessage));
            
            
decl String:message[MAXLENGTH_MESSAGE];
            
            new 
teamColor;
            switch (
GetClientTeam(client))
            {
                case 
01teamColor 0xCCCCCC;
                case 
2teamColor 0x4D7942;
                case 
3teamColor 0xFF4040;
            }
            
            
decl String:buffer[32];
            
Format(buffersizeof(buffer), "\x07%06X"teamColor);
            
ReplaceString(sSenderNamesizeof(sSenderName), "\x03"buffer);
            
ReplaceString(sMessagesizeof(sMessage), "\x03"buffer);
            
            
Format(messagesizeof(message), "\x01%s%s\x01: %s"sPrefixsSenderNamesMessage);
            
PrintToServer(message);
            
            for (new 
0numClientsFinishj++)
            {
                
PrintToChat(clients[j], "%s"message);
            }
        }
        
        
g_CurrentChatType ReadPackCell(pack);
        
Call_StartForward(g_fwdOnChatMessagePost);
        
Call_PushCell(client);
        
Call_PushCell(recipients);
        
Call_PushString(sSenderName);
        
Call_PushString(sMessage);
        
Call_Finish();
        
g_CurrentChatType CHATFLAGS_INVALID;
        
        
        
CloseHandle(recipients);
        
CloseHandle(pack);

        
RemoveFromArray(g_hDPArrayi);
    }
}

public 
Native_GetMessageFlags(Handle:pluginnumParams)
{
    return 
g_CurrentChatType;
}

stock bool:IsValidClient(clientbool:nobots true
{  
    if (
client <= || client MaxClients || !IsClientConnected(client) || (nobots && IsFakeClient(client))) 
    {  
            return 
false;  
    }  
    return 
IsClientInGame(client);  
}

stock bool:GetChatFormats(const String:file[])
{
    new 
Handle:hParser SMC_CreateParser();
    new 
String:error[128];
    new 
line 0;
    new 
col 0;

    
SMC_SetReaders(hParserConfig_NewSectionConfig_KeyValueConfig_EndSection);
    
SMC_SetParseEnd(hParserConfig_End);
    new 
SMCError:result SMC_ParseFile(hParserfilelinecol);
    
CloseHandle(hParser);

    if (
result != SMCError_Okay
    {
        
SMC_GetErrorString(resulterrorsizeof(error));
        
LogError("%s on line %d, col %d of %s"errorlinecolfile);
    }
    
    return (
result == SMCError_Okay);
}

public 
SMCResult:Config_NewSection(Handle:parser, const String:section[], bool:quotes
{
    if (
StrEqual(section"Phrases"))
    {
        return 
SMCParse_Continue;
    }
    
ADDSTRING(section);
    return 
SMCParse_Continue;
}

public 
SMCResult:Config_KeyValue(Handle:parser, const String:key[], const String:value[], bool:key_quotesbool:value_quotes)
{
    return 
SMCParse_Continue;
}

public 
SMCResult:Config_EndSection(Handle:parser
{
    return 
SMCParse_Continue;
}

public 
Config_End(Handle:parserbool:haltedbool:failed
{
    
//nothing
}

stock eMods:GetCurrentMod()
{
    
decl String:sGameType[64];
    
GetGameFolderName(sGameTypesizeof(sGameType));
    
    if (
StrEqual(sGameType"aoc"false))
    {
        return 
GameType_AOC;
    }
    if (
StrEqual(sGameType"csgo"false))
    {
        return 
GameType_CSGO;
    }
    if (
StrEqual(sGameType"cstrike"false))
    {
        return 
GameType_CSS;
    }
    if (
StrEqual(sGameType"dod"false))
    {
        return 
GameType_DOD;
    }
    if (
StrEqual(sGameType"ff"false))
    {
        return 
GameType_FF;
    }
    if (
StrEqual(sGameType"hidden"false))
    {
        return 
GameType_HIDDEN;
    }
    if (
StrEqual(sGameType"hl2mp"false))
    {
        return 
GameType_HL2DM;
    }
    if (
StrEqual(sGameType"insurgency"false) || StrEqual(sGameType"ins"false))
    {
        return 
GameType_INS;
    }
    if (
StrEqual(sGameType"left4dead"false) || StrEqual(sGameType"l4d"false))
    {
        return 
GameType_L4D;
    }
    if (
StrEqual(sGameType"left4dead2"false) || StrEqual(sGameType"l4d2"false))
    {
        return 
GameType_L4D2;
    }
    if (
StrEqual(sGameType"nts"false))
    {
        return 
GameType_NEO;
    }
    if (
StrEqual(sGameType"sgtls"false))
    {
        return 
GameType_SGTLS;
    }
    if (
StrEqual(sGameType"tf"false))
    {
        return 
GameType_TF;
    }
    if (
StrEqual(sGameType"zps"false))
    {
        return 
GameType_ZPS;
    }
    if (
StrEqual(sGameType"mmdarkmessiah"false))
    {
        return 
GameType_DM;
    }
    
LogMessage("Unknown Game Folder: %s"sGameType);
    return 
GameType_Unknown;

Running SourceMod 1.8.0.5915
on a Linux Debian 8 Dediacted Machine.

Last edited by good_live; 08-02-2016 at 16:41.
good_live is offline
NewZi
Junior Member
Join Date: Jun 2016
Old 08-03-2016 , 10:58   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #198

Quote:
Originally Posted by shanapu View Post
For me (and many others) prefixes works well. Which version of simple-chatproccesor do you use?



The warden & zombie models are just example/placeholder models.
Everyone is free to choose his favorit model.
For Team Models use sm_skinchooser. Works well with MyJB.



It need changes to make it working in CS:GO?
For me, just push the plugin on server and ready to go, works well.
You can give me the version without mistakes?
NewZi is offline
NewZi
Junior Member
Join Date: Jun 2016
Old 08-03-2016 , 13:24   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #199

1)Where I can find the complete list of cvars?
2)How to change color of prefixes to green?
NewZi is offline
rsg
Member
Join Date: Apr 2011
Old 08-04-2016 , 10:20   Re: [CS:GO] MyJailbreak (warden, days, menu & more) [Beta 6.1 / 31-07-16]
Reply With Quote #200

Add please ct ban for admin.
rsg is offline
Send a message via Skype™ to rsg
Reply



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 17:24.


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