Добрый день.Помогите пожалуйста перевести чат в банке с английского на русский, то есть когда вводишь bank, в чат всё пишется по английски,а нужно по русски. Перевести нужно очень все функции которые есть, то есть bank,deposit,withdraw и так далее..
Вот исходник:
Code
// ZP Bank - allows saving of ammo packs /* cvars
zp_bank 1 //<0/1> set whether plugin enabled or not zp_bank_limit 1000000 //maximium storage capacity of each person's account zp_bank_blockstart 1 //<0/1> set whether bank blocks zombie plague from giving the initial 5 ammo packs on start if user has an account
if ( get_pcvar_num(pcvars[cap]) > 2147483646 ) { set_pcvar_num(pcvars[cap], 2147483646); server_print("[%s] Due to a 32 bit restriction in perl zp_ammo_limit reset based on restriction", plugin); }
thinkobj = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")); if ( pev_valid(thinkobj) ) { set_pev(thinkobj, pev_classname, "advertisement_loop"); set_pev(thinkobj, pev_nextthink, get_gametime() + 240.0); register_forward(FM_Think, "fourmin_think"); } } public fourmin_think(ent) { if ( ent != thinkobj ) return FMRES_IGNORED;
if ( !get_pcvar_num(pcvars[enable]) ) return FMRES_IGNORED;
client_print(0, print_chat, "[%s]Enabled. %d is the storage limit", plugin, get_pcvar_num(pcvars[cap])); client_print(0, print_chat, "[%s] Currently Ammo packs are savable by typing ^"deposit <amount>^".", plugin); client_print(0, print_chat, "[%s] To retrieve your ammo packs type ^"withdraw <amount>^"", plugin);
// if the chat line has more than 2 words, we're not interested at all if (arg3[0] == 0) { //strip forward slash if present if ( equali(arg1, "/", 1) ) format(arg1, 31, arg1[1]);
if ( equali(arg1, "deposit", 7) || equali(arg1, "send", 4) || equali(arg1, "store", 5) ) { if ( isdigit(arg2[0]) || (arg2[0] == '-' && isdigit(arg2[1])) ) { new value = str_to_num(arg2); store_cash(id, value); return PLUGIN_HANDLED; } else if ( equali(arg2, "all") ) { store_cash(id, -1); return PLUGIN_HANDLED; } else if ( arg2[0] == 0 ) client_print(id, print_chat, "[%s] to deposit ammo packs in bank say deposit <amount to deposit>", plugin);
return PLUGIN_CONTINUE; } else if ( equali(arg1, "withdraw", 8) || equali(arg1, "take", 4) || equali(arg1, "retrieve", 8) ) { if ( isdigit(arg2[0]) || (arg2[0] == '-' && isdigit(arg2[1])) ) { new value = str_to_num(arg2); take_cash(id, value); return PLUGIN_HANDLED; } else if ( equali(arg2, "all") ) { take_cash(id, -1); return PLUGIN_HANDLED; } else if ( arg2[0] == 0 ) client_print(id, print_chat, "[%s] to withdraw ammo packs from bank say withdraw <amount to withdraw>", plugin);
return PLUGIN_CONTINUE; } else if ( equali(arg1, "mybank", 6) || equali(arg1, "account", 7) || equali(arg1, "bank", 4) ) { if ( arg2[0] == 0 ) { client_print(id, print_chat, "[%s] Currently your account has %d ammo packs in it",plugin, bankstorage[id]); return PLUGIN_HANDLED; } else { new player = cmd_target(id,arg2,2); if ( !player ) return PLUGIN_CONTINUE; client_print(id, print_chat, "[%s] %s has %d ammo packs", plugin, arg2, bankstorage[player]); return PLUGIN_HANDLED; } } } else if ( equali( arg1, "donate", 6 ) ) { give_cmd(id, arg2, arg3); return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } give_cmd(id, target[], amnt[]) { new temp = str_to_num(amnt); if ( temp < 0 ) { client_print(id, print_chat, "[%s] The ^"amount^" argument passed is negative, either overflowed or your trying to cheat", plugin ); return; } new player = cmd_target(id, target, 8); if ( !player ) return;
new temp2 = bankstorage[id] + zp_get_user_ammo_packs(id); if ( temp > temp2 ) { client_print(id, print_chat, "[%s] You don't have enough ammo packs to donate, you only have %d out of %d specified",plugin, temp2, temp);
return; } static playername[32], givename[32]; get_user_name(player, playername, 31); get_user_name(id, givename, 31); client_print(id, print_chat, "[%s] You just donated %d ammo packs to %s", plugin, temp, playername); client_print(player, print_chat, "[%s] %s just donated %d ammo packs to you", plugin, givename, temp); bankstorage[player] += temp; if ( bankstorage[id] > temp ) bankstorage[id] -= temp; else { temp -= bankstorage[id]; bankstorage[id] = 0; zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) - temp); } } //public zp_user_disconnect_pre(id) public client_disconnect(id) if ( bankstorage[id] > 0 ) save_data(id);
//public zp_user_connect_post(id) public client_connect(id) { bankstorage[id] = 0; //clear residual before loading retrieve_data(id); }
store_cash(id, amnt) { if ( !get_pcvar_num(pcvars[enable]) ) return;
if ( amnt == -1 ) { bankstorage[id] += zp_get_user_ammo_packs(id); zp_set_user_ammo_packs(id, 0); checkmax(id); } else if ( amnt > 0 ) { new temp = zp_get_user_ammo_packs(id); new limit = get_pcvar_num(pcvars[cap]); if ( temp >= amnt ) { if ( bankstorage[id] + amnt <= limit ) { bankstorage[id] += amnt zp_set_user_ammo_packs(id, temp - amnt); } else { new overflow = bankstorage[id] + amnt - limit; bankstorage[id] = limit; zp_set_user_ammo_packs(id, temp - amnt + overflow); client_print(id, print_chat, "[%s] Your bank account has reached it's maximium capacity of %d", plugin, limit); client_print(id, print_chat, "[%s] Only %d of the %d you specified to deposit has been deposited", plugin, amnt - overflow, amnt); } } else client_print(id, print_chat, "[%s] Amount specified(%d) is greater than current ammo pack count(%d)", plugin, amnt, temp); } else take_cash(id, -amnt); }
take_cash(id, amnt) { if ( !get_pcvar_num(pcvars[enable]) ) return;
if ( amnt == 0 ) return; //otherwise a non terminal loop is possible
if ( amnt == -1 ) { zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + bankstorage[id]) bankstorage[id] = 0; } else if ( amnt > 0 ) { if ( bankstorage[id] >= amnt ) { zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + amnt); bankstorage[id] -= amnt; } else { client_print(id, print_chat, "[%s] Amount specified(%d) is greater than whats in bank(%d)", plugin, amnt, bankstorage[id]); } } else store_cash(id, -amnt); }
save_data(id) { //new AuthID[35]; //get_user_authid(id,AuthID,34); new name[32] get_user_name(id, name, sizeof name -1) new vaultkey[40],vaultdata[13];
retrieve_data(id) { //new AuthID[35]; //get_user_authid(id,AuthID,34); new name[32] get_user_name(id, name, sizeof name -1) new vaultkey[40], vaultdata[13];
// If they have an account don't allow zombie mod to give them 5 ammo packs at beggining if ( get_pcvar_num(pcvars[start]) && bankstorage[id] > 0 ) zp_set_user_ammo_packs(id, 0); }
А что тут трудного перведи САМ!!!! Никто не поможет с такой емкой работой! Гугл перевод и вперед только кодировку поставь UTF8 http://war3ft-help.tk/ - форум поддержки war3ftmod
Okay, тогда есть проблемка,допустим я положил в банк 1000 аммо,лимит 1000. Перезахожу,снимаю 1000 с банка,опять перезахожу, а у меня в банке опять 1000,и на руках 1000 которую я снимал...