Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Modyfikacja

Edycja pluginu "VIP"

Modyfikacja

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
2 odpowiedzi w tym temacie

#1 plplplpl

    Banned

  • Zbanowany

Reputacja: -3
Nowy

  • Postów:3
  • Lokalizacja:kozlowo
Offline

Napisano 26.05.2012 11:19

Witam tak jak w temacie i chciałbym aby vip miał:
- tag vip obok nicku
- Po 3 rundzie 2 zestawy broni ak+deagle+ granty i m4+deagle+granaty
- max 100hp (zeby nic nie dodawało za zabicie)
- zmienić nazwe vip menu na wybierz zestaw broni
- i co runde granaty defa itd.

Za pomoc oczywiście +


#include <fun>
#include <cstrike>
#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "Lunatic"
new gmsgSayText
new jumpnum[33] = 0
new bool:dojump[33] = false

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

register_clcmd("say /vip","mtod_vip")
register_clcmd("say /vips","print_viponline")

register_cvar("amx_vip_maxjumps","0") // ile dodatkowych skoków
register_cvar("amx_vip_hp_kill", "10") // ile dodaje hp dla vip za zabicie
register_cvar("amx_vip_hp", "100") // ile hp na start dla vip
register_cvar("amx_vip_max_hp", "140") // maksymalne hp

register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0")
register_event("DeathMsg", "hook_death", "a", "1>0")

gmsgSayText = get_user_msgid("SayText")
}
public client_putinserver(id)
{
jumpnum[id] = 0
dojump[id] = false
}
public client_disconnect(id)
{
jumpnum[id] = 0
dojump[id] = false
}
public Nowa_Runda() {
new players[32], num
get_players(players, num);

for (new i=0; i<num; i++)
{
if(get_user_flags(players[i]) & ADMIN_LEVEL_H) {
set_task(1.0, "daj", players[i])
}
}
}
public daj(id) {
give_item ( id, "weapon_knife" )
give_item ( id, "weapon_hegrenade" )
give_item ( id, "weapon_smokegrenade" )
give_item ( id, "weapon_flashbang" )
give_item ( id, "weapon_flashbang" )
give_item ( id, "weapon_deagle" )
give_item ( id, "ammo_50ae" )
give_item ( id, "ammo_50ae" )
give_item ( id, "ammo_50ae" )
give_item ( id, "ammo_50ae" )
give_item ( id, "ammo_50ae" )
give_item ( id, "weapon_ak47" )
give_item ( id, "ammo_762nato" )
give_item ( id, "ammo_762nato" )
give_item ( id, "ammo_762nato" )
give_item ( id, "weapon_m4a1" )
give_item ( id, "ammo_556nato" )
give_item ( id, "ammo_556nato" )
give_item ( id, "ammo_556nato" )
set_user_health(id, get_cvar_num("amx_vip_hp"))
cs_set_user_model(id, "vip")
if(get_user_team(id) == 2)
cs_set_user_defuse ( id, 1)
}
public client_PreThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(!(get_user_flags(id) & ADMIN_LEVEL_H)) return PLUGIN_CONTINUE

new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum[id] < get_cvar_num("amx_vip_maxjumps"))
{
dojump[id] = true
jumpnum[id]++
return PLUGIN_CONTINUE
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE

}
public client_PostThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(!(get_user_flags(id) & ADMIN_LEVEL_H)) return PLUGIN_CONTINUE

if(dojump[id] == true)
{
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public mtod_vip(id) {
show_motd(id, "vip.txt", "Poland-Cs.eu - V.I.P.")
}

public print_viponline(user)
{
new adminnames[33][32]
new message[256]
new id, count, x, len
new maxplayers
maxplayers = get_maxplayers()

for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_LEVEL_H)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "VIP'y ONLINE: ")
if(count > 0)
{
for(x = 0 ; x < count ; x++)
{
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? "^x01, ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ")
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Brak Vip'ow Online")
print_message(user, message)
}

return PLUGIN_HANDLED;
}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
public hook_death()
{
// Killer id
new nKiller, nKiller_hp, nHp_add, nHp_max
nKiller = read_data(1)

nHp_add = get_cvar_num ("amx_vip_hp_kill")
nHp_max = get_cvar_num ("amx_vip_max_hp")
// Updating Killer HP
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
return;
nKiller_hp = get_user_health(nKiller)
nKiller_hp += nHp_add
// Maximum HP check
if (nKiller_hp > nHp_max) nKiller_hp = nHp_max
set_user_health(nKiller, nKiller_hp)
// Hud message "Healed +15/+30 hp"
set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
show_hudmessage(nKiller, "Healed +%d hp", nHp_add)
// Screen fading
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(0)
write_byte(0)
write_byte(200)
write_byte(75)
message_end()

}

diablix (26.05.2012 15:37):
Bez plików .amxx w załącznikach

Użytkownik diablix edytował ten post 26.05.2012 15:37


#2 plplplpl

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: -3
Nowy

  • Postów:3
  • Lokalizacja:kozlowo
Offline

Napisano 29.05.2012 18:56

F5

#3 plplplpl

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: -3
Nowy

  • Postów:3
  • Lokalizacja:kozlowo
Offline

Napisano 12.06.2012 17:01

F5





Również z jednym lub większą ilością słów kluczowych: Modyfikacja

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych