Всем привет подскажите пожалуйста как переделать плагины от zm? чтобы вещи покупались за деньги а не за ammo паки и как сделать чтобы этот плагин работал на простых серверах а не только на ZM СЕРВЕРАХ ??
вот сам код плагина
/* [ZP] Extra Item : Leap ( Ability for Zombies ) by Fry!
Description :
Ever wanted that if You are zombie jump longer? Now You can, for zombies are one special ability "Long Jump".
Cvars :
zp_longjump_force "550" - How far zombie will jump zp_longjump_height "255" - How high zombie will jump zp_longjump_cooldown "5.0" - How long cooldown will be before you can use long jump again zp_longjump_cost "9" - How much it will cost to you
Credits :
Locks - for his Long Jump Plugin bmann_420 - for helping again ^^ Mercylezz - for helping me with delay (thanks to him fixed one error and converted to fakemeta)
Changelog :
20/09/2008 - v1.0 - first release 25/09/2008 - v1.1 - fixed that plugin not working only ammo packs waste. 27/09/2008 - v1.2 - fixed that when have bought a jump pack it show to all players. 04/10/2008 - v1.3 - added delay between long jump, force and height. 08/10/2008 - v1.4 - fixed delay not working between jumps. 12/10/2008 - v1.5 - fixed this last error and converted all to fakemeta 15/11/2008 - v1.5.3 - added cvar how much it will cost, optimized code, changed plugin name. 20/02/2009 - v1.5.7 - removed toggle cvar, changed chat function, changed plugin name, optimized code.
new bool:g_hasLongJump[33] new Float:g_last_LongJump_time[33] new g_itemid_long, g_LongJump_cost, g_LongJump_force, g_LongJump_height, g_LongJump_cooldown
new g_item_name[] = "Long Jump"
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR)
// Reset on disconnection public client_disconnect(id) { g_hasLongJump[id] = false }
// Reset on death public death() { g_hasLongJump[read_data(2)] = false }
// Reset if turned into human public zp_user_humanized_post(id) { g_hasLongJump[id] = false }
// Reset at round start (for everyone) public event_round_start() { for (new i = 1; i <= 32; i++) g_hasLongJump[i] = false }
// Buy throught extra items menu public zp_extra_item_selected(player, itemid) { if (itemid == g_itemid_long) { g_hasLongJump[player] = true client_print(player, print_chat,"[ZP] You have bought a Jump Pack. To use it, press duck and jump while moving forward.") } }
// Buy through command "say /blj" public buy_longjump(id) { if ( g_hasLongJump[id] ) { client_print(id, print_chat, "[ZP] You have already purchased a jumppack.") return PLUGIN_HANDLED }
if ( !is_user_alive(id) ) { client_print(id, print_chat, "[ZP] You can't buy jumppack because You are dead.") return PLUGIN_HANDLED }
if ( !zp_get_user_zombie(id) ) { client_print(id, print_chat, "[ZP] You can't buy jumppack because You are not a zombie.") return PLUGIN_HANDLED }
new money = zp_get_user_ammo_packs(id) new cost = get_pcvar_num(g_LongJump_cost)
if ( money < cost ) { client_print(id, print_chat, "[ZP] You don't have enough ammo packs to buy a jumppack. (%i needed).", cost ) return PLUGIN_HANDLED }
g_hasLongJump[id] = true
zp_set_user_ammo_packs(id, money - cost)
client_print(id, print_chat, "[ZP] You have bought a Jump Pack. To use it, press duck and jump while moving forward.")
return PLUGIN_HANDLED }
public fw_PlayerPreThink(id) { if (!is_user_alive(id)) return FMRES_IGNORED
if (allow_LongJump(id)) { static Float:velocity[3] velocity_by_aim(id, get_pcvar_num(g_LongJump_force), velocity)
velocity[2] = get_pcvar_float(g_LongJump_height)
set_pev(id, pev_velocity, velocity)
g_last_LongJump_time[id] = get_gametime() }
return FMRES_IGNORED }
// Check if the player can longjump allow_LongJump(id) { if (!g_hasLongJump[id]) return false