Raised This Month: $99 Target: $400
 24% 

translate level mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cosminvl
Member
Join Date: Mar 2013
Location: Romania
Old 07-02-2019 , 16:20   translate level mod
Reply With Quote #1

it`s anyone can do translate for this plugins in ENGLISH
PHP Code:
#include <amxmodx>
#include <colorchat>
#include <nvault>
#include <amxmisc>
#include <hamsandwich>
#include <fun>
#include <cstrike>
 
#pragma semicolon 1
 
new gMaxPlayersiLevels[33], iKills[33], Levelsg_msg_screenfade;
new 
bool:bPrefixbool:bLogsbool:bHudgMenuiKNumiMaxbool:bFadeiLevHeiLevSlot;
new 
bool:bBuybool:bSelliPrice;
new const 
szgMenuItems[][] = { "Kupovina Levela""Prodaja Levela""\yLista igraca""\rInfo" };
new const 
gLogFile[] = "addons/amxmodx/configs/levels/LvlsAdmCmdsLogs.txt";
new const 
gDir[] = "addons/amxmodx/configs/levels/";
new const 
gUsersIni[] = "addons/amxmodx/configs/users.ini";
new const 
gSettingsFile[] = "addons/amxmodx/configs/levels/Settings.cfg";
new const 
gSettingsFileText[][] = {
        
"; U ovom fajlu su podesavanja plugina Levels v1.0",
        
"; ako nema dodatnih informacija o cvaru, 1 = ON | 0 = OFF^n ",
        
"levels_logs ^"1^" // da li da se loguju admin komande vezane za plugin",
        
"levels_num_to_next ^"5^" // na koliko killova se menja level (upisi broj)",
        
"levels_max_levels ^"5000^" // maksimalan broj levela",
        
"levels_chat_prefix ^"1^" // da li se na chatu ispisuje broj levela pre nicka",
        
"levels_hud_info ^"1^" // da li igraci imaju ispod radara broj levela i killova",
        
"levels_fade ^"1^" // da li ce se na prelasku na visi nivo na kratko vreme promeniti boja ekrana",
        
"levels_he_lvl_num ^"1000^" // stalna he bomba na spawnu posle odredjenog broja levela (upisi broj)",
        
"; da iskljucis stavi veci broj od levels_max_levels cvara",
        
"levels_slot_lvl_num ^"3000^" // dobijanje slota posle odredjenog broja levela (upisi broj)",
        
"; da iskljucis stavi veci broj od levels_max_levels cvara",
        
"levels_buy ^"1^" // da li je moguca kupovina levela",
        
"levels_sell ^"1^" // da li je moguca prodaja levela",
        
"levels_level_price ^"500^" // koliko kosta jedan level u prodavnici"
};
 
new const 
gLogFileText[][] = {
        
"U ovom fajlu nalaze se logovi admin komandi vezanih za Levels plugin",
        
"loguju se komande: amx_setlvl, amx_addlvl i amx_resetlvl",
        
"====================================================================^n "
};
 
enum Cvars {
        
LOGSKNUMMAXCHATHUD,
        
FADEHESLOTKUPOVINAPRODAJACENA
}
 
new const 
CvarsNames[Cvars][] = {
        
"levels_logs""levels_num_to_next""levels_max_levels""levels_chat_prefix""levels_hud_info",
        
"levels_fade""levels_he_lvl_num""levels_slot_lvl_num""levels_buy""levels_sell""levels_level_price"
};
 
new const 
CvarsAmmount[Cvars][] = {
        
"1""5""5000""1""1",
        
"1""1000""3000""1""1""500"
};
 
new 
pCvars[Cvars];
 
public 
plugin_init() {
        
register_plugin("Levels""1.0""dEfuseRsBS");
        
Levels nvault_open("Levels");
        
g_msg_screenfade get_user_msgid("ScreenFade");
        
RegisterHam(Ham_Spawn"player""fw_PlSpawn"1);
       
        for(new 
Cvars:LOGSCvarsi++)
                
pCvars[i] = register_cvar(CvarsNames[i], CvarsAmmount[i]);
               
        
register_cvar("Levels""1"FCVAR_SPONLY FCVAR_SERVER);
        
set_task(0.5"fw_CvarsCheck");
        
set_task(180.0"fw_CvarsCheck"___"b");
               
        
gMaxPlayers get_maxplayers();
        
register_event("DeathMsg""fw_Death""a");
       
        
register_concmd("amx_setlvl""fw_LvlSet"ADMIN_RCON"<nick> <num> - podesava level igracu");
        
register_concmd("amx_addlvl""fw_LvlAdd"ADMIN_RCON"<nick> <num> - dodaje levele igracu");
        
register_concmd("amx_resetlvl""fw_LvlReset"ADMIN_RCON"<nick> - resetuje igracu levele");
        
register_clcmd("say /levels""fw_LevelsCmd");
        
register_clcmd("KUPOVINA_LEVELA""fw_BuyLvl");
        
register_clcmd("PRODAJA_LEVELA""fw_SellLvl");
        
register_clcmd("say""fw_SayCmd");
       
        
gMenu menu_create("\rLevels Menu""h_gMenu");
        for(new 
0sizeof szgMenuItemsi++)
                
menu_additem(gMenuszgMenuItems[i]);
        
menu_addtext(gMenu"\dBy: dEfuse[R]s|-BS");
}
 
public 
plugin_precache() {
        if(!
dir_exists(gDir))
                
mkdir(gDir);
               
        if(!
file_exists(gLogFile))
                for(new 
0sizeof gLogFileTexti++)
                        
write_file(gLogFilegLogFileText[i]);
                       
        if(!
file_exists(gSettingsFile))
                for(new 
0sizeof gSettingsFileTextx++)
                        
write_file(gSettingsFilegSettingsFileText[x]);
                       
        
server_cmd("exec %s"gSettingsFile);
}
 
public 
fw_CvarsCheck() {
        if(
get_pcvar_num(pCvars[CHAT]) == 1)
                
bPrefix true;
        else 
bPrefix false;
        if(
get_pcvar_num(pCvars[LOGS]) == 1)
                
bLogs true;
        else 
bLogs false;
        if(
get_pcvar_num(pCvars[HUD]) == 1)
                
bHud true;
        else 
bHud false;
        if(
get_pcvar_num(pCvars[FADE]) == 1)
                
bFade true;
        else 
bFade false;
        if(
get_pcvar_num(pCvars[KUPOVINA]) == 1)
                
bBuy true;
        else 
bBuy false;
        if(
get_pcvar_num(pCvars[PRODAJA]) == 1)
                
bSell true;
        else 
bSell false;
        
iKNum get_pcvar_num(pCvars[KNUM]);
        
iMax get_pcvar_num(pCvars[MAX]);
        
iLevHe get_pcvar_num(pCvars[HE]);
        
iLevSlot get_pcvar_num(pCvars[SLOT]);
        
iPrice get_pcvar_num(pCvars[CENA]);
}
 
public 
fw_BuyLvl(id) {
        new 
szFArg[35], szText[255];
        
read_argv(1szFArgcharsmax(szFArg));
        new 
iFArg str_to_num(szFArg);
        if(
iFArg <= 0)
                
formatex(szTextcharsmax(szText), "Pogresan unos broja");
        else {
                new 
iUserMoney cs_get_user_money(id);
                new 
iCena iPrice iFArg;
                if(
iUserMoney iCena)
                        
formatex(szTextcharsmax(szText), "Nemas dovoljno novca za^3 %i^1 levela. Potrebno je^3 %i"iFArgiCena);
                else {
                        
iLevels[id] += iFArg;
                        
cs_set_user_money(idiUserMoney iCena);
                        
formatex(szTextcharsmax(szText), "Kupio si^3 %i^1 levela za^3 %i^1$"iFArgiCena);
                }
        }
        
ColorChat(idTEAM_COLOR"^4[Levels]^1 %s"szText);
}
 
public 
fw_SellLvl(id) {
        new 
szFArg[35], szText[255];
        
read_argv(1szFArgcharsmax(szFArg));
        new 
iFArg str_to_num(szFArg);
        if(
iFArg <= 0)
                
formatex(szTextcharsmax(szText), "Pogresan unos broja");
        else {
                if(
iLevels[id] < iFArg)
                        
formatex(szTextcharsmax(szText), "Nemas dovoljno levela, mozes da prodas najvise^3 %i^1 levela"iLevels[id]);
                else {
                        new 
iCena iPrice iFArg;
                        
iLevels[id] -= iFArg;
                        
cs_set_user_money(idcs_get_user_money(id) + iCena);
                        
formatex(szTextcharsmax(szText), "Prodao si^3 %i^1 levela za^3 %i^1$"iFArgiCena);
                }
        }
        
ColorChat(idTEAM_COLOR"^4[Levels]^1 %s"szText);
}
 
public 
fw_PlSpawn(id)
        if(
is_user_alive(id) && (iLevels[id] >= iLevHe))
                
give_item(id"weapon_hegrenade");
 
public 
fw_LevelsCmd(id)
        
menu_display(idgMenu);
 
public 
h_gMenu(idmenuitem) {
        switch(
item) {
                case 
MENU_EXIT: return PLUGIN_HANDLED;
                case 
0: {
                        if(!
bBuy)
                                
ColorChat(idTEAM_COLOR"^4[Levels]^1 Ovaj item je iskljucen");
                        else {
                                
client_cmd(id"messagemode KUPOVINA_LEVELA");
                                
ColorChat(idGREEN"[Levels] Ukucaj broj levela za kupovinu, cena jednog levela: %i"iPrice);
                        }
                }
                case 
1: {
                        if(!
bSell)
                                
ColorChat(idTEAM_COLOR"^4[Levels]^1 Ovaj item je iskljucen");
                        else {
                                
client_cmd(id"messagemode PRODAJA_LEVELA");
                                
ColorChat(idGREEN"[Levels] Ukucaj broj levela za prodaju, cena jednog levela: %i"iPrice);
                        }
                }
                case 
2: {
                        
set_hudmessage(25500, -1.00.4906.012.0);
                        
show_hudmessage(id"Pogledaj konzolu");
                        new 
numplayers[32], player;
                        
get_players(playersnum"a");
                        
console_print(id"=============================================");
                        
console_print(id" ^nLista igraca na serveru sa njihovim level-ima i kill-ovima ^n ");
                        for(new 
0numi++) {
                                
player players[i];
                                new 
szName[35];
                                
get_user_name(playerszNamecharsmax(szName));
                                
console_print(id"Igrac: %s | Levels: %i | Kills: %i"szNameiLevels[player], iKills[player]);
                        }
                        
console_print(id" ^n=============================================");
                }
                case 
3: {
                        
set_hudmessage(25500, -1.00.4906.012.0);
                        
show_hudmessage(id"Pogledaj konzolu");
                        
console_print(id"============================================= ^n ");
                        
console_print(id"Levels v1.0 by: dEfuse[R]s|-BS^n ");
                        
console_print(id"Posle %i kill-ova dobicete visi level"iKNum);
                        
console_print(id"Maksimalan broj levela je %i"iMax);
                        if(
bPrefix)
                                
console_print(id"Broj levela se ispisuje kao prefix komande say");
                        if(
bHud)
                                
console_print(id"Ispod radara je moguce videdi broj sopstvenih levela i kill-ova");
                        if(
bFade)
                                
console_print(id"Nakon predjenog nivoa ekran ce na kratko vreme promeniti boju");
                        if(
iLevHe <= iMax)
                                
console_print(id"Posle predjenog %i levela, svake runde igraci dobijaju He bombu"iLevHe);
                        if(
iLevSlot <= iMax)
                                
console_print(id"Posle predjenog %i levela, igrac dobija slot"iLevSlot);
                        
console_print(id" ");
                        
console_print(id"Admin komande: ^n ");
                        
console_print(id"amx_setlvl <nick> <num> - podesava igracu levele");
                        
console_print(id"amx_addlvl <nick> <num> - dodaje igracu levele");
                        
console_print(id"amx_resetlvl <nick> - resetuje igracu levele");
                        
console_print(id" ^n=============================================");
                }
        }
        return 
PLUGIN_HANDLED;
}
 
public 
fw_LvlSet(idlevelcid) {
        if(!
cmd_access(idlevelcid3))
                return 
PLUGIN_HANDLED;
        new 
szFArg[35], szSArg[16];
        
read_argv(1szFArgcharsmax(szFArg));
        
read_argv(2szSArgcharsmax(szSArg));
        new 
iNum str_to_num(szSArg);
        new 
gTarget cmd_target(idszFArgCMDTARGET_ALLOW_SELF CMDTARGET_NO_BOTS CMDTARGET_OBEY_IMMUNITY);
        if(!
is_user_connected(gTarget) || iNum iMax)
                return 
PLUGIN_HANDLED;
        new 
szPlName[35], szAdmName[35];
        
iLevels[gTarget] = iNum;
        
get_user_name(idszAdmNamecharsmax(szAdmName));
        
get_user_name(gTargetszPlNamecharsmax(szPlName));
        
ColorChat(idTEAM_COLOR"^4[Levels]^1 Podesio si igracu^3 %s^1 broj levela na^3 %s"szPlNameiNum);
        
ColorChat(gTargetTEAM_COLOR"^4[Levels]^1 Admin^3 %s^1 ti je podesio broj levela na^3 %s"szAdmNameiNum);
        if(
bLogs) {
                new 
szText[250];
                
formatex(szTextcharsmax(szText), "[amx_setlvl] Admin: %s | Igrac: %s | Levels: %i"szAdmNameszPlNameiNum);
                
write_file(gLogFileszText);
        }
        return 
PLUGIN_HANDLED;
}
 
public 
fw_LvlAdd(idlevelcid) {
        if(!
cmd_access(idlevelcid3))
                return 
PLUGIN_HANDLED;
        new 
szFArg[35], szSArg[16];
        
read_argv(1szFArgcharsmax(szFArg));
        
read_argv(2szSArgcharsmax(szSArg));
        new 
iNum str_to_num(szSArg);
        new 
gTarget cmd_target(idszFArgCMDTARGET_ALLOW_SELF CMDTARGET_NO_BOTS CMDTARGET_OBEY_IMMUNITY);
        if(!
is_user_connected(gTarget) || ((iLevels[gTarget] + iNum) > iMax))
                return 
PLUGIN_HANDLED;
        new 
szPlName[35], szAdmName[35];
        
iLevels[gTarget] += iNum;
        
get_user_name(idszAdmNamecharsmax(szAdmName));
        
get_user_name(gTargetszPlNamecharsmax(szPlName));
        
ColorChat(idTEAM_COLOR"^4[Levels]^1 Dodao si igracu^3 %s^4 %i^1 levela"szPlNameiNum);
        
ColorChat(gTargetTEAM_COLOR"^4[Levels]^1 Admin^3 %s^1 ti je dodao^3 %s^1 levela"szAdmNameiNum);
        if(
bLogs) {
                new 
szText[250];
                
formatex(szTextcharsmax(szText), "[amx_addlvl] Admin: %s | Igrac: %s | Levels: %i"szAdmNameszPlNameiNum);
                
write_file(gLogFileszText);
        }
        return 
PLUGIN_HANDLED;
}
 
public 
fw_LvlReset(idlevelcid) {
        if(!
cmd_access(idlevelcid2))
                return 
PLUGIN_HANDLED;
        new 
szFArg[35];
        
read_argv(1szFArgcharsmax(szFArg));
        new 
gTarget cmd_target(idszFArgCMDTARGET_ALLOW_SELF CMDTARGET_NO_BOTS CMDTARGET_OBEY_IMMUNITY);
        if(!
is_user_connected(gTarget))
                return 
PLUGIN_HANDLED;
        new 
szPlName[35], szAdmName[35];
        
iLevels[gTarget] = 0;
        
get_user_name(idszAdmNamecharsmax(szAdmName));
        
get_user_name(gTargetszPlNamecharsmax(szPlName));
        
ColorChat(idTEAM_COLOR"^4[Levels]^1 Resetovao si igracu^3 %s^1 levele"szPlName);
        
ColorChat(gTargetTEAM_COLOR"^4[Levels]^1 Admin^3 %s^1 ti je resetovao levele"szAdmName);
        if(
bLogs) {
                new 
szText[250];
                
formatex(szTextcharsmax(szText), "[amx_resetlvl] Admin: %s | Igrac: %s"szAdmNameszPlName);
                
write_file(gLogFileszText);
        }
        return 
PLUGIN_HANDLED;
}
 
 
public 
client_putinserver(id) {
        new 
szAuthID[35], szNum[55], leveli[30], kilovi[30], szIp[25];
        
get_user_ip(idszIpcharsmax(szIp));
        
get_user_authid(idszAuthIDcharsmax(szAuthID));
        if(
equal(szAuthID"VALVE_ID_LAN"))
                
nvault_get(LevelsszIpszNum101);
        else 
nvault_get(LevelsszAuthIDszNum101);
        
parse(szNumlevelicharsmax(leveli), kilovicharsmax(kilovi));
        
iLevels[id] = str_to_num(leveli);
        
iKills[id] = str_to_num(kilovi);
        
set_task(3.0"fw_HudInfo"id);
        if(
iLevels[id] >= iLevSlot) {
                new 
szText[225];
                if(!
equal(szAuthID"VALVE_ID_LAN"))
                        
formatex(szTextcharsmax(szText), "^"%s^" ^"^" ^"b^" ^"ce^""szAuthID);
                else 
formatex(szTextcharsmax(szText), "^"%s^" ^"^" ^"b^" ^"de^""szIp);
                
write_file(gUsersIniszText);
                
ColorChat(idTEAM_COLOR"^4[Levels]^1 Cestitamo, dobio si slot zbog predjenih^3 %i^1 levela"iLevSlot);
        }
        
set_task(3.5"fw_Add"id);
}
 
public 
fw_Add(id) {
        if(
is_user_connected(id)) {
                
set_hudmessage(0170255, -1.00.006.012.0);
                
show_hudmessage(id"Ovaj server koristi ^nLevels Plugin by: dEfuse[R]s|-BS");
        }
}
 
public 
fw_HudInfo(id) {
        if(
is_user_connected(id) && bHud) {
                
set_hudmessage(025500.020.1706.012.0);
                
show_hudmessage(id"[ Level: %i ] ^n[ Kills: %i / %i]"iLevels[id], iKills[id], iKNum);
                
set_task(5.0"fw_HudInfo"id);
        }
}
 
public 
client_disconnect(id) {
        new 
szAuthID[35], szNum[55];
        
get_user_authid(idszAuthIDcharsmax(szAuthID));
        
formatex(szNumcharsmax(szNum), "%i %i"iLevels[id], iKills[id]);
        if(
equal(szAuthID"VALVE_ID_LAN")) {
                new 
szIp[25];
                
get_user_ip(idszIpcharsmax(szIp));
                
nvault_set(LevelsszIpszNum);
        }
        else 
nvault_set(LevelsszAuthIDszNum);
}
 
public 
fw_Death() {
        new 
id read_data(1);
        if(
id <= gMaxPlayers) {
                if(
is_user_connected(id)) {
                        
iKills[id]++;
                        if(
iLevels[id] >= iMax)
                                return;
                        
set_hudmessage(25500, -1.00.6206.012.0);
                        if(
iKills[id] == iKNum) {
                                
iLevels[id]++;
                                
iKills[id] = 0;
                                
show_hudmessage(id"[ Presao si na level %i ]"iLevels[id]);
                                if(
bFade)
                                        
set_user_fade(id);
                        }
                        else 
show_hudmessage(id"[ %i / %i Kills ]"iKills[id], iKNum);
                }
        }
}
 
public 
fw_SayCmd(id) {
        if(
bPrefix) {
                new 
szName[33], szArgs[192], szPrefix[16];
                
get_user_name(idszNamecharsmax(szName));
                
read_args(szArgscharsmax(szArgs));
                
remove_quotes(szArgs);
                if(!
is_user_alive(id))
                        
szPrefix "*DEAD* ";
                
ColorChat(0TEAM_COLOR"^1%s^4[ Level: %i ]^3 %s^1 : %s"szPrefixiLevels[id], szNameszArgs);
                return 
PLUGIN_HANDLED;
        }
        return 
PLUGIN_CONTINUE;
}
 
stock set_user_fade(index) {
        
message_begin(MSG_ONE_UNRELIABLEg_msg_screenfade_index);
        
write_short((<< 12) * 1);
        
write_short(floatround((<< 12) * 0.1));
        
write_short(0x0000);
        
write_byte(0);
        
write_byte(255);
        
write_byte(255);
        
write_byte(150);
        
message_end();

__________________





Last edited by cosminvl; 07-02-2019 at 16:21.
cosminvl is offline
Send a message via Yahoo to cosminvl
thEsp
Veteran Member
Join Date: Aug 2017
Location: Gjilan, Albania
Old 07-02-2019 , 16:58   Re: translate level mod
Reply With Quote #2

Don't abuse with the community! This ain't plugin source translation section. I don't think anyone will completely translate it from Croatian to English.
__________________

thEsp is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-02-2019 , 17:06   Re: translate level mod
Reply With Quote #3

Quote:
Originally Posted by thEsp View Post
Don't abuse with the community! This ain't plugin source translation section. I don't think anyone will completely translate it from Croatian to English.
Why not? It's the translation section after all. There isn't much text either.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
cosminvl
Member
Join Date: Mar 2013
Location: Romania
Old 07-04-2019 , 16:40   Re: translate level mod
Reply With Quote #4

bump
__________________




cosminvl is offline
Send a message via Yahoo to cosminvl
Reply


Thread Tools
Display Modes

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 09:46.


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