←  Szukam pluginu

AMXX.pl: Support AMX Mod X i SourceMod

»

Nieskonczone Granaty

  • +
  • -
JuniorJPDJ's Photo JuniorJPDJ 29.05.2013

Witam,

Szukam pluginu na nieskonczone granaty HE.

Najlepiej, zeby dodawalo nowy dopiero po wybuchu starego, aby byla pewnosc, ze gracz posiadal granat :)

Moglyby byc tez inne granaty, ale to juz sparawa poboczna :P

Z gory dziekuje.

Quote

Pan Marian's Photo Pan Marian 30.05.2013

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fun>
#include <hamsandwich>

#define PLUGIN "xXPLUGINXx"
#define VERSION "1.0"
#define AUTHOR "Pan Marian"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    RegisterHam(Ham_TakeDamage, "player","fwTakeDamage",0);
}

public fwTakeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
    
    if(is_user_alive(idattacker)){
        if(damagebits & (1<<24)){
            give_item(idattacker, "weapon_hegrenade");
        }
    }
}

 

Nie wiem, czy to zadziała, spróbuj i napisz



Ewentualnie, możesz skorzystać z tej wersji, gdzie przy spawnie gracz dostanie 999 granatów, no ale to nie to samo, co nieskończoność

/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "xXPLUGINXx"
#define VERSION "1.0"
#define AUTHOR "Pan Marian"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    RegisterHam(Ham_Spawn,"player","daj");
}

public daj(id){
    give_item(id, "weapon_hegrenade");
    cs_set_user_bpammo(id, CSW_HEGRENADE, 999)
}
Quote

Pan Marian's Photo Pan Marian 30.05.2013

1 kod jaki podałem, zadziała tylko wtedy, gdy komuś zostaną zadane obrażenia ( teorytycznie tak powinno działać).

I tu masz jeszcze, że po rzuceniu granata dostaje się HE

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <csx>
#include <fun>
#define PLUGIN "xXPLUGINXx"
#define VERSION "1.0"
#define AUTHOR "Pan Marian"


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

public grenade_throw(id, greindex, wId){
    if(is_user_alive(id) && wId == CSW_HEGRENADE){
        give_item(id, "weapon_hegrenade");
    }
}
        
        
 

Edited by Pan Marian, 30.05.2013 11:45.
Quote

  • +
  • -
JuniorJPDJ's Photo JuniorJPDJ 30.05.2013

Niestety niezbyt chce to dzialac :(

Jesli to wazne, to uzywam CSDM, amxx'a 1.8.1, metamod-p i dproto

Quote

Pan Marian's Photo Pan Marian 30.05.2013

Która metoda nie chce działać? 3?

Quote

  • +
  • -
JuniorJPDJ's Photo JuniorJPDJ 30.05.2013

Tak, trzecia, reszty nawet nie testowalem,bo mi nie odpowiadaja :D
Quote

Pan Marian's Photo Pan Marian 30.05.2013

A spróbuj jeszcze tak, chociaż wątpię, że to coś zmieni, jeżeli to nie pomoże, to nie wiem jak Ci pomóc

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <csx>
#include <fun>
#define PLUGIN "xXPLUGINXx"
#define VERSION "1.0"
#define AUTHOR "Pan Marian"


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

public grenade_throw(index, greindex, wId){
    new id = index
    if(is_user_alive(id) && wId == CSW_HEGRENADE){
        give_item(id, "weapon_hegrenade");
    }
}
 
Quote

  • +
  • -
JuniorJPDJ's Photo JuniorJPDJ 31.05.2013

Nadal nie dziala :(

Chyba skompiluje sobie wersje z 999 granatami i tyle :)

Ale jakbym dostal sprawna wersje tego cuda co mi tu probujesz pisac to bylbym wniebowziety :)

Quote

  • +
  • -
JuniorJPDJ's Photo JuniorJPDJ 31.05.2013

Chcialem powiedziec, ze wersja z 999 granatami tez nie dziala.

Sadze ze to przez to ze plugin probuje dac granaty jak gracz nie dolaczyl jeszcze do zadnej druzyny :)

Quote

  • +
  • -
sharkowy's Photo sharkowy 01.06.2013

Dobra tamten kod to fail :D to działa:

 

/* Plugin generated by AMXX-Studio */

#include amxmodx
#include cstrike
#include fun

#define PLUGIN "hejdz"
#define VERSION "1.0"
#define AUTHOR "sharkowy"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    register_event("ResetHUD", "ResetHUD", "abe");
}

public ResetHUD(id)
    set_task(3.0, "ResetHUDx", id);

public ResetHUDx(id)
{
    if(!is_user_connected(id)) return;
    give_item(id, "weapon_hegrenade")
    cs_set_user_bpammo(id, CSW_HEGRENADE, 999);
}
Quote

  • +
  • -
JuniorJPDJ's Photo JuniorJPDJ 01.06.2013

dzięki bardzo, dziala.

Lecz nadal nie dziala tak jak ja bym to sobie marzyl.

Jakby ktos mogl, to proszę, aby dopiero po wybuchu dodawalo granat...

Bo tak to beda sie gracze tym spamowac ostro..

Dziekuje za pomoc, nawet ta nieudana.

Zaraz rozdam punkciki :P


sharkowy (01.06.2013 21:26):
czas od rzucenia do wybuchu granatu to jakieś 3 sekundy, więc za dużo Ci to nie da :P
Quote

  • +
  • -
sharkowy's Photo sharkowy 01.06.2013

Gracze będą dostawać granat co 5 sekund.

 

/* Plugin generated by AMXX-Studio */

#include amxmodx
#include fun
#include hamsandwich

#define PLUGIN "hejdz"
#define VERSION "1.0"
#define AUTHOR "sharkowy"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    RegisterHam(Ham_Spawn, "player", "ham_spawn", 1);
}

public ham_spawn(id)
    if(is_user_alive(id)){
    set_task(5.0,"he",id,_,_,"b");
}

public he(id){
    if(is_user_alive(id))
        give_item(id,"weapon_hegrenade");
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/

Quote