[inchis] Cerere Plugin respawn si speedometer

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Locked
User avatar
Pank
Membru, skill 0
Membru, skill 0
Posts: 0
Joined: 30 Jan 2014, 13:06
Detinator Steam: Da
CS Status: Caut admini care doneaza pentru sv de cs .
Detinator server CS: Cs.XSS-Server.Com
SteamID: Pank
Location: Alba Iulia
Has thanked: 3 times
Contact:

30 Jan 2014, 13:15

Salut
Dupa cum spune si titlul , asi dori un plugin de speedometer , cam asa:Image daca se poate sa il compilati voi sa aibe culoare fix asa sau macar sa imi explicati cum se face

Si un plugin respawn , cam asa:Image si aici sa fie ca si in poza :D daca se poate !
Last edited by YONTU on 30 Jan 2014, 15:55, edited 1 time in total.
Reason: Inchis!
Image
Image
Image
Y!m:catalin_niculut
Image
RoyalServer
Cosmin
Fost moderator
Fost moderator
Posts: 1297
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

30 Jan 2014, 13:27

viteza:
| Afiseaza codul
#include < amxmodx >
#include < fakemeta >

#pragma semicolon 1

static const

	PLUGIN[ ] =		"PLUGIN",
	VERSION[ ] =		"0.0.1",
	AUTHOR[ ] =		"Rap^^";


public plugin_init( )
{
	register_plugin( PLUGIN, VERSION, AUTHOR );
	
	register_forward( FM_PlayerPreThink, "ForwardPreThink" );
}

public ForwardPreThink(id)
{
	if( is_user_alive( id ) )
	{
		new Float: vVelocity[3];

		pev(id, pev_velocity, vVelocity);
		
		set_hudmessage(0, 170, 255, 0.32, 0.46, 0, 6.0, 12.0)
		show_hudmessage(id, "Viteza: %d unitati/secunda", floatround(vector_length(vVelocity), floatround_floor));
	}
}
#Vali
Fost moderator
Fost moderator
Posts: 2416
Joined: 24 Jan 2012, 11:00
Detinator Steam: Da
SteamID: id/spryt3
Reputatie: Fost Moderator
Fost Scripter eXtreamCS.com
1.2 / 3
Location: root
Has thanked: 81 times
Been thanked: 144 times
Contact:

30 Jan 2014, 13:35

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

new g_counter  


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 );
	register_event("HLTV", "event_new_round", "a", "1=0", "2=0") 
	
	
}

public event_new_round()
{
	set_task ( 20.0, "end_bai_coi", 0 ) ;
	player_color( 0, ".g[.vDR.g] AVETI RESPAWN .e20 .gSECUNDE !", g_Time_Interval)
}
public end_bai_coi()
{
	 player_color( 0, ".g[.vDR.g] RESPAWN DEZACTIVAT MOTHERFUCKER !")
	
}
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
	}
}

public Runda_Terminata()
{
	if(RoundStartTime)
	{
	
	}
}

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;
		}
	}
}

stock player_color( const id, const input[ ], any:... )
{
	new count = 1, players[ 32 ]

	static msg[ 191 ]
	vformat( msg, 190, input, 3 )
	
	replace_all( msg, 190, ".v", "^4" ) /* verde */
	replace_all( msg, 190, ".g", "^1" ) /* galben */
	replace_all( msg, 190, ".e", "^3" ) /* ct=albastru | t=rosu */
	replace_all( msg, 190, ".x", "^0" ) /* normal-echipa */
	
	if( id ) players[ 0 ] = id; else get_players( players, count, "ch" )
	{
		for( new i = 0; i < count; i++ )
		{
			if( is_user_connected( players[ i ] ) )
			{
				message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] )
				write_byte( players[ i ] );
				write_string( msg );
				message_end( );
			}
		}
	}
}
User avatar
Pank
Membru, skill 0
Membru, skill 0
Posts: 0
Joined: 30 Jan 2014, 13:06
Detinator Steam: Da
CS Status: Caut admini care doneaza pentru sv de cs .
Detinator server CS: Cs.XSS-Server.Com
SteamID: Pank
Location: Alba Iulia
Has thanked: 3 times
Contact:

30 Jan 2014, 13:46

Mr.SpRyTe wrote:
| Afiseaza codul
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

new g_counter  


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 );
	register_event("HLTV", "event_new_round", "a", "1=0", "2=0") 
	
	
}

public event_new_round()
{
	set_task ( 20.0, "end_bai_coi", 0 ) ;
	player_color( 0, ".g[.vDR.g] AVETI RESPAWN .e20 .gSECUNDE !", g_Time_Interval)
}
public end_bai_coi()
{
	 player_color( 0, ".g[.vDR.g] RESPAWN DEZACTIVAT MOTHERFUCKER !")
	
}
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
	}
}

public Runda_Terminata()
{
	if(RoundStartTime)
	{
	
	}
}

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;
		}
	}
}

stock player_color( const id, const input[ ], any:... )
{
	new count = 1, players[ 32 ]

	static msg[ 191 ]
	vformat( msg, 190, input, 3 )
	
	replace_all( msg, 190, ".v", "^4" ) /* verde */
	replace_all( msg, 190, ".g", "^1" ) /* galben */
	replace_all( msg, 190, ".e", "^3" ) /* ct=albastru | t=rosu */
	replace_all( msg, 190, ".x", "^0" ) /* normal-echipa */
	
	if( id ) players[ 0 ] = id; else get_players( players, count, "ch" )
	{
		for( new i = 0; i < count; i++ )
		{
			if( is_user_connected( players[ i ] ) )
			{
				message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] )
				write_byte( players[ i ] );
				write_string( msg );
				message_end( );
			}
		}
	}
}


Din pacate nu e ce asteptam :|
Image
Image
Image
Y!m:catalin_niculut
Image
User avatar
Pank
Membru, skill 0
Membru, skill 0
Posts: 0
Joined: 30 Jan 2014, 13:06
Detinator Steam: Da
CS Status: Caut admini care doneaza pentru sv de cs .
Detinator server CS: Cs.XSS-Server.Com
SteamID: Pank
Location: Alba Iulia
Has thanked: 3 times
Contact:

30 Jan 2014, 13:47

scosmynnnn wrote:viteza:
| Afiseaza codul
#include < amxmodx >
#include < fakemeta >

#pragma semicolon 1

static const

	PLUGIN[ ] =		"PLUGIN",
	VERSION[ ] =		"0.0.1",
	AUTHOR[ ] =		"Rap^^";


public plugin_init( )
{
	register_plugin( PLUGIN, VERSION, AUTHOR );
	
	register_forward( FM_PlayerPreThink, "ForwardPreThink" );
}

public ForwardPreThink(id)
{
	if( is_user_alive( id ) )
	{
		new Float: vVelocity[3];

		pev(id, pev_velocity, vVelocity);
		
		set_hudmessage(0, 170, 255, 0.32, 0.46, 0, 6.0, 12.0)
		show_hudmessage(id, "Viteza: %d unitati/secunda", floatround(vector_length(vVelocity), floatround_floor));
	}
}
Imi poti oferi un link de downlodare pentru sma :D
Image
Image
Image
Y!m:catalin_niculut
Image
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 425
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

30 Jan 2014, 14:03

Te invit sa citesti regulamentul!

Code: Select all

1.1. Aveti dreptul numai la o cerere deschisa in care sa cereti maxim un plugin.
Inchis!
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
Locked

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests