hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.08.17. 17:26



Jelenlévő felhasználók

Jelenleg 355 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 354 vendég

A legtöbb felhasználó (2883 fő) 2025.07.30. 16:00-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot]az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása Hozzászólás a témához  [50 hozzászólás ]  OldalElőző12345Következő
Szerző Üzenet
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:03 
Offline
Őstag
Avatar

Csatlakozott:2011.11.15. 16:29
Hozzászólások:1142
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 24 alkalommal
Én meg nem arról beszéltem :)
Kiki ezeknek az sma-ja van meg:
[spoiler]zp50_core.amxx


; APIs

amx_settings_api.amxx
cs_player_models_api.amxx
cs_teams_api.amxx
cs_maxspeed_api.amxx
cs_weap_models_api.amxx
cs_weap_restrict_api.amxx
cs_ham_bots_api.amxx


; Classes

zp50_class_zombie.amxx
zp50_class_human.amxx
zp50_class_nemesis.amxx
zp50_class_survivor.amxx


; Zombi FAJOK

zp50_class_zombie_classic.amxx
zp50_class_zombie_raptor.amxx
zp50_class_zombie_light.amxx
zp50_class_zombie_fat.amxx
zp50_class_zombie_leech.amxx
zp50_class_zombie_rage.amxx


; Ember FAJ

zp50_class_human_classic.amxx
;zp50_class_human_raptor.amxx


; This must come before game modes for armor protection to work properly
zp50_human_armor.amxx


; Game Modes Manager

zp50_gamemodes.amxx


; MODOK

zp50_gamemode_infection.amxx
zp50_gamemode_multi.amxx
zp50_gamemode_swarm.amxx
zp50_gamemode_nemesis.amxx
zp50_gamemode_survivor.amxx
zp50_gamemode_plague.amxx
zp50_gamemode_armageddon.amxx


; Items Manager

zp50_items.amxx
;zp50_items_money.amxx
zp50_items_ammopacks.amxx


; Extra cuccok

zp50_item_weapons.amxx
zp50_item_nightvision.amxx
zp50_item_antidote.amxx
zp50_item_zombie_madness.amxx
zp50_item_infection_bomb.amxx

; Admin

zp50_admin_commands.amxx
zp50_admin_menu.amxx
zp50_admin_models.amxx


; Buying

zp50_buy_menus.amxx
zp50_buy_zones.amxx


; Rewards

;zp50_rewards_money.amxx
zp50_rewards_ammopacks.amxx
zp50_rewards_frags_hp.amxx


; Deathmatch

zp50_deathmatch.amxx
zp50_random_spawn.amxx
zp50_spawn_protection.amxx


; Zombie/Human Features

zp50_zombie_features.amxx
zp50_zombie_sounds.amxx
zp50_zombie_damage.amxx
zp50_human_ammo.amxx


; Custom Features

zp50_flashlight.amxx
zp50_nightvision.amxx
zp50_leap.amxx
zp50_painshockfree.amxx
zp50_knockback.amxx
zp50_weapon_drop_strip.amxx


; Effects

zp50_effects_infect.amxx
zp50_effects_cure.amxx
zp50_effects_lighting.amxx
zp50_ambience_effects.amxx
;zp50_ambience_sounds.amxx


; Gameplay / Other

zp50_main_menu.amxx
zp50_objective_remover.amxx
zp50_gameplay_fixes.amxx
zp50_team_scoring.amxx
zp50_hud_info.amxx
zp50_serverbrowser_info.amxx
zp50_ammopacks.amxx


; GRANATOK

;zp50_grenade_flashbangs.amxx
zp50_grenade_fire.amxx
zp50_grenade_frost.amxx
zp50_grenade_flare.amxx


; ZP 4.3 Subplugin Compatibility

zp50_zp43_compat.amxx
;zp50_biohazard_compat.amxx[/spoiler]

_________________
[url=http://www.gametracker.com/server_info/188.227.227.114:27286/][img]http://cache.www.gametracker.com/server_info/188.227.227.114:27286/b_350_20_323957_202743_F19A15_111111.png[/img][/url]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:05 
Offline
Developer
Avatar

Csatlakozott:2011.06.01. 21:11
Hozzászólások:7966
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 537 alkalommal
zp50_core.amxx


Core = motorja

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:12 
Offline
Őstag
Avatar

Csatlakozott:2011.11.15. 16:29
Hozzászólások:1142
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 24 alkalommal
[spoiler]/*================================================================================

------------------------
-*- [ZP] Core/Engine -*-
------------------------

This plugin is part of Zombie Plague Mod and is distributed under the
terms of the GNU General Public License. Check ZP_ReadMe.txt for details.

================================================================================*/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <cs_ham_bots_api>
#include <zp50_core_const>

#define MAXPLAYERS 32

// Custom Forwards
enum _:TOTAL_FORWARDS
{
FW_USER_INFECT_PRE = 0,
FW_USER_INFECT,
FW_USER_INFECT_POST,
FW_USER_CURE_PRE,
FW_USER_CURE,
FW_USER_CURE_POST,
FW_USER_LAST_ZOMBIE,
FW_USER_LAST_HUMAN,
FW_USER_SPAWN_POST
}

#define flag_get(%1,%2) (%1 & (1 << (%2 & 31)))
#define flag_get_boolean(%1,%2) (flag_get(%1,%2) ? true : false)
#define flag_set(%1,%2) %1 |= (1 << (%2 & 31))
#define flag_unset(%1,%2) %1 &= ~(1 << (%2 & 31))

new g_MaxPlayers
new g_IsZombie
new g_IsFirstZombie
new g_IsLastZombie
new g_LastZombieForwardCalled
new g_IsLastHuman
new g_LastHumanForwardCalled
new g_RespawnAsZombie
new g_ForwardResult
new g_Forwards[TOTAL_FORWARDS]

public plugin_init()
{
register_plugin("[ZP] Core/Engine", ZP_VERSION_STRING, "ZP Dev Team")
register_dictionary("zombie_plague.txt")
register_dictionary("zombie_plague50.txt")

g_Forwards[FW_USER_INFECT_PRE] = CreateMultiForward("zp_fw_core_infect_pre", ET_CONTINUE, FP_CELL, FP_CELL)
g_Forwards[FW_USER_INFECT] = CreateMultiForward("zp_fw_core_infect", ET_IGNORE, FP_CELL, FP_CELL)
g_Forwards[FW_USER_INFECT_POST] = CreateMultiForward("zp_fw_core_infect_post", ET_IGNORE, FP_CELL, FP_CELL)

g_Forwards[FW_USER_CURE_PRE] = CreateMultiForward("zp_fw_core_cure_pre", ET_CONTINUE, FP_CELL, FP_CELL)
g_Forwards[FW_USER_CURE] = CreateMultiForward("zp_fw_core_cure", ET_IGNORE, FP_CELL, FP_CELL)
g_Forwards[FW_USER_CURE_POST] = CreateMultiForward("zp_fw_core_cure_post", ET_IGNORE, FP_CELL, FP_CELL)

g_Forwards[FW_USER_LAST_ZOMBIE] = CreateMultiForward("zp_fw_core_last_zombie", ET_IGNORE, FP_CELL)
g_Forwards[FW_USER_LAST_HUMAN] = CreateMultiForward("zp_fw_core_last_human", ET_IGNORE, FP_CELL)

g_Forwards[FW_USER_SPAWN_POST] = CreateMultiForward("zp_fw_core_spawn_post", ET_IGNORE, FP_CELL)

RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
RegisterHamBots(Ham_Spawn, "fw_PlayerSpawn_Post", 1)
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", 1)
RegisterHamBots(Ham_Killed, "fw_PlayerKilled_Post", 1)
register_forward(FM_ClientDisconnect, "fw_ClientDisconnect_Post", 1)

g_MaxPlayers = get_maxplayers()

// To help players find ZP servers
register_cvar("zp_version", ZP_VERSION_STR_LONG, FCVAR_SERVER|FCVAR_SPONLY)
set_cvar_string("zp_version", ZP_VERSION_STR_LONG)
}

public plugin_cfg()
{
// Get configs dir
new cfgdir[32]
get_configsdir(cfgdir, charsmax(cfgdir))

// Execute config file (zombieplague.cfg)
server_cmd("exec %s/zombieplague.cfg", cfgdir)
}

public plugin_natives()
{
register_library("zp50_core")
register_native("zp_core_is_zombie", "native_core_is_zombie")
register_native("zp_core_is_first_zombie", "native_core_is_first_zombie")
register_native("zp_core_is_last_zombie", "native_core_is_last_zombie")
register_native("zp_core_is_last_human", "native_core_is_last_human")
register_native("zp_core_get_zombie_count", "native_core_get_zombie_count")
register_native("zp_core_get_human_count", "native_core_get_human_count")
register_native("zp_core_infect", "native_core_infect")
register_native("zp_core_cure", "native_core_cure")
register_native("zp_core_force_infect", "native_core_force_infect")
register_native("zp_core_force_cure", "native_core_force_cure")
register_native("zp_core_respawn_as_zombie", "native_core_respawn_as_zombie")
}

public fw_ClientDisconnect_Post(id)
{
// Reset flags AFTER disconnect (to allow checking if the player was zombie before disconnecting)
flag_unset(g_IsZombie, id)
flag_unset(g_RespawnAsZombie, id)

// This should be called AFTER client disconnects (post forward)
CheckLastZombieHuman()
}

public fw_PlayerSpawn_Post(id)
{
// Not alive or didn't join a team yet
if (!is_user_alive(id) || !cs_get_user_team(id))
return;

// ZP Spawn Forward
ExecuteForward(g_Forwards[FW_USER_SPAWN_POST], g_ForwardResult, id)

// Set zombie/human attributes upon respawn
if (flag_get(g_RespawnAsZombie, id))
InfectPlayer(id, id)
else
CurePlayer(id)

// Reset flag afterwards
flag_unset(g_RespawnAsZombie, id)
}

// Ham Player Killed Post Forward
public fw_PlayerKilled_Post()
{
CheckLastZombieHuman()
}

InfectPlayer(id, attacker = 0)
{
ExecuteForward(g_Forwards[FW_USER_INFECT_PRE], g_ForwardResult, id, attacker)

// One or more plugins blocked infection
if (g_ForwardResult >= PLUGIN_HANDLED)
return;

ExecuteForward(g_Forwards[FW_USER_INFECT], g_ForwardResult, id, attacker)

flag_set(g_IsZombie, id)

if (GetZombieCount() == 1)
flag_set(g_IsFirstZombie, id)
else
flag_unset(g_IsFirstZombie, id)

ExecuteForward(g_Forwards[FW_USER_INFECT_POST], g_ForwardResult, id, attacker)

CheckLastZombieHuman()
}

CurePlayer(id, attacker = 0)
{
ExecuteForward(g_Forwards[FW_USER_CURE_PRE], g_ForwardResult, id, attacker)

// One or more plugins blocked cure
if (g_ForwardResult >= PLUGIN_HANDLED)
return;

ExecuteForward(g_Forwards[FW_USER_CURE], g_ForwardResult, id, attacker)

flag_unset(g_IsZombie, id)

ExecuteForward(g_Forwards[FW_USER_CURE_POST], g_ForwardResult, id, attacker)

CheckLastZombieHuman()
}

// Last Zombie/Human Check
CheckLastZombieHuman()
{
new id, last_zombie_id, last_human_id
new zombie_count = GetZombieCount()
new human_count = GetHumanCount()

if (zombie_count == 1)
{
for (id = 1; id <= g_MaxPlayers; id++)
{
// Last zombie
if (is_user_alive(id) && flag_get(g_IsZombie, id))
{
flag_set(g_IsLastZombie, id)
last_zombie_id = id
}
else
flag_unset(g_IsLastZombie, id)
}
}
else
{
g_LastZombieForwardCalled = false

for (id = 1; id <= g_MaxPlayers; id++)
flag_unset(g_IsLastZombie, id)
}

// Last zombie forward
if (last_zombie_id > 0 && !g_LastZombieForwardCalled)
{
ExecuteForward(g_Forwards[FW_USER_LAST_ZOMBIE], g_ForwardResult, last_zombie_id)
g_LastZombieForwardCalled = true
}

if (human_count == 1)
{
for (id = 1; id <= g_MaxPlayers; id++)
{
// Last human
if (is_user_alive(id) && !flag_get(g_IsZombie, id))
{
flag_set(g_IsLastHuman, id)
last_human_id = id
}
else
flag_unset(g_IsLastHuman, id)
}
}
else
{
g_LastHumanForwardCalled = false

for (id = 1; id <= g_MaxPlayers; id++)
flag_unset(g_IsLastHuman, id)
}

// Last human forward
if (last_human_id > 0 && !g_LastHumanForwardCalled)
{
ExecuteForward(g_Forwards[FW_USER_LAST_HUMAN], g_ForwardResult, last_human_id)
g_LastHumanForwardCalled = true
}
}

public native_core_is_zombie(plugin_id, num_params)
{
new id = get_param(1)

if (!is_user_connected(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return -1;
}

return flag_get_boolean(g_IsZombie, id);
}

public native_core_is_first_zombie(plugin_id, num_params)
{
new id = get_param(1)

if (!is_user_connected(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return -1;
}

return flag_get_boolean(g_IsFirstZombie, id);
}

public native_core_is_last_zombie(plugin_id, num_params)
{
new id = get_param(1)

if (!is_user_connected(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return -1;
}

return flag_get_boolean(g_IsLastZombie, id);
}

public native_core_is_last_human(plugin_id, num_params)
{
new id = get_param(1)

if (!is_user_connected(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return -1;
}

return flag_get_boolean(g_IsLastHuman, id);
}

public native_core_get_zombie_count(plugin_id, num_params)
{
return GetZombieCount();
}

public native_core_get_human_count(plugin_id, num_params)
{
return GetHumanCount();
}

public native_core_infect(plugin_id, num_params)
{
new id = get_param(1)

if (!is_user_alive(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return false;
}

if (flag_get(g_IsZombie, id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Player already infected (%d)", id)
return false;
}

new attacker = get_param(2)

if (attacker && !is_user_alive(attacker))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", attacker)
return false;
}

InfectPlayer(id, attacker)
return true;
}

public native_core_cure(plugin_id, num_params)
{
new id = get_param(1)

if (!is_user_alive(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return false;
}

if (!flag_get(g_IsZombie, id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Player not infected (%d)", id)
return false;
}

new attacker = get_param(2)

if (attacker && !is_user_alive(attacker))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", attacker)
return false;
}

CurePlayer(id, attacker)
return true;
}

public native_core_force_infect(plugin_id, num_params)
{
new id = get_param(1)

if (!is_user_alive(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return false;
}

InfectPlayer(id)
return true;
}

public native_core_force_cure(plugin_id, num_params)
{
new id = get_param(1)

if (!is_user_alive(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return false;
}

CurePlayer(id)
return true;
}

public native_core_respawn_as_zombie(plugin_id, num_params)
{
new id = get_param(1)

if (!is_user_connected(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return false;
}

new respawn_as_zombie = get_param(2)

if (respawn_as_zombie)
flag_set(g_RespawnAsZombie, id)
else
flag_unset(g_RespawnAsZombie, id)

return true;
}

// Get Zombie Count -returns alive zombies number-
GetZombieCount()
{
new iZombies, id

for (id = 1; id <= g_MaxPlayers; id++)
{
if (is_user_alive(id) && flag_get(g_IsZombie, id))
iZombies++
}

return iZombies;
}

// Get Human Count -returns alive humans number-
GetHumanCount()
{
new iHumans, id

for (id = 1; id <= g_MaxPlayers; id++)
{
if (is_user_alive(id) && !flag_get(g_IsZombie, id))
iHumans++
}

return iHumans;
}[/spoiler]

_________________
[url=http://www.gametracker.com/server_info/188.227.227.114:27286/][img]http://cache.www.gametracker.com/server_info/188.227.227.114:27286/b_350_20_323957_202743_F19A15_111111.png[/img][/url]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:17 
Offline
Developer
Avatar

Csatlakozott:2011.06.01. 21:11
Hozzászólások:7966
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 537 alkalommal
Hát mégsem, ebben csak a függvények regisztrálásai vannak:/

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:17 
Offline
Developer
Avatar

Csatlakozott:2011.06.01. 21:11
Hozzászólások:7966
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 537 alkalommal
Lehetséges a menü ebben lesz:

zp50_main_menu.amxx

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:22 
Offline
Őstag
Avatar

Csatlakozott:2011.11.15. 16:29
Hozzászólások:1142
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 24 alkalommal
[spoiler]/*================================================================================

----------------------
-*- [ZP] Main Menu -*-
----------------------

This plugin is part of Zombie Plague Mod and is distributed under the
terms of the GNU General Public License. Check ZP_ReadMe.txt for details.

================================================================================*/

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define LIBRARY_BUYMENUS "zp50_buy_menus"
#include <zp50_buy_menus>
#define LIBRARY_ZOMBIECLASSES "zp50_class_zombie"
#include <zp50_class_zombie>
#define LIBRARY_HUMANCLASSES "zp50_class_human"
#include <zp50_class_human>
#define LIBRARY_ITEMS "zp50_items"
#include <zp50_items>
#define LIBRARY_ADMIN_MENU "zp50_admin_menu"
#include <zp50_admin_menu>
#define LIBRARY_RANDOMSPAWN "zp50_random_spawn"
#include <zp50_random_spawn>
#include <zp50_colorchat>

#define TASK_WELCOMEMSG 100

// CS Player PData Offsets (win32)
const OFFSET_CSMENUCODE = 205

// Menu keys
const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0

#define flag_get(%1,%2) (%1 & (1 << (%2 & 31)))
#define flag_get_boolean(%1,%2) (flag_get(%1,%2) ? true : false)
#define flag_set(%1,%2) %1 |= (1 << (%2 & 31))
#define flag_unset(%1,%2) %1 &= ~(1 << (%2 & 31))

new g_ChooseTeamOverrideActive

new cvar_buy_custom_primary, cvar_buy_custom_secondary, cvar_buy_custom_grenades
new cvar_random_spawning

public plugin_init()
{
register_plugin("[ZP] Main Menu", ZP_VERSION_STRING, "ZP Dev Team")

register_event("HLTV", "event_round_start", "a", "1=0", "2=0")

register_clcmd("chooseteam", "clcmd_chooseteam")

register_clcmd("say /zpmenu", "clcmd_zpmenu")
register_clcmd("say zpmenu", "clcmd_zpmenu")

// Menus
register_menu("Main Menu", KEYSMENU, "menu_main")
}

public plugin_natives()
{
set_module_filter("module_filter")
set_native_filter("native_filter")
}
public module_filter(const module[])
{
if (equal(module, LIBRARY_BUYMENUS) || equal(module, LIBRARY_ZOMBIECLASSES) || equal(module, LIBRARY_HUMANCLASSES) || equal(module, LIBRARY_ITEMS) || equal(module, LIBRARY_ADMIN_MENU) || equal(module, LIBRARY_RANDOMSPAWN))
return PLUGIN_HANDLED;

return PLUGIN_CONTINUE;
}
public native_filter(const name[], index, trap)
{
if (!trap)
return PLUGIN_HANDLED;

return PLUGIN_CONTINUE;
}

public plugin_cfg()
{
cvar_buy_custom_primary = get_cvar_pointer("zp_buy_custom_primary")
cvar_buy_custom_secondary = get_cvar_pointer("zp_buy_custom_secondary")
cvar_buy_custom_grenades = get_cvar_pointer("zp_buy_custom_grenades")
cvar_random_spawning = get_cvar_pointer("zp_random_spawning_csdm")
}

// Event Round Start
public event_round_start()
{
// Show main menu message
remove_task(TASK_WELCOMEMSG)
set_task(2.0, "task_welcome_msg", TASK_WELCOMEMSG)
}

// Welcome Message Task
public task_welcome_msg()
{
zp_colored_print(0, "==== ^x04Zombie Plague %s^x01 ====", ZP_VERSION_STR_LONG)
zp_colored_print(0, "%L", LANG_PLAYER, "NOTICE_INFO1")
}

public clcmd_chooseteam(id)
{
if (flag_get(g_ChooseTeamOverrideActive, id))
{
show_menu_main(id)
return PLUGIN_HANDLED;
}

flag_set(g_ChooseTeamOverrideActive, id)
return PLUGIN_CONTINUE;
}

public clcmd_zpmenu(id)
{
show_menu_main(id)
}

public client_putinserver(id)
{
flag_set(g_ChooseTeamOverrideActive, id)
}

// Main Menu
show_menu_main(id)
{
static menu[250]
new len

// Title
len += formatex(menu[len], charsmax(menu) - len, "\yZombie Plague %s^n^n", ZP_VERSION_STR_LONG)

// 1. Buy menu
if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)
|| get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)) && is_user_alive(id))
len += formatex(menu[len], charsmax(menu) - len, "\r1.\w %L^n", id, "MENU_BUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d1. %L^n", id, "MENU_BUY")

// 2. Extra Items
if (LibraryExists(LIBRARY_ITEMS, LibType_Library) && is_user_alive(id))
len += formatex(menu[len], charsmax(menu) - len, "\r2.\w %L^n", id, "MENU_EXTRABUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d2. %L^n", id, "MENU_EXTRABUY")

// 3. Zombie class
if (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)
len += formatex(menu[len], charsmax(menu) - len, "\r3.\w %L^n", id, "MENU_ZCLASS")
else
len += formatex(menu[len], charsmax(menu) - len, "\d3. %L^n", id, "MENU_ZCLASS")

// 4. Human class
if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)
len += formatex(menu[len], charsmax(menu) - len, "\r4.\w %L^n", id, "MENU_HCLASS")
else
len += formatex(menu[len], charsmax(menu) - len, "\d4. %L^n", id, "MENU_HCLASS")

// 5. Unstuck
if (LibraryExists(LIBRARY_RANDOMSPAWN, LibType_Library) && is_user_alive(id))
len += formatex(menu[len], charsmax(menu) - len, "\r5.\w %L^n", id, "MENU_UNSTUCK")
else
len += formatex(menu[len], charsmax(menu) - len, "\d5. %L^n", id, "MENU_UNSTUCK")

// 6. Help
len += formatex(menu[len], charsmax(menu) - len, "\r6.\w %L^n^n", id, "MENU_INFO")

// 7. Choose Team
len += formatex(menu[len], charsmax(menu) - len, "\r7.\w %L^n^n", id, "MENU_CHOOSE_TEAM")

// 9. Admin menu
if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))
len += formatex(menu[len], charsmax(menu) - len, "\r9.\w %L", id, "MENU_ADMIN")
else
len += formatex(menu[len], charsmax(menu) - len, "\d9. %L", id, "MENU_ADMIN")

// 0. Exit
len += formatex(menu[len], charsmax(menu) - len, "^n^n\r0.\w %L", id, "MENU_EXIT")

// Fix for AMXX custom menus
set_pdata_int(id, OFFSET_CSMENUCODE, 0)
show_menu(id, KEYSMENU, menu, -1, "Main Menu")
}

// Main Menu
public menu_main(id, key)
{
// Player disconnected?
if (!is_user_connected(id))
return PLUGIN_HANDLED;

switch (key)
{
case 0: // Buy Menu
{
// Custom buy menus enabled?
if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)
|| get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)))
{
// Check whether the player is able to buy anything
if (is_user_alive(id))
zp_buy_menus_show(id)
else
zp_colored_print(id, "%L", id, "CANT_BUY_WEAPONS_DEAD")
}
else
zp_colored_print(id, "%L", id, "CUSTOM_BUY_DISABLED")
}
case 1: // Extra Items
{
// Items enabled?
if (LibraryExists(LIBRARY_ITEMS, LibType_Library))
{
// Check whether the player is able to buy anything
if (is_user_alive(id))
zp_items_show_menu(id)
else
zp_colored_print(id, "%L", id, "CANT_BUY_ITEMS_DEAD")
}
else
zp_colored_print(id, "%L", id, "CMD_NOT_EXTRAS")
}
case 2: // Zombie Classes
{
if (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)
zp_class_zombie_show_menu(id)
else
zp_colored_print(id, "%L", id, "CMD_NOT_ZCLASSES")
}
case 3: // Human Classes
{
if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)
zp_class_human_show_menu(id)
else
zp_colored_print(id, "%L", id, "CMD_NOT_HCLASSES")
}
case 4:
{
// Check if player is stuck
if (LibraryExists(LIBRARY_RANDOMSPAWN, LibType_Library) && is_user_alive(id))
{
if (is_player_stuck(id))
{
// Move to an initial spawn
if (get_pcvar_num(cvar_random_spawning))
zp_random_spawn_do(id, true) // random spawn (including CSDM)
else
zp_random_spawn_do(id, false) // regular spawn
}
else
zp_colored_print(id, "%L", id, "CMD_NOT_STUCK")
}
else
zp_colored_print(id, "%L", id, "CMD_NOT")
}
case 5: // Help Menu
{
show_help(id)
}
case 6: // Menu override
{
flag_unset(g_ChooseTeamOverrideActive, id)
client_cmd(id, "chooseteam")
}
case 8: // Admin Menu
{
if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))
zp_admin_menu_show(id)
else
zp_colored_print(id, "%L", id, "NO_ADMIN_MENU")
}
}

return PLUGIN_HANDLED;
}

// Help MOTD
show_help(id)
{
static motd[1024]
new len

len += formatex(motd[len], charsmax(motd) - len, "%L", id, "MOTD_INFO11", "Zombie Plague Mod", ZP_VERSION_STR_LONG, "ZP Dev Team")
len += formatex(motd[len], charsmax(motd) - len, "%L", id, "MOTD_INFO12")

show_motd(id, motd)
}

// Check if a player is stuck (credits to VEN)
stock is_player_stuck(id)
{
static Float:originF[3]
pev(id, pev_origin, originF)

engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0)

if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
return true;

return false;
}[/spoiler]

_________________
[url=http://www.gametracker.com/server_info/188.227.227.114:27286/][img]http://cache.www.gametracker.com/server_info/188.227.227.114:27286/b_350_20_323957_202743_F19A15_111111.png[/img][/url]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:27 
Offline
Developer
Avatar

Csatlakozott:2011.06.01. 21:11
Hozzászólások:7966
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 537 alkalommal
Olyan hogy help nincs, max az infot tudom kiszedni, amit motodbe hoz be:D

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:29 
Offline
Őstag
Avatar

Csatlakozott:2011.11.15. 16:29
Hozzászólások:1142
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 24 alkalommal
Jolvan a HELP menü annyira nem érdekel inkább az a másik kettő átírása , hogy magyar legyen
Vagy a HelP Helyére lézer bindelése bind x +setlaser -re !!! :)

_________________
[url=http://www.gametracker.com/server_info/188.227.227.114:27286/][img]http://cache.www.gametracker.com/server_info/188.227.227.114:27286/b_350_20_323957_202743_F19A15_111111.png[/img][/url]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:34 
Offline
Őskövület
Avatar

Csatlakozott:2011.09.17. 17:54
Hozzászólások:2350
Megköszönt másnak: 40 alkalommal
Megköszönték neki: 57 alkalommal
Hát azt úgyvélem a txt-ben kell átírni.(A Choose Team,Choose Human Class-t)


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hol bírom ?!
HozzászólásElküldve:2012.01.14. 19:35 
Offline
Developer
Avatar

Csatlakozott:2011.06.01. 21:11
Hozzászólások:7966
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 537 alkalommal
NA a helpet átírta makkor, a lang fájlba írd bele ezeket:

SIKERES_BIND = Bindeles megtortent, xel tudsz lerakni lezert!
MENU_BIND = Lezer bindelese X-re

Sma:
Kód:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define LIBRARY_BUYMENUS "zp50_buy_menus"
#include <zp50_buy_menus>
#define LIBRARY_ZOMBIECLASSES "zp50_class_zombie"
#include <zp50_class_zombie>
#define LIBRARY_HUMANCLASSES "zp50_class_human"
#include <zp50_class_human>
#define LIBRARY_ITEMS "zp50_items"
#include <zp50_items>
#define LIBRARY_ADMIN_MENU "zp50_admin_menu"
#include <zp50_admin_menu>
#define LIBRARY_RANDOMSPAWN "zp50_random_spawn"
#include <zp50_random_spawn>
#include <zp50_colorchat>

#define TASK_WELCOMEMSG 100

// CS Player PData Offsets (win32)
const OFFSET_CSMENUCODE = 205

// Menu keys
const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0

#define flag_get(%1,%2) (%1 & (1 << (%2 & 31)))
#define flag_get_boolean(%1,%2) (flag_get(%1,%2) ? true : false)
#define flag_set(%1,%2) %1 |= (1 << (%2 & 31))
#define flag_unset(%1,%2) %1 &= ~(1 << (%2 & 31))

new g_ChooseTeamOverrideActive

new cvar_buy_custom_primary, cvar_buy_custom_secondary, cvar_buy_custom_grenades
new cvar_random_spawning

public plugin_init()
{
register_plugin("[ZP] Main Menu", ZP_VERSION_STRING, "ZP Dev Team")

register_event("HLTV", "event_round_start", "a", "1=0", "2=0")

register_clcmd("chooseteam", "clcmd_chooseteam")

register_clcmd("say /zpmenu", "clcmd_zpmenu")
register_clcmd("say zpmenu", "clcmd_zpmenu")

// Menus
register_menu("Main Menu", KEYSMENU, "menu_main")
}

public plugin_natives()
{
set_module_filter("module_filter")
set_native_filter("native_filter")
}
public module_filter(const module[])
{
if (equal(module, LIBRARY_BUYMENUS) || equal(module, LIBRARY_ZOMBIECLASSES) || equal(module, LIBRARY_HUMANCLASSES) || equal(module, LIBRARY_ITEMS) || equal(module, LIBRARY_ADMIN_MENU) || equal(module, LIBRARY_RANDOMSPAWN))
return PLUGIN_HANDLED;

return PLUGIN_CONTINUE;
}
public native_filter(const name[], index, trap)
{
if (!trap)
return PLUGIN_HANDLED;

return PLUGIN_CONTINUE;
}

public plugin_cfg()
{
cvar_buy_custom_primary = get_cvar_pointer("zp_buy_custom_primary")
cvar_buy_custom_secondary = get_cvar_pointer("zp_buy_custom_secondary")
cvar_buy_custom_grenades = get_cvar_pointer("zp_buy_custom_grenades")
cvar_random_spawning = get_cvar_pointer("zp_random_spawning_csdm")
}

// Event Round Start
public event_round_start()
{
// Show main menu message
remove_task(TASK_WELCOMEMSG)
set_task(2.0, "task_welcome_msg", TASK_WELCOMEMSG)
}

// Welcome Message Task
public task_welcome_msg()
{
zp_colored_print(0, "==== ^x04Zombie Plague %s^x01 ====", ZP_VERSION_STR_LONG)
zp_colored_print(0, "%L", LANG_PLAYER, "NOTICE_INFO1")
}

public clcmd_chooseteam(id)
{
if (flag_get(g_ChooseTeamOverrideActive, id))
{
show_menu_main(id)
return PLUGIN_HANDLED;
}

flag_set(g_ChooseTeamOverrideActive, id)
return PLUGIN_CONTINUE;
}

public clcmd_zpmenu(id)
{
show_menu_main(id)
}

public client_putinserver(id)
{
flag_set(g_ChooseTeamOverrideActive, id)
}

// Main Menu
show_menu_main(id)
{
static menu[250]
new len

// Title
len += formatex(menu[len], charsmax(menu) - len, "\yZombie Plague %s^n^n", ZP_VERSION_STR_LONG)

// 1. Buy menu
if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)
|| get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)) && is_user_alive(id))
len += formatex(menu[len], charsmax(menu) - len, "\r1.\w %L^n", id, "MENU_BUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d1. %L^n", id, "MENU_BUY")

// 2. Extra Items
if (LibraryExists(LIBRARY_ITEMS, LibType_Library) && is_user_alive(id))
len += formatex(menu[len], charsmax(menu) - len, "\r2.\w %L^n", id, "MENU_EXTRABUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d2. %L^n", id, "MENU_EXTRABUY")

// 3. Zombie class
if (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)
len += formatex(menu[len], charsmax(menu) - len, "\r3.\w %L^n", id, "MENU_ZCLASS")
else
len += formatex(menu[len], charsmax(menu) - len, "\d3. %L^n", id, "MENU_ZCLASS")

// 4. Human class
if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)
len += formatex(menu[len], charsmax(menu) - len, "\r4.\w %L^n", id, "MENU_HCLASS")
else
len += formatex(menu[len], charsmax(menu) - len, "\d4. %L^n", id, "MENU_HCLASS")

// 5. Unstuck
if (LibraryExists(LIBRARY_RANDOMSPAWN, LibType_Library) && is_user_alive(id))
len += formatex(menu[len], charsmax(menu) - len, "\r5.\w %L^n", id, "MENU_UNSTUCK")
else
len += formatex(menu[len], charsmax(menu) - len, "\d5. %L^n", id, "MENU_UNSTUCK")

// 6. Help
len += formatex(menu[len], charsmax(menu) - len, "\r6.\w %L^n^n", id, "MENU_BIND")

// 7. Choose Team
len += formatex(menu[len], charsmax(menu) - len, "\r7.\w %L^n^n", id, "MENU_CHOOSE_TEAM")

// 9. Admin menu
if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))
len += formatex(menu[len], charsmax(menu) - len, "\r9.\w %L", id, "MENU_ADMIN")
else
len += formatex(menu[len], charsmax(menu) - len, "\d9. %L", id, "MENU_ADMIN")

// 0. Exit
len += formatex(menu[len], charsmax(menu) - len, "^n^n\r0.\w %L", id, "MENU_EXIT")

// Fix for AMXX custom menus
set_pdata_int(id, OFFSET_CSMENUCODE, 0)
show_menu(id, KEYSMENU, menu, -1, "Main Menu")
}

// Main Menu
public menu_main(id, key)
{
// Player disconnected?
if (!is_user_connected(id))
return PLUGIN_HANDLED;

switch (key)
{
case 0: // Buy Menu
{
// Custom buy menus enabled?
if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)
|| get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)))
{
// Check whether the player is able to buy anything
if (is_user_alive(id))
zp_buy_menus_show(id)
else
zp_colored_print(id, "%L", id, "CANT_BUY_WEAPONS_DEAD")
}
else
zp_colored_print(id, "%L", id, "CUSTOM_BUY_DISABLED")
}
case 1: // Extra Items
{
// Items enabled?
if (LibraryExists(LIBRARY_ITEMS, LibType_Library))
{
// Check whether the player is able to buy anything
if (is_user_alive(id))
zp_items_show_menu(id)
else
zp_colored_print(id, "%L", id, "CANT_BUY_ITEMS_DEAD")
}
else
zp_colored_print(id, "%L", id, "CMD_NOT_EXTRAS")
}
case 2: // Zombie Classes
{
if (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)
zp_class_zombie_show_menu(id)
else
zp_colored_print(id, "%L", id, "CMD_NOT_ZCLASSES")
}
case 3: // Human Classes
{
if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)
zp_class_human_show_menu(id)
else
zp_colored_print(id, "%L", id, "CMD_NOT_HCLASSES")
}
case 4:
{
// Check if player is stuck
if (LibraryExists(LIBRARY_RANDOMSPAWN, LibType_Library) && is_user_alive(id))
{
if (is_player_stuck(id))
{
// Move to an initial spawn
if (get_pcvar_num(cvar_random_spawning))
zp_random_spawn_do(id, true) // random spawn (including CSDM)
else
zp_random_spawn_do(id, false) // regular spawn
}
else
zp_colored_print(id, "%L", id, "CMD_NOT_STUCK")
}
else
zp_colored_print(id, "%L", id, "CMD_NOT")
}
case 5: // Help Menu
{
zp_colored_print(id, "%L", id, "SIKERES_BIND")
client_cmd(id, "bind x +setlaser")
}
case 6: // Menu override
{
flag_unset(g_ChooseTeamOverrideActive, id)
client_cmd(id, "chooseteam")
}
case 8: // Admin Menu
{
if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))
zp_admin_menu_show(id)
else
zp_colored_print(id, "%L", id, "NO_ADMIN_MENU")
}
}

return PLUGIN_HANDLED;
}

// Check if a player is stuck (credits to VEN)
stock is_player_stuck(id)
{
static Float:originF[3]
pev(id, pev_origin, originF)

engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0)

if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
return true;

return false;
}


A másik kettőt szintén a lang fájlba kell átírni:)

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése: Rendezés 
Új téma nyitása Hozzászólás a témához  [50 hozzászólás ]  OldalElőző12345Következő


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 14 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole