←  Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Nowy Plugin
Plugin - Po fragu Flashbang i Hegrenade

Zablokowany

  • +
  • -
Xirate - zdjęcie Xirate 06.03.2011

Jak w temacie - potrzebuję pluginu, który po zabiciu wroga da zabójcy 2 flashbangi i 1 hegrenade'a. Szybka odpowiedź mile widziana.
Odpowiedz

  • +
  • -
Whisper - zdjęcie Whisper 06.03.2011

Sprawdź czy działa:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Granaty"
#define VERSION "1.0"
#define AUTHOR "Whisper"


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

register_event("DeathMsg", "eDeath", "a");
}
public eDeath() {
new attacker = read_data( 1 );
new ofiara = read_data( 2 );

if(ofiara != attacker && attacker != 0)
{
if(get_user_team(attacker) != get_user_team(ofiara))
{
give_item(attacker, "weapon_hegrenade");
give_item(attacker, "weapon_flashbang");
give_item(attacker, "weapon_flashbang");
}
}
}

Użytkownik Whisper edytował ten post 06.03.2011 18:31
Odpowiedz

  • +
  • -
Xirate - zdjęcie Xirate 06.03.2011

Srry, ale z AMX Mod X Studio prawie sie nie widziałem. Mógłbyś podrzucić jako gotowy plik do wrzucenia?
Odpowiedz

  • +
  • -
Truposz WWL - zdjęcie Truposz WWL 06.03.2011

Proszę w załączniku następnym razem możesz użyć http://amxx.pl/kompilator/

Załączone pliki

Odpowiedz

Pan BooYaka - zdjęcie Pan BooYaka 06.03.2011

a dałoby sie zrobić , żeby to było dla osób z flaga "t" ??
Odpowiedz

GoldeN - zdjęcie GoldeN 06.03.2011

#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init() {
register_plugin("Granaty", "1.0", "Whisper")
register_event("DeathMsg", "eDeath", "a");
}
public eDeath() {
new attacker = read_data( 1 );
new ofiara = read_data( 2 );
new flaga = get_user_flags(attacker)

if(ofiara != attacker && attacker != 0 && (flaga & ADMIN_LEVEL_H)){
if(get_user_team(attacker) != get_user_team(ofiara)){
give_item(attacker, "weapon_hegrenade");
give_item(attacker, "weapon_flashbang");
give_item(attacker, "weapon_flashbang");
}
}
}

Załączone pliki

  • Załączony plik  plug.amxx   1,53 KB   8 Ilość pobrań
  • Załączony plik  plug.sma   725 bajtów   31 Ilość pobrań
Odpowiedz

  • +
  • -
kasza - zdjęcie kasza 06.03.2011

To ja się pod to podepnę.
Da zrobić wiadomość do tego ? Otrzymales granaty za zabicie!
Jeśli gracz będzie miał już jakiegoś granata - Uzupelniono Ci granaty za zabicie!
A jeśli będzie mial wszystkie to nie daje wiadomości ?
Odpowiedz

  • +
  • -
AmD - zdjęcie AmD 06.03.2011

cos takiego?

#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init() {
register_plugin("Granaty", "1.0", "Whisper")
register_event("DeathMsg", "eDeath", "a");
}
public eDeath() {
new attacker = read_data( 1 );
new ofiara = read_data( 2 );
new flaga = get_user_flags(attacker)

if(ofiara != attacker && attacker != 0 && (flaga & ADMIN_LEVEL_H)){
if(get_user_team(attacker) != get_user_team(ofiara)){
if( !user_has_weapon(attacker,CSW_FLASHBANG ) )
{
give_item(attacker, "weapon_flashbang");
give_item(attacker, "weapon_flashbang");
client_print(attacker, print_chat, "Dostales Flesze za zabicie!");
}
if( !user_has_weapon(attacker,CSW_HEGRENADE ) )
{
give_item(attacker, "weapon_hegrenade");
client_print(attacker, print_chat, "Dostales HE za zabicie !");
}
}
}
}

co do uzupełnienia to nie wiem jak pobrać ilość, jak coś wymyśle to napiszę
Użytkownik AmD edytował ten post 06.03.2011 22:07
Odpowiedz
Zablokowany