←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Prośba o naprawę pluginu ;)

Locked

  • +
  • -
daedhelil's Photo daedhelil 11.01.2010

Witam. Moglibyście naprawić mi plugin, który powinien automatycznie odradzać po śmierci? Po kompilacji i wgraniu crashuje serwer.

Błąd:
ERROR: SZ_GetSpace: overflow without FSB_ALLOWOVERFLOW set on Server Reliable Datagram.

Niżej zamieszcza źródło:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "AutoSpawn"
#define VERSION "1.0"
#define AUTHOR "Smarttart62"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_cvar("amx_autospawn","1");
register_event("DeathMsg","spawnMe","a");
}

public spawnMe()
{
if (get_cvar_num("amx_autospawn")!=1)
{
return PLUGIN_HANDLED;
}
new player;
player=read_data(2);
spawn(player);
set_task(0.5,"respawn",player);
return PLUGIN_CONTINUE;
}

public respawn(id)
{
spawn(id);
}
Quote

  • +
  • -
Vertricus's Photo Vertricus 11.01.2010

Spróbuj:
#include <amxmodx>
#include <hamsandwich>
public plugin_init()
{
        register_plugin("AutoRespawn", "666", "Vertricus");
        register_event("DeathMsg","Event_DeathMsg","a");
}

public Event_DeathMsg()
{
	new vid = read_data(2);
	set_task(1.0, "Execute_Spawn", vid)
}

public Execute_Spawn(id) 
	ExecuteHam(Ham_CS_RoundRespawn, id);
Quote

  • +
  • -
daedhelil's Photo daedhelil 11.01.2010

jest jeden problem. jak ludzie dochodzą do CT lub TT to ich czasem nie dołącza.
Quote

  • +
  • -
daedhelil's Photo daedhelil 16.01.2010

Nic mi to nie dało.. w tym przypadku potrzebuje raczej gotowej pomocy :mellow:


// Moglibyście zrobić, aby gracz zawsze mógł dojść do drużyny bez czekania? Bez względu na czas jaki upłynął po rozpoczęciu rundy.
Edited by SatanSon, 16.01.2010 00:13.
Quote

  • +
  • -
Miczu's Photo Miczu 16.01.2010

#include <amxmodx>

#include <hamsandwich>

public plugin_init()

{

        register_plugin("AutoRespawn", "666", "Vertricus");

        register_event("DeathMsg","Event_DeathMsg","a");

        register_event("TeamInfo","team_assign","a")

}



public team_assign()

{

        new id = read_data(1)

        set_task(5.0, "Execute_Spawn", id)

}



public Event_DeathMsg()

{

	new vid = read_data(2);

	set_task(1.0, "Execute_Spawn", vid)

}



public Execute_Spawn(id) 

	if(is_user_connected(id) && !is_user_alive(id) && (get_user_team(id)==1||get_user_team(id)==2)) ExecuteHam(Ham_CS_RoundRespawn, id);
Quote

  • +
  • -
daedhelil's Photo daedhelil 16.01.2010

Tylko że jak wybiorę specta to mogę chodzić :( mógłbyś zrobić, żeby spect nie mógł być alive? :D
Quote

  • +
  • -
Miczu's Photo Miczu 16.01.2010

Update, na górze...
Quote

  • +
  • -
daedhelil's Photo daedhelil 16.01.2010

Dziękuje Ci bardzo za pomoc =) Wszystko działa jak należy bez żadnych bugów. Można zamknąć.
Edited by iNteRp, 16.01.2010 00:45.
Quote
Locked