PDA

View Full Version : [ZP] Extra item ghost


lashsh
06-12-2010, 01:09
#include <amxmodx>
#include <zombieplague>
#include <fun>

new g_itemid1

public plugin_init()
{
register_plugin("[ZP] Extra Item: Mochveneba", "0.1", "LaSsHhH")
g_itemid1 = zp_register_extra_item("Mochveneba", 133, ZP_TEAM_ANY)

}

public zp_extra_item_selected(player, itemid)
{
// check if the selected item matches any of our registered ones
if (itemid == g_itemid1)
client_print(player, print_chat, "[ZP] Tqven iyidet mochveneba!")
}

how to enable and where are they?

set_user_maxspeed(player, 400)
set_user_noclip(player, 1)

and this model

Oneshox
06-12-2010, 01:56
what do you want now?

lashsh
06-12-2010, 04:33
what do you want now?

http://forums.alliedmods.net/showpost.php?p=1206410&postcount=1

Oneshox
06-12-2010, 04:37
here:
#include <amxmodx>
#include <zombieplague>
#include <fun>

new g_item
new cvar_noclip, cvar_speed

public plugin_init()
{
register_plugin("[ZP] Extra Item: Mochveneba", "0.1", "LaSsHhH")
g_item = zp_register_extra_item("Mochveneba", 133, ZP_TEAM_ANY)

cvar_speed = register_cvar("zp_item_speed", "400") // here you can edit the max speed
cvar_noclip = register_cvar("zp_item_noclip", "1") // 1 - enable / 2 - disable

}

public zp_extra_item_selected(player, itemid)
{
if (itemid == g_item)
client_print(player, print_chat, "[ZP] Tqven iyidet mochveneba!")

set_user_maxspeed(player, get_user_maxspeed(player) + get_pcvar_num(cvar_speed))
set_user_noclip(player, get_pcvar_num(cvar_noclip))
}

lashsh
06-12-2010, 05:02
thanks.


Please model the

Oneshox
06-12-2010, 05:14
sorry, here
#include <amxmodx>
#include <zombieplague>
#include <cstrike>
#include <fun>

new const Model[] = { "models/player/yourmodel/yourmodel.mdl" }
new g_item
new cvar_noclip, cvar_speed

public plugin_init()
{
register_plugin("[ZP] Extra Item: Mochveneba", "0.1", "LaSsHhH")
g_item = zp_register_extra_item("Mochveneba", 133, ZP_TEAM_ANY)

cvar_speed = register_cvar("zp_item_speed", "400") // here you can edit the max speed
cvar_noclip = register_cvar("zp_item_noclip", "1") // 1 - enable / 2 - disable

}

public plugin_precache()
{
precache_model(Model);
}

public zp_extra_item_selected(player, itemid)
{
if (itemid == g_item)
client_print(player, print_chat, "[ZP] Tqven iyidet mochveneba!")

set_user_maxspeed(player, get_user_maxspeed(player) + get_pcvar_num(cvar_speed))
set_user_noclip(player, get_pcvar_num(cvar_noclip))

cs_set_user_model(player, Model)
}

lashsh
06-12-2010, 05:16
Thank you very much

Oneshox
06-12-2010, 05:24
does it work?

lashsh
06-12-2010, 05:38
Model does not work: ((

lashsh
06-12-2010, 05:40
#include <amxmodx>
#include <zombieplague>
#include <cstrike>
#include <fun>

new const Model[] = { "models/player/ghost/ghost.mdl" }
new g_item
new cvar_noclip, cvar_speed

public plugin_init()
{
register_plugin("[ZP] Extra Item: Mochveneba", "0.1", "LaSsHhH & Oneshox")
g_item = zp_register_extra_item("Mochveneba", 1233, ZP_TEAM_ANY)

cvar_speed = register_cvar("zp_item_speed", "600") // here you can edit the max speed
cvar_noclip = register_cvar("zp_item_noclip", "1") // 1 - enable / 2 - disable

}

public plugin_precache()
{
precache_model(Model);
}

public zp_extra_item_selected(player, itemid)
{
if (itemid == g_item)
client_print(player, print_chat, "[ZP] Tqven iyidet mochveneba!")

set_user_maxspeed(player, get_user_maxspeed(player) + get_pcvar_num(cvar_speed))
set_user_noclip(player, get_pcvar_num(cvar_noclip))

cs_set_user_model(player, Model)
}

drekes
06-12-2010, 05:59
you will probably lose your speed when you switch weapons.

lashsh
06-12-2010, 07:28
I buy it goes to the wall in the


#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

new const g_item_name[] = { "Ucleli Tyviebi (Erti roundi)" }
const g_item_cost = 10


// CS Offsets
#if cellbits == 32
const OFFSET_CLIPAMMO = 51
#else
const OFFSET_CLIPAMMO = 65
#endif
const OFFSET_LINUX_WEAPONS = 4

// Max Clip for weapons
new const MAXCLIP[] = { -1, 13, -1, 10, 1, 7, -1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 }

new g_itemid_infammo, g_has_unlimited_clip[33]

public plugin_init()
{
register_plugin("[ZP] Extra: Unlimited Clip", "1.0", "MeRcyLeZZ")

g_itemid_infammo = zp_register_extra_item(g_item_name, g_item_cost, ZP_TEAM_HUMAN)

register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
}

public zp_extra_item_selected(player, itemid)
{
if (itemid == g_itemid_infammo)
g_has_unlimited_clip[player] = true
}

public event_round_start()
{
for (new id; id <= 32; id++) g_has_unlimited_clip[id] = false;
}

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)
clip = get_msg_arg_int(3)

// Unlimited Clip Ammo
if (MAXCLIP[weapon] > 2)
{
set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])

if (clip < 2)
{
// 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;
}

stock fm_set_weapon_ammo(entity, amount)
{
set_pdata_int(entity, OFFSET_CLIPAMMO, amount, OFFSET_LINUX_WEAPONS);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3082\\ f0\\ fs16 \n\\ par }
*/

So I can do that only "Mochveneba" buy on ..
User is "Unlimited Clip" receiving.

Oneshox
06-12-2010, 08:04
Model does not work: ((

sorry, but i dont know so many about set models :/

lashsh
06-12-2010, 08:12
When "Unlimited Clip" buy, then followed by the "[ZP] Extra Item Ghost"

How do I do not lead to?

Oneshox
06-12-2010, 08:14
lol what you mean O.o ?

lashsh
06-12-2010, 08:17
Translation GOOGLE ...

lashsh
06-12-2010, 08:23
When buy ''Unlimited Clip'' (http://forums.alliedmods.net/showpost.php?p=1206565&postcount=12) Followed by ''Ghost'' (http://forums.alliedmods.net/showpost.php?p=1206504&postcount=10) :| How to improve?

XpaHuTeJIb
06-12-2010, 20:50
When buy ''Unlimited Clip'' (http://forums.alliedmods.net/showpost.php?p=1206565&postcount=12) Followed by ''Ghost'' (http://forums.alliedmods.net/showpost.php?p=1206504&postcount=10) :| How to improve?

Что именно ты хотел сделать ????

XpaHuTeJIb
06-12-2010, 20:53
я в коденге плагинов не разбираюсь если что я только делаю пути для podbot модели перекрашиваю могу сервер собрать но кодинг мне не по зубам извени

lashsh
06-12-2010, 21:12
Что именно ты хотел сделать ????

kagda pakupaesh Unlimited Clip pakupait sam Ghost