←  Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Nowy Plugin
[ROZWIĄZANE] Vip na HNS

Locked

  • +
  • -
Krzysztof97's Photo Krzysztof97 02.09.2012

Witajcie!
Poszukuję pluginu vip na serwer HNS.
Miałby mieć on:
120hp
Własny model
+20hp za zabicie headshotem
+10hp za zwykłe zabicie
Wszystkie granaty(to tylko w tt)

Pozdrawiam:)
Edited by Krzysztof97, 02.09.2012 15:16.
Quote

DockU's Photo DockU 02.09.2012

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#define PLUGIN "Hns Vip"
#define VERSION "1.0"
#define AUTHOR "speedkill"
new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
health_add = register_cvar("amx_vip_hp", "10")
health_hs_add = register_cvar("amx_vip_hp_hs", "20")
health_max = register_cvar("amx_vip_max_hp", "100")
register_event("DeathMsg", "death", "a", "1>0")
RegisterHam(Ham_Spawn, "player", "abc", 1)
}
public plugin_precache() {
precache_model("models/player/hnsvip/hnsvip.mdl")
}
public abc(id)
{
if(is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
{

give_item(id, "weapon_smokegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_hegrenade")
model(id)
}
}
public death()
{
nKiller = read_data(1)

if ( (read_data(3) == 1) && (read_data(5) == 0) )
{
nHp_add = get_pcvar_num (health_hs_add)
}
else
nHp_add = get_pcvar_num (health_add)
nHp_max = get_pcvar_num (health_max)
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
return;

nKiller_hp = get_user_health(nKiller)
nKiller_hp += nHp_add
if (nKiller_hp > nHp_max) nKiller_hp = nHp_max
set_user_health(nKiller, nKiller_hp)

}
public model(id) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "hnsvip")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "hnsvip")
}
else {
cs_reset_user_model(id)
}
}


<ciach!>

Musisz znaleść sobie model i stworzyć folder hnsvip i nazwa modelu hnsvip.mdl do tego folderu i to do models/player
Edited by benio101, 04.09.2012 12:59.
REGULAMIN FORUM
Quote

  • +
  • -
Krzysztof97's Photo Krzysztof97 02.09.2012

Niestety nie dodaje hp(nie wiem jak za zabicia, ale i tak by musiała być poprawka w kodzie chyba, bo hp max jest podane 100, a ja bym chciał max 150) na początku rundy + he także się nie dostaje(dałoby radę zrobić tak, żeby otrzymywało się he np. 20 sekund po rozpoczęciu rundy? bo przedtem to hidenseek blokuje chyba).
Pozdrawiam:)
Edited by Krzysztof97, 02.09.2012 16:55.
Quote

DockU's Photo DockU 02.09.2012

Ten ViP spełni twoje oczekiwania. :D

Attached Files

  • Attached File  vip.sma   5.59KB   98 downloads
  • Attached File  vip.txt   384bytes   94 downloads
Quote

  • +
  • -
dziubdziubek's Photo dziubdziubek 02.09.2012

/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "Vip_Na_HNS"
#define VERSION "1.0"
#define AUTHOR "dziubdziubek"

#define VIP_FLAG ADMIN_LEVEL_H


new bool:jest_vipem[33];


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

RegisterHam(Ham_Spawn, "player", "Odrodzenie", 1);

register_event("DeathMsg", "DeathMsg", "a")
}

public plugin_precache()
{
precache_model("models/player/VIPHNS/VIP.mdl")
}

public DeathMsg()
{

new kid = read_data(1) //zabojca

new vid = read_data(2) // ofiara

new hs = read_data(3) // HeadShot (1 == true)

new weapon[64]
read_data(4,weapon,63) //krotka nazwa broni (bez weapon_ / CSW_ )

if(kid!=vid)
{
new hp=get_user_health(kid)
if(hs==1&&jest_vipem[kid])
{
set_user_health(kid,hp+20);
}
else
{
set_user_health(kid,hp+10);
}
}
}

public hegrenade(id)
{
give_item(id,"weapon_hegrenade")
}

public Odrodzenie(id)
{
new CsTeams:userTeam = cs_get_user_team(id)
if(!is_user_alive(id) && !jest_vipem[id] && userTeam!=CS_TEAM_CT)
{
model(id)
set_user_health(id,150)
return PLUGIN_CONTINUE;
}

give_item(id, "weapon_smokegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
set_task(20.0,"hegrenade",id)
set_user_health(id,150)
model(id)

return PLUGIN_CONTINUE;
}

public client_putinserver(id)
{
jest_vipem[id]=false;
if(get_user_flags(id) & VIP_FLAG)
{
jest_vipem[id]=true;
}
}

public model(id)
{
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T)
{
cs_set_user_model(id, "VIP")
}
else if(userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "VIP")
}
else
{
cs_reset_user_model(id)
}
}


Ścieżka modelu vipa: models/player/VIPHNS/VIP.mdl

he dostaje się 20 sekund po rozpoczęciu rundy.

(nie testowane) :D
Quote

  • +
  • -
Krzysztof97's Photo Krzysztof97 02.09.2012

Dziubdziubek tylko jest taki problem, że wszystkim daje te bonusy z vipa:D
Ale masz już + za chęci.
A co do vipa DockU to mnie stety/niestety nie interesuje grawitka z vipa itp..., bo chce żeby nie było takiego czegoś ^^

Up:D
Quote

Gość_21977_* 04.09.2012

Automatyczna wiadomość


Ten temat został przeniesiony z forum

AMX Mod XSzukam pluginu

do

Scripting AMXXPluginy
Quote

  • +
  • -
Krzysztof97's Photo Krzysztof97 05.09.2012

Up
Quote

  • +
  • -
Krzysztof97's Photo Krzysztof97 13.09.2012

Up
Quote

Adminek AMXX.PL's Photo Adminek AMXX.PL 13.09.2012

Wiadomość wygenerowana automatycznie

Ten temat został zamknięty przez moderatora.

Powód: vipgenerator

Jeśli się z tym nie zgadzasz, raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.

Z pozdrowieniami,
Zespół AMXX.PL

Quote
Locked