02/01/2014, 01:41 AM (Última modificación: 02/01/2014, 01:44 AM por acesino25.)
Hola... como estan : ) para que de antemano no me digan "VAGO" o "HOLGAZÁN" eh estado buscando hasta del mismo creador del MOD respuestas pero no las eh hayado acerca de como agregar un arma nueva a la CATEGORIA "E" de armas especiales con 10 resets en mi caso ENCONTRE ESTO http://www.gaminga.com/foros/plugins-and...leans.html "No quiero hacer spam solo comparto para que vean que busque" pero sigo sin entender es decir, yo mucho de pawn no se solo consigo el sma lo comparo con algunos otros que modifique muchas veces tengo que pasarmela dias buscando una solucion buscando informacion pero esta vez no pude queria adaptar esta arma: https://forums.alliedmods.net/showthread.php?t=149025 (DEJE EL SMA PARA DESCARGAR)
en mi MOD Zombie pero la verdad no se como hubicarlo en cada parte : /
Ando en el cel pero vete a
show_menu_special
agrega el item luego vete a public menu_special y agrega un nuevo case creo que el 5 y pones buy_extraitem(elnumero, free) algo asi cuando este en la pc te muestro
Todos los MODS VHL totalmente gratuitosDescarga Aqui
(02/01/2014, 02:04 AM)Metrikcz escribió: Ando en el cel pero vete a
show_menu_special
agrega el item luego vete a public menu_special y agrega un nuevo case creo que el 5 y pones buy_extraitem(elnumero, free) algo asi cuando este en la pc te muestro
Claro pero eso seria creo y sin sonar ignorante QUE ME QUERES AYUDAR A AGREGAR UN EXTRA ITEM
Pero lo que realmente quiero es agregarlo al MENU DE ARMAS ZOMBIE POR LVLS.
// Player buys our upgrade, set the unlimited ammo flag public zp_extra_item_selected(player, itemid) { if (itemid == g_itemid_infammo) g_has_unlimited_clip[player] = true }
// Reset flags for all players on newround public event_round_start() { for (new id; id <= 32; id++) g_has_unlimited_clip[id] = false; }
// Unlimited clip code public message_cur_weapon(msg_id, msg_dest, msg_entity) { // Player doesn't have the unlimited clip upgrade if (!g_has_unlimited_clip[msg_entity]) return;
// Player not alive or not an active weapon if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1) return;
static weapon, clip weapon = get_msg_arg_int(2) // get weapon ID clip = get_msg_arg_int(3) // get weapon clip
// Unlimited Clip Ammo if (MAXCLIP[weapon] > 2) // skip grenades { set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon]) // HUD should show full clip all the time
if (clip < 2) // refill when clip is nearly empty { // Get the weapon entity static wname[32], weapon_ent get_weaponname(weapon, wname, sizeof wname - 1) weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
// Set max clip on weapon fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon]) } } }
// Find entity by its owner (from fakemeta_util) stock fm_find_ent_by_owner(entity, const classname[], owner) { while ((entity = engfunc(EngFunc_FindEntityByString, entity, "classname", classname)) && pev(entity, pev_owner) != owner) {}
return entity; }
// Set Weapon Clip Ammo stock fm_set_weapon_ammo(entity, amount) { set_pdata_int(entity, OFFSET_CLIPAMMO, amount, OFFSET_LINUX_WEAPONS); }
No lo he probado, pero compila, creo que si funcionará, lo que hice es seguir los pasos de ChileScripting como lo explica:
public zp_extra_item_selected(id, ITEM) { if(ITEM == gNewItem) // si el item seleccionado es el item gNewItem { static PlayerName[35] // crear variable 35 celdas get_user_name(id, PlayerName, charsmax(PlayerName)) // obtener nombre de id
entity_set_float(id, EV_FL_health, entity_get_float(id, EV_FL_health) + HPAMMOUNT) // damos health points a id entity_set_float(id, EV_FL_armorvalue, entity_get_float(id, EV_FL_armorvalue) + ARMORAMMOUNT) // armor
client_print(0, print_chat, "[ZA] %s ha comprado %s", PlayerName, NameItem) // print client_cmd(id, "spk items/smallmedkit1.wav") // play the sound (default sound half life) } }
// Player buys our upgrade, set the unlimited ammo flag public zp_extra_item_selected(player, itemid) { if (itemid == g_itemid_infammo) g_has_unlimited_clip[player] = true }
// Reset flags for all players on newround public event_round_start() { for (new id; id <= 32; id++) g_has_unlimited_clip[id] = false; }
// Unlimited clip code public message_cur_weapon(msg_id, msg_dest, msg_entity) { // Player doesn't have the unlimited clip upgrade if (!g_has_unlimited_clip[msg_entity]) return;
// Player not alive or not an active weapon if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1) return;
static weapon, clip weapon = get_msg_arg_int(2) // get weapon ID clip = get_msg_arg_int(3) // get weapon clip
// Unlimited Clip Ammo if (MAXCLIP[weapon] > 2) // skip grenades { set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon]) // HUD should show full clip all the time
if (clip < 2) // refill when clip is nearly empty { // Get the weapon entity static wname[32], weapon_ent get_weaponname(weapon, wname, sizeof wname - 1) weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
// Set max clip on weapon fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon]) } } }
// Find entity by its owner (from fakemeta_util) stock fm_find_ent_by_owner(entity, const classname[], owner) { while ((entity = engfunc(EngFunc_FindEntityByString, entity, "classname", classname)) && pev(entity, pev_owner) != owner) {}
return entity; }
// Set Weapon Clip Ammo stock fm_set_weapon_ammo(entity, amount) { set_pdata_int(entity, OFFSET_CLIPAMMO, amount, OFFSET_LINUX_WEAPONS); }
No lo he probado, pero compila, creo que si funcionará, lo que hice es seguir los pasos de ChileScripting como lo explica:
public zp_extra_item_selected(id, ITEM) { if(ITEM == gNewItem) // si el item seleccionado es el item gNewItem { static PlayerName[35] // crear variable 35 celdas get_user_name(id, PlayerName, charsmax(PlayerName)) // obtener nombre de id
entity_set_float(id, EV_FL_health, entity_get_float(id, EV_FL_health) + HPAMMOUNT) // damos health points a id entity_set_float(id, EV_FL_armorvalue, entity_get_float(id, EV_FL_armorvalue) + ARMORAMMOUNT) // armor
client_print(0, print_chat, "[ZA] %s ha comprado %s", PlayerName, NameItem) // print client_cmd(id, "spk items/smallmedkit1.wav") // play the sound (default sound half life) } }
Muchas gracias ._. te mataste haciendo la explicacion de adaptacion pero creo que aun no soy especifico : ( lo que yo queria es "Agregar el arma A EL MENU DE "ARMAS"" DE CATEGORIA "F" de mi zombieapocalypse.
De verdad creo que lo que hiciste le servira a cualquiera que busque por que yo aprendi a adaptar viendo otros plugins ya adaptados y con errores aunque ya luego me di cuenta de que baneado habia publicado como adaptarlo : P muchas gracias por tomarte tu tiempo para tratar de explicarme... SALUDOS
La verdad que yo tambien tengo ese problema osea yo añado las armas tal cuales como están en la categoria E pero entonces el arma me sale pero la elijo y no me sale nada y cuando le doy a m1 comprar armas me dice [ZA] Ya as comprado armas!
Entonces respondiendo tu tema yo conosco el dueño del mod esta en una comunidad de un server que utiliza su mod y la verdad que ese server tiene 50 reset cada 2 reset te desblokea una nueva categoria de armas unas congelan otras queman, mas daño, plasma, y daño x5 esas son las categorias si quieres contactalo aqui
[email protected] este es el correo del creador o contactalo aqui en el foro de la comunidad