помогите плз сделать чтобы аммо было всегда на руках или дайте уже готовый плагин(чтобы сохранял не в базу данных) zp_bank.sma: [spoiler] #include <amxmodx> #include <nvault> #include <zombieplague>
// 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); }
checkmax(id) { if (bankstorage[id] > get_pcvar_num(pcvars[cap])) bankstorage[id] = get_pcvar_num(pcvars[cap]); else if (bankstorage[id] < 0) bankstorage[id] = 0; }
// Colored chat print by MeRcyLeZZ zp_colored_print(target, const message[], any:...) { static buffer[512], i, argscount argscount = numargs()
// Send to everyone if (!target) { static player for (player = 1; player <= get_maxplayers(); player++) { // Not connected if (!is_user_connected(player)) continue;
// Replace LANG_PLAYER with player id for (i = 2; i < argscount; i++) { if (getarg(i) == LANG_PLAYER) { setarg(i, 0, player) changed[changedcount] = i changedcount++ } }
// Format message for player vformat(buffer, charsmax(buffer), message, 3)
// Send it message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player) write_byte(player) write_string(buffer) message_end()
// Replace back player id's with LANG_PLAYER for (i = 0; i < changedcount; i++) setarg(changed[i], 0, LANG_PLAYER) } } // Send to specific target else { // Format message for player vformat(buffer, charsmax(buffer), message, 3)
stock cmd_target(id,const arg[],flags = CMDTARGET_OBEY_IMMUNITY) { new player = find_player("bl",arg); if (player) { if ( player != find_player("blj",arg) ) { #if defined AMXMOD_BCOMPAT console_print(id, SIMPLE_T("There are more clients matching to your argument")); #else console_print(id,"%L",id,"MORE_CL_MATCHT"); #endif return 0; } } else if ( ( player = find_player("c",arg) )==0 && arg[0]=='#' && arg[1] ) { player = find_player("k",str_to_num(arg[1])); } if (!player) { #if defined AMXMOD_BCOMPAT console_print(id, SIMPLE_T("Client with that name or userid not found")); #else console_print(id,"%L",id,"CL_NOT_FOUND"); #endif return 0; } if (flags & CMDTARGET_OBEY_IMMUNITY) { if ((get_user_flags(player) & ADMIN_IMMUNITY) && ((flags & CMDTARGET_ALLOW_SELF) ? (id != player) : true) ) { new imname[32]; get_user_name(player,imname,31); #if defined AMXMOD_BCOMPAT console_print(id, SIMPLE_T("Client ^"%s^" has immunity"), imname); #else console_print(id,"%L",id,"CLIENT_IMM",imname); #endif return 0; } } if (flags & CMDTARGET_ONLY_ALIVE) { if (!is_user_alive(player)) { new imname[32]; get_user_name(player,imname,31); #if defined AMXMOD_BCOMPAT console_print(id, SIMPLE_T("That action can't be performed on dead client ^"%s^""), imname); #else console_print(id,"%L",id,"CANT_PERF_DEAD",imname); #endif return 0; } } if (flags & CMDTARGET_NO_BOTS) { if (is_user_bot(player)) { new imname[32]; get_user_name(player,imname,31); #if defined AMXMOD_BCOMPAT console_print(id, SIMPLE_T("That action can't be performed on bot ^"%s^""), imname); #else console_print(id,"%L",id,"CANT_PERF_BOT",imname); #endif return 0; } } return player; }
[quote=clvet]помогите плз сделать чтобы аммо было всегда на руках или дайте уже готовый плагин (чтобы сохранял не в базу данных) [/quote] Точнее!
Добавлено (2011-07-09, 03:45) --------------------------------------------- CLVET, изъясни точнее просьбу и залей свой исходник на Deposite file, ссылку мне скинь!