←  Multilingual

AMXX.pl: Support AMX Mod X i SourceMod

»

please edit for me this VIP plugin proszę...

  • +
  • -
marilynmanson's Photo marilynmanson 20.04.2012

Hi ,
Anyone who kind please edit for me this VIP plugin sothat it works with both player and zbot - and have these functions :

+ give VIP Free Armor+Helm + 90 pistols ammo + grenade ( immediately at the first round )
+ 20 hp and extra 1 score when VIP kill a player
+ extra 1 score when vip escape




P/S I Tried "VIP Plugin" at http://amxx.pl/topic...vip-plugin-325/ but i don't know why it does not work ,thus it doesn't have extra score functions
thanks


I use google translate to translate into polish, so there is some stupid words,sorry

this is the code of my plugin but sometimes it works ,sometimes not ,please fix for me
thanks


Witam,
Każdy, kto rodzaj proszę edytować dla mnie ten VIP sothat plugin działa zarówno z odtwarzacza i Zbot - i mają następujące funkcje:

+ Dać VIP Darmowe Armor + Helm + 90 pistolety amunicja znak + Granat (od razu na pierwszej rundzie)
+ 20 KM i dodatkowy 1 wynik gdy VIP zabić gracza
+ Dodatkowo 1 wynik podczas ucieczki vip




P / SI próbowali "VIP Plugin" (http://amxx.pl/topic...vip-plugin-325/) Ale ja nie wiem dlaczego to nie działa, więc nie ma dodatkowych funkcji score
dzięki


Używam google translate do przetłumaczenia na język polski, więc jest jakieś głupie słowa, przepraszam

jest to kod mojego pluginu ale czasami działa, czasami nie, należy ustalić dla mnie
dzięki


#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN_NAME "RVip"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "Leech"

new g_hamczbots, g_vipspawn
new cvar_hp_kill, cvar_hp_hs, cvar_max_hp
new g_vip[33]

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

register_logevent("logevent_round_start",2, "1=Round_Start")
register_logevent("logevent_round_end", 2, "1=Round_End")

RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
cvar_hp_kill = register_cvar("amx_vip_hp", "15")
cvar_hp_hs = register_cvar("amx_vip_hp_hs", "30")
cvar_max_hp = register_cvar("amx_vip_max_hp", "100")
}

public client_putinserver(id)
{
if (g_hamczbots) return
if (!is_user_bot(id)) return
set_task(0.1, "register_ham_czbots", id)
}

public register_ham_czbots(id)
{
if (g_hamczbots || !is_user_connected(id)) return

if (!is_user_bot(id)) return
RegisterHamFromEntity(Ham_Killed, id, "fw_PlayerKilled")

g_hamczbots = true
}

public logevent_round_start()
{
for (new i=0;i<33;i++)
{
g_vip[i] = false
g_vipspawn = false
}

new num = get_alive()
if (num<=0 || g_vipspawn) return

new id = get_random_alive(random_num(1, num))
g_vip[id] = true
g_vipspawn = true

vip_spawn(id)
}

get_alive()
{
static alive, id
alive = 0
for (id=1;id<=33;id++) if (is_user_alive(id)) alive++

return alive
}

get_random_alive(n)
{
static alive, id
alive = 0

for (id=1;id<=33;id++)
{
if (is_user_alive(id)) alive++
if (alive == n) return id
}
return -1
}

public vip_spawn(id)
{
if (!is_user_alive(id)) return
if (!g_vip[id]) return

give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")

if (cs_get_user_team(id)==CS_TEAM_T)
cs_set_user_bpammo(id, CSW_GLOCK18, cs_get_user_bpammo(id,CSW_GLOCK18)+90)
if (cs_get_user_team(id)==CS_TEAM_CT)
cs_set_user_bpammo(id, CSW_USP, cs_get_user_bpammo(id,CSW_USP)+90)
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
new name[32]
get_user_name(id, name, 31)
client_print(0, print_chat, "%s is vip", any:name)
}


public logevent_round_end()
{
for (new id=0;id<33;id++)
{
if (is_user_alive(id) && g_vip[id])
{
g_vip[id] = false
g_vipspawn = false
set_user_frags(id, get_user_frags(id)+1)
}
}
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
if (g_vip[victim]) g_vip[victim] = false
if (g_vip[attacker] && is_user_connected(victim))
{
new hp = get_user_health(attacker)
new add, target, body
get_user_aiming(attacker, target, body, 9999)

if (body==1) add = get_pcvar_num(cvar_hp_hs)
else add = get_pcvar_num(cvar_hp_kill)

if (get_pcvar_num(cvar_max_hp) < hp+add)
set_user_health(attacker, get_pcvar_num(cvar_max_hp))
else set_user_health(attacker, get_user_health(attacker)+add)
set_user_frags(attacker, get_user_frags(attacker)+1)
}
}


thanks
Edited by marilynmanson, 20.04.2012 16:26.
Quote

  • +
  • -
Misiaczek ;c's Photo Misiaczek ;c 20.04.2012

Automatyczna wiadomość


Ten temat został przeniesiony z forum:
AMX Mod XSzukam pluginu
do
AMX Mod XMultilingual

Quote