Modificare Plugin respawn [rezolvat!]

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
codrutzz
Membru, skill +2
Membru, skill +2
Posts: 539
Joined: 29 Jan 2014, 18:27
Detinator Steam: Da
CS Status: Nu citesc forumu xtreamCS* =]]]
Detinator server CS: In curand
SteamID: Personal
Location: Iasi<3
Has thanked: 68 times
Been thanked: 9 times
Contact:

08 Feb 2014, 13:35

Salut folosesc acest plugin de respawn pentru deathrun : http://www.indungi.ro/forum/files/file/ ... n-respawn/ si vreau 3 modificari:
1.Sa scrie cu verde secundele
2.Sa fie in romana: Mai ai x sec RespawN
3.Sa fie oleaca mai jos in colt
Multumesc :)
RoyalServer 2
User avatar
NuRoFeN [;x]
Membru, skill +2
Membru, skill +2
Posts: 828
Joined: 21 Aug 2012, 15:47
Detinator Steam: Da
CS Status: Inactiv !
Detinator server CS: DR.CS1.RO
SteamID: eualexandru
Reputatie: Fost moderator
Location: Rm.Valcea
Has thanked: 66 times
Been thanked: 61 times
Contact:

08 Feb 2014, 17:11

Ia vezi , da-mi un ss sa vad cum apare
| Afiseaza codul
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

new g_counter  

new g_SyncRestartTimer
new g_SyncGameStart

new Float:RoundStartTime

new g_Time_Interval;
const MAX_PLAYERS = 32;

new g_iRespawn[MAX_PLAYERS+1], g_TeamInfoCounter[MAX_PLAYERS+1], CsTeams:g_iPlayerTeam[MAX_PLAYERS+1];
new g_pCvarRespawnTime, g_pCvarRespawnDelay, g_pCvarMaxHealth;

public plugin_init()
{
	register_plugin("Dr.Respawn", "1.1", "Vicious Vixen"); 
	RegisterHam(Ham_Killed, "player", "fwdPlayerKilledPost", 1);
	RegisterHam(Ham_Spawn, "player", "fwdPlayerSpawnPost", 1);
	register_event("TeamInfo", "eTeamInfo", "a");
	register_logevent( "LogEventRoundStart", 2, "1=Round_Start" )
	g_pCvarRespawnTime = register_cvar("amx_respawn_tickets", "0"); //Set to 0 for unlimited respawns
	g_pCvarRespawnDelay = register_cvar("amx_respawn_delay", "1"); // Delay to respawn
	g_pCvarMaxHealth = register_cvar("amx_max_health", "100"); // Health on respawn
	g_Time_Interval = register_cvar("amx_max_time", "30"); // Time Left to respawn
	set_msg_block( get_user_msgid( "ClCorpse" ), BLOCK_SET );
	
	g_SyncRestartTimer = CreateHudSyncObj()
	g_SyncGameStart = CreateHudSyncObj()
	
}

public LogEventRoundStart()
{
	RoundStartTime = get_gametime()
	
	new iPlayers[32]
	new iNum
	
	get_players( iPlayers, iNum )
	
	for( new i = 0; i < iNum; i++ )
	{
		g_iRespawn[iPlayers] = true
	}
	set_task(1.0,"TimeCounter",123456,_,_,"a",get_pcvar_num(g_Time_Interval))
	set_task(get_pcvar_float(g_Time_Interval),"Runda_Terminata",789123)
}

public Runda_Terminata()
{
	if(RoundStartTime)
	{
		set_hudmessage( 255, 0, 0, 0.09, 0.00, 1, 0.5, 1.0, 0.5, 15.0, -1)
		ShowSyncHudMsg( 0, g_SyncGameStart, "Respawn dezactivat!")
	}
}

public fwdPlayerKilledPost(iVictim, iKiller, iShoudlGib)
{
	if(g_iRespawn[iVictim]++ < get_pcvar_num(g_pCvarRespawnTime) || get_pcvar_num(g_pCvarRespawnTime) == 0)
	{
		set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer", iVictim);
	}
	return HAM_IGNORED;
}

public fwdPlayerSpawnPost(iClient)
{
	if(is_user_alive(iClient))
	{
		set_pev(iClient, pev_health, get_pcvar_float(g_pCvarMaxHealth));
	}
}

public taskRespawnPlayer(id)
{
	if(is_user_connected(id) && RoundStartTime + get_pcvar_num(g_Time_Interval) >= get_gametime() && g_iRespawn[id] && !is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR) {
		ExecuteHamB(Ham_CS_RoundRespawn, id)
		g_iRespawn[id] = false
		return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}  

public eTeamInfo() 
{ 
	new iClient = read_data(1);
	new szTeam[2];
	read_data(2, szTeam, charsmax(szTeam));
	switch(szTeam[0])
	{
		case 'T': 
		{
			if(g_TeamInfoCounter[iClient] == 2 || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
			{
				set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
			}
			g_iPlayerTeam[iClient] = CS_TEAM_T;
		}
		case 'C': 
		{
			if(g_TeamInfoCounter[iClient] == 2 || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
			{
				set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
			}
			g_iPlayerTeam[iClient] = CS_TEAM_CT;
		}
		case 'S':
		{
			remove_task(iClient);
			g_iPlayerTeam[iClient] = CS_TEAM_SPECTATOR;
		}
	}
}

public TimeCounter() 
{
	g_counter++
	
	new Float:iRestartTime = get_pcvar_float(g_Time_Interval) - g_counter
	new Float:fSec
	fSec = iRestartTime 
	
	set_hudmessage( 128, 0, 0, 0.09, 0.0, 1, 0.0, 1.0, 0.0, 0.0, -1)
	ShowSyncHudMsg( 0, g_SyncRestartTimer, "Mai ai %d secunde de respawn", floatround(fSec))
	
	if(get_pcvar_num(g_Time_Interval) - g_counter < 11 && get_pcvar_num(g_Time_Interval) - g_counter !=0)
	{
		static szNum[32]
		num_to_word(get_pcvar_num(g_Time_Interval) - g_counter, szNum, 31)
	}
	if(g_counter == get_pcvar_num(g_Time_Interval))
	{
		g_counter = 0
	}
}
User avatar
codrutzz
Membru, skill +2
Membru, skill +2
Posts: 539
Joined: 29 Jan 2014, 18:27
Detinator Steam: Da
CS Status: Nu citesc forumu xtreamCS* =]]]
Detinator server CS: In curand
SteamID: Personal
Location: Iasi<3
Has thanked: 68 times
Been thanked: 9 times
Contact:

08 Feb 2014, 18:26

incerc acum si dau si poza.
edit: poza : http://postimg.org/image/dc0ex080v/ in poza am pus sa vezi ca merge si pluginu /knife dar respawn tot rosu e si e mai sus eu vrea oleaca mai jos dar ai facut fain ca ai scris in romana,daca poti sa ma ajuti sa scrie cu verde si sa fie oleaca mai jos.
User avatar
NuRoFeN [;x]
Membru, skill +2
Membru, skill +2
Posts: 828
Joined: 21 Aug 2012, 15:47
Detinator Steam: Da
CS Status: Inactiv !
Detinator server CS: DR.CS1.RO
SteamID: eualexandru
Reputatie: Fost moderator
Location: Rm.Valcea
Has thanked: 66 times
Been thanked: 61 times
Contact:

08 Feb 2014, 18:53

Ia vezi
| Afiseaza codul
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

new g_counter  

new g_SyncRestartTimer
new g_SyncGameStart

new Float:RoundStartTime

new g_Time_Interval;
const MAX_PLAYERS = 32;

new g_iRespawn[MAX_PLAYERS+1], g_TeamInfoCounter[MAX_PLAYERS+1], CsTeams:g_iPlayerTeam[MAX_PLAYERS+1];
new g_pCvarRespawnTime, g_pCvarRespawnDelay, g_pCvarMaxHealth;

public plugin_init()
{
	register_plugin("Dr.Respawn", "1.1", "Vicious Vixen"); 
	RegisterHam(Ham_Killed, "player", "fwdPlayerKilledPost", 1);
	RegisterHam(Ham_Spawn, "player", "fwdPlayerSpawnPost", 1);
	register_event("TeamInfo", "eTeamInfo", "a");
	register_logevent( "LogEventRoundStart", 2, "1=Round_Start" )
	g_pCvarRespawnTime = register_cvar("amx_respawn_tickets", "0"); //Set to 0 for unlimited respawns
	g_pCvarRespawnDelay = register_cvar("amx_respawn_delay", "1"); // Delay to respawn
	g_pCvarMaxHealth = register_cvar("amx_max_health", "100"); // Health on respawn
	g_Time_Interval = register_cvar("amx_max_time", "30"); // Time Left to respawn
	set_msg_block( get_user_msgid( "ClCorpse" ), BLOCK_SET );
	
	g_SyncRestartTimer = CreateHudSyncObj()
	g_SyncGameStart = CreateHudSyncObj()
	
}

public LogEventRoundStart()
{
	RoundStartTime = get_gametime()
	
	new iPlayers[32]
	new iNum
	
	get_players( iPlayers, iNum )
	
	for( new i = 0; i < iNum; i++ )
	{
		g_iRespawn[iPlayers] = true
	}
	set_task(1.0,"TimeCounter",123456,_,_,"a",get_pcvar_num(g_Time_Interval))
	set_task(get_pcvar_float(g_Time_Interval),"Runda_Terminata",789123)
}

public Runda_Terminata()
{
	if(RoundStartTime)
	{
		set_hudmessage( 255, 0, 0, 0.09, 0.00, 1, 0.5, 1.0, 0.5, 15.0, -1)
		ShowSyncHudMsg( 0, g_SyncGameStart, "Respawn dezactivat!")
	}
}

public fwdPlayerKilledPost(iVictim, iKiller, iShoudlGib)
{
	if(g_iRespawn[iVictim]++ < get_pcvar_num(g_pCvarRespawnTime) || get_pcvar_num(g_pCvarRespawnTime) == 0)
	{
		set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer", iVictim);
	}
	return HAM_IGNORED;
}

public fwdPlayerSpawnPost(iClient)
{
	if(is_user_alive(iClient))
	{
		set_pev(iClient, pev_health, get_pcvar_float(g_pCvarMaxHealth));
	}
}

public taskRespawnPlayer(id)
{
	if(is_user_connected(id) && RoundStartTime + get_pcvar_num(g_Time_Interval) >= get_gametime() && g_iRespawn[id] && !is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR) {
		ExecuteHamB(Ham_CS_RoundRespawn, id)
		g_iRespawn[id] = false
		return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}  

public eTeamInfo() 
{ 
	new iClient = read_data(1);
	new szTeam[2];
	read_data(2, szTeam, charsmax(szTeam));
	switch(szTeam[0])
	{
		case 'T': 
		{
			if(g_TeamInfoCounter[iClient] == 2 || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
			{
				set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
			}
			g_iPlayerTeam[iClient] = CS_TEAM_T;
		}
		case 'C': 
		{
			if(g_TeamInfoCounter[iClient] == 2 || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
			{
				set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
			}
			g_iPlayerTeam[iClient] = CS_TEAM_CT;
		}
		case 'S':
		{
			remove_task(iClient);
			g_iPlayerTeam[iClient] = CS_TEAM_SPECTATOR;
		}
	}
}

public TimeCounter() 
{
	g_counter++
	
	new Float:iRestartTime = get_pcvar_float(g_Time_Interval) - g_counter
	new Float:fSec
	fSec = iRestartTime 
	
	set_hudmessage( 128, 0, 0, 0.09, 0.0, 1, 0.0, 1.0, 0.0, 0.0, -1)
	ShowSyncHudMsg( 0, g_SyncRestartTimer, "Mai ai %d secunde de respawn", floatround(fSec))
	
	if(get_pcvar_num(g_Time_Interval) - g_counter < 11 && get_pcvar_num(g_Time_Interval) - g_counter !=0)
	{
		static szNum[32]
		num_to_word(get_pcvar_num(g_Time_Interval) - g_counter, szNum, 31)
	}
	if(g_counter == get_pcvar_num(g_Time_Interval))
	{
		g_counter = 0
	}
}
User avatar
codrutzz
Membru, skill +2
Membru, skill +2
Posts: 539
Joined: 29 Jan 2014, 18:27
Detinator Steam: Da
CS Status: Nu citesc forumu xtreamCS* =]]]
Detinator server CS: In curand
SteamID: Personal
Location: Iasi<3
Has thanked: 68 times
Been thanked: 9 times
Contact:

08 Feb 2014, 19:45

il incerc si revin cu edit:-?
edit: tot la fel culoarea rosie si tot acolo :((
User avatar
NuRoFeN [;x]
Membru, skill +2
Membru, skill +2
Posts: 828
Joined: 21 Aug 2012, 15:47
Detinator Steam: Da
CS Status: Inactiv !
Detinator server CS: DR.CS1.RO
SteamID: eualexandru
Reputatie: Fost moderator
Location: Rm.Valcea
Has thanked: 66 times
Been thanked: 61 times
Contact:

08 Feb 2014, 20:58

| Afiseaza codul
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

new g_counter  

new g_SyncRestartTimer
new g_SyncGameStart

new Float:RoundStartTime

new g_Time_Interval;
const MAX_PLAYERS = 32;

new g_iRespawn[MAX_PLAYERS+1], g_TeamInfoCounter[MAX_PLAYERS+1], CsTeams:g_iPlayerTeam[MAX_PLAYERS+1];
new g_pCvarRespawnTime, g_pCvarRespawnDelay, g_pCvarMaxHealth;

public plugin_init()
{
	register_plugin("Dr.Respawn", "1.1", "Vicious Vixen"); 
	RegisterHam(Ham_Killed, "player", "fwdPlayerKilledPost", 1);
	RegisterHam(Ham_Spawn, "player", "fwdPlayerSpawnPost", 1);
	register_event("TeamInfo", "eTeamInfo", "a");
	register_logevent( "LogEventRoundStart", 2, "1=Round_Start" )
	g_pCvarRespawnTime = register_cvar("amx_respawn_tickets", "0"); //Set to 0 for unlimited respawns
	g_pCvarRespawnDelay = register_cvar("amx_respawn_delay", "1"); // Delay to respawn
	g_pCvarMaxHealth = register_cvar("amx_max_health", "100"); // Health on respawn
	g_Time_Interval = register_cvar("amx_max_time", "30"); // Time Left to respawn
	set_msg_block( get_user_msgid( "ClCorpse" ), BLOCK_SET );
	
	g_SyncRestartTimer = CreateHudSyncObj()
	g_SyncGameStart = CreateHudSyncObj()
	
}

public LogEventRoundStart()
{
	RoundStartTime = get_gametime()
	
	new iPlayers[32]
	new iNum
	
	get_players( iPlayers, iNum )
	
	for( new i = 0; i < iNum; i++ )
	{
		g_iRespawn[iPlayers] = true
	}
	set_task(1.0,"TimeCounter",123456,_,_,"a",get_pcvar_num(g_Time_Interval))
	set_task(get_pcvar_float(g_Time_Interval),"Runda_Terminata",789123)
}

public Runda_Terminata()
{
	if(RoundStartTime)
	{
		set_hudmessage(20, 232, 20, 0.0, 0.14, 0, 6.0, 12.0)
		ShowSyncHudMsg( 0, g_SyncGameStart, "Respawn dezactivat!")
	}
}

public fwdPlayerKilledPost(iVictim, iKiller, iShoudlGib)
{
	if(g_iRespawn[iVictim]++ < get_pcvar_num(g_pCvarRespawnTime) || get_pcvar_num(g_pCvarRespawnTime) == 0)
	{
		set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer", iVictim);
	}
	return HAM_IGNORED;
}

public fwdPlayerSpawnPost(iClient)
{
	if(is_user_alive(iClient))
	{
		set_pev(iClient, pev_health, get_pcvar_float(g_pCvarMaxHealth));
	}
}

public taskRespawnPlayer(id)
{
	if(is_user_connected(id) && RoundStartTime + get_pcvar_num(g_Time_Interval) >= get_gametime() && g_iRespawn[id] && !is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR) {
		ExecuteHamB(Ham_CS_RoundRespawn, id)
		g_iRespawn[id] = false
		return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}  

public eTeamInfo() 
{ 
	new iClient = read_data(1);
	new szTeam[2];
	read_data(2, szTeam, charsmax(szTeam));
	switch(szTeam[0])
	{
		case 'T': 
		{
			if(g_TeamInfoCounter[iClient] == 2 || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
			{
				set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
			}
			g_iPlayerTeam[iClient] = CS_TEAM_T;
		}
		case 'C': 
		{
			if(g_TeamInfoCounter[iClient] == 2 || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
			{
				set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
			}
			g_iPlayerTeam[iClient] = CS_TEAM_CT;
		}
		case 'S':
		{
			remove_task(iClient);
			g_iPlayerTeam[iClient] = CS_TEAM_SPECTATOR;
		}
	}
}

public TimeCounter() 
{
	g_counter++
	
	new Float:iRestartTime = get_pcvar_float(g_Time_Interval) - g_counter
	new Float:fSec
	fSec = iRestartTime 
	
	set_hudmessage(20, 232, 20, 0.0, 0.14, 0, 6.0, 12.0)
	ShowSyncHudMsg( 0, g_SyncRestartTimer, "Mai ai %d secunde de respawn", floatround(fSec))
	
	if(get_pcvar_num(g_Time_Interval) - g_counter < 11 && get_pcvar_num(g_Time_Interval) - g_counter !=0)
	{
		static szNum[32]
		num_to_word(get_pcvar_num(g_Time_Interval) - g_counter, szNum, 31)
	}
	if(g_counter == get_pcvar_num(g_Time_Interval))
	{
		g_counter = 0
	}
}
?
User avatar
codrutzz
Membru, skill +2
Membru, skill +2
Posts: 539
Joined: 29 Jan 2014, 18:27
Detinator Steam: Da
CS Status: Nu citesc forumu xtreamCS* =]]]
Detinator server CS: In curand
SteamID: Personal
Location: Iasi<3
Has thanked: 68 times
Been thanked: 9 times
Contact:

09 Feb 2014, 09:39

Acum incerc si revin cu edit.
User avatar
codrutzz
Membru, skill +2
Membru, skill +2
Posts: 539
Joined: 29 Jan 2014, 18:27
Detinator Steam: Da
CS Status: Nu citesc forumu xtreamCS* =]]]
Detinator server CS: In curand
SteamID: Personal
Location: Iasi<3
Has thanked: 68 times
Been thanked: 9 times
Contact:

09 Feb 2014, 09:56

Fain!!! Ms mult Chiar arata bine :)
Last edited by RedForce on 09 Feb 2014, 11:12, edited 1 time in total.
Reason: + [rezolvat!]
Post Reply

Return to “Modificari pluginuri”

  • Information