←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

Spawnowanie gracza

Locked

  • +
  • -
dram's Photo dram 23.07.2011

Witam. Próbując spawnować gracza mam następujące problemy :

1. Są duchy modeli.
2. Respawnuje kilka razy
3. Respawnując - w zasadzie nie respawnuje pojawia sie duch gracza i "teoretycznie" gracz ten jest żywy a tak nie jest.

Może ktoś rozwiązać mój problem?
Quote

  • +
  • -
Hiroshima's Photo Hiroshima 23.07.2011

pokaz kod tego pluginu.
Quote

  • +
  • -
dram's Photo dram 23.07.2011

public respawn_player(id) 

{     

	new cel = id - ZADANIE_RESPAWN;

	

	if (!is_user_connected(cel) || is_user_alive(cel) || cs_get_user_team(cel) == CS_TEAM_SPECTATOR)         return;

	

	set_pev(cel, pev_deadflag, DEAD_RESPAWNABLE);

	dllfunc(DLLFunc_Think, cel);

	

	if (is_user_bot(cel) && pev(cel, pev_deadflag) == DEAD_RESPAWNABLE)

	{

		dllfunc(DLLFunc_Spawn, cel);

	} 

	

}

Edited by dram, 23.07.2011 21:25.
Quote

  • +
  • -
Hiroshima's Photo Hiroshima 23.07.2011

w plugin_init():

public plugin_init() 
RegisterHam(Ham_Killed, "player","Killed", 1);


a potem:

public respawn_player(id) {     
ExecuteHamB(Ham_CS_RoundRespawn, id);
}


no i na poczatku

#include <hamsandwich>

Quote
Locked