/* ===============================================================================
* Replace Info Message 2.3 [19.07.2017]
* Modification by Javekson
* ============================================================================ */
#include <amxmodx>
#pragma semicolon 1
new Trie:g_tReplaceInfoMsg;
public plugin_init() {
register_plugin("Replace Info Message", "2.3", "maeStro aka 9iky6");
g_tReplaceInfoMsg = TrieCreate();
Fill_trie();
register_message(get_user_msgid("SayText"), "MessageSayText");
register_message(get_user_msgid("TextMsg"), "MessageTextMsg");
}
public Fill_trie() {
TrieSetString(g_tReplaceInfoMsg, "#Game_Commencing", "Jocul incepe");
TrieSetString(g_tReplaceInfoMsg, "#Game_will_restart_in", "Se reporneste jocul in %s secunde");
TrieSetString(g_tReplaceInfoMsg, "#CTs_Win", "Counter-Terrorists a invins");
TrieSetString(g_tReplaceInfoMsg, "#Terrorists_Win", "Terrorists a invins");
TrieSetString(g_tReplaceInfoMsg, "#Round_Draw", "Runda se incheie la egalitate");
TrieSetString(g_tReplaceInfoMsg, "#Target_Bombed", "Obiectivul a fost distrus");
TrieSetString(g_tReplaceInfoMsg, "#Target_Saved", "Obiectivul a fost salvat");
TrieSetString(g_tReplaceInfoMsg, "#Hostages_Not_Rescued", "Nu am putut salva ostaticii");
TrieSetString(g_tReplaceInfoMsg, "#All_Hostages_Rescued", "Toti ostaticii au fost salvati");
TrieSetString(g_tReplaceInfoMsg, "#VIP_Escaped", "Jucatorul VIP a fost salvat");
TrieSetString(g_tReplaceInfoMsg, "#VIP_Assassinated", "Jucatorul VIP a fost omorat");
TrieSetString(g_tReplaceInfoMsg, "#C4_Arming_Cancelled", "Bomba poate fi instalată numai în zona de instalare a bombei");
TrieSetString(g_tReplaceInfoMsg, "#C4_Plant_Must_Be_On_Ground", "Pentru a instala bomba trebuie sa fiti la sol");
TrieSetString(g_tReplaceInfoMsg, "#Defusing_Bomb_With_Defuse_Kit", "Dezamorsarea bombei cu defuse kit");
TrieSetString(g_tReplaceInfoMsg, "#Defusing_Bomb_Without_Defuse_Kit", "Dezamorsarea bombei fara defuse kit");
TrieSetString(g_tReplaceInfoMsg, "#Weapon_Cannot_Be_Dropped", "Nu poti arunca aceasta arma");
TrieSetString(g_tReplaceInfoMsg, "#C4_Plant_At_Bomb_Spot", "Bomba poate fi instalată numai în zona de instalare a bombei");
TrieSetString(g_tReplaceInfoMsg, "#Cannot_Carry_Anymore", "Nu puteti lua mai mult");
TrieSetString(g_tReplaceInfoMsg, "#Already_Have_Kevlar", "Aveti deja armura");
TrieSetString(g_tReplaceInfoMsg, "#Already_Have_Kevlar_Helmet", "Aveti deja armura si casca");
TrieSetString(g_tReplaceInfoMsg, "#Switch_To_BurstFire", "Treceti in modul burst fire");
TrieSetString(g_tReplaceInfoMsg, "#Switch_To_FullAuto", "Treceti in modul full auto");
TrieSetString(g_tReplaceInfoMsg, "#Switch_To_SemiAuto", "Treceti in modul semi auto");
TrieSetString(g_tReplaceInfoMsg, "#Already_Own_Weapon", "Ai deja aceasta arma");
TrieSetString(g_tReplaceInfoMsg, "#Command_Not_Available", "Aceasta actiune nu este disponibila in locatia dvs");
TrieSetString(g_tReplaceInfoMsg, "#Got_bomb", "Ai luat bomba");
TrieSetString(g_tReplaceInfoMsg, "#Game_bomb_pickup", "%s a luat bomba");
TrieSetString(g_tReplaceInfoMsg, "#Game_bomb_drop", "%s a aruncat bomba");
TrieSetString(g_tReplaceInfoMsg, "#Bomb_Planted", "Bomba a fost plantata");
TrieSetString(g_tReplaceInfoMsg, "#Bomb_Defused", "Bomba a fost dezamorsata");
TrieSetString(g_tReplaceInfoMsg, "#Cant_buy", "%s secunde au expirat deja.^rAchizitia arsenalului este interzisa");
TrieSetString(g_tReplaceInfoMsg, "#Name_change_at_respawn", "Numele tau va fi schimbat dupa urmatorul respawn");
TrieSetString(g_tReplaceInfoMsg, "#Auto_Team_Balance_Next_Round", "Auto Team Balance are loc in urmatoarea runda");
}
public MessageSayText() {
new szMsg[21];
get_msg_arg_string(2, szMsg, charsmax(szMsg));
if(equal(szMsg, "#Cstrike_Name_Change")) {
new szNewName[32], szOldName[32], szNewMessage[180];
get_msg_arg_string(3, szOldName, charsmax(szOldName));
get_msg_arg_string(4, szNewName, charsmax(szNewName));
formatex(szNewMessage, charsmax(szNewMessage), "^1Jucatorul ^3%s ^1si-a schimbat numele in ^3%s", szOldName, szNewName);
set_msg_arg_string(2, szNewMessage);
}
}
public MessageTextMsg() {
new szMsg[192], szArg3[32];
get_msg_arg_string(2, szMsg, charsmax(szMsg));
if(TrieGetString(g_tReplaceInfoMsg, szMsg, szMsg, charsmax(szMsg))) {
if(get_msg_args() > 2) {
get_msg_arg_string(3, szArg3, charsmax(szArg3));
replace(szMsg, charsmax(szMsg), "%s", szArg3);
}
set_msg_arg_string(2, szMsg);
}
}
public plugin_end() {
TrieDestroy(g_tReplaceInfoMsg);
}