Cerere plugin vip command

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 .
Post Reply
User avatar
Jucks
Membru, skill +3
Membru, skill +3
Posts: 1141
Joined: 20 May 2016, 16:28
Detinator Steam: Da
Fond eXtream: 0
Contact:

03 Jun 2018, 16:21

As dori un plugin in care un vip sa scrie in chat /respawn si sa primeasca respawn in acel moment .
Comanda sa poata sa fie folosita in fiecare runda.
Mesaj cand folosesti /respawn :
[Respawn Ai primit Respawn in aceasta runda.Poti folosita comanda si runda viitoare !
Cand un player scrie /respawn sa ii apara mesajul acesta:
[VIP-Respawn] Nu esti Membru VIP pentru a folosit aceasta comanda.
Multumesc , doar pentru vip , cu flagul "r"
Detinator : # Go.Tried.Ro #
RoyalServer 2
User avatar
LondoN eXtream
Membru eXtream
Membru eXtream
Posts: 2756
Joined: 10 Oct 2014, 06:21
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Fost scripter eXtreamCS
Fost moderator ajutator
Membru Club eXtreamCS (6 luni)
Fond eXtream: 0
Location: Roman, Neamț
Has thanked: 3 times
Been thanked: 13 times

03 Jun 2018, 18:32

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new bool:u[33];

public plugin_init()
{
	register_event("HLTV", "evhltv", "a");
	register_clcmd("say /respawn", "cmdrespawn");
}

public evhltv()
{
	for(new i = 0; i <= get_maxplayers(); i++)
		u = false;
}

public cmdrespawn(id) {
	if(!(get_user_flags(id) & read_flags("r")) || u[id])
		return PLUGIN_HANDLED;

	ExecuteHamB(Ham_CS_RoundRespawn, id);
	u[id] = true;
	return PLUGIN_CONTINUE;
}
User avatar
Jucks
Membru, skill +3
Membru, skill +3
Posts: 1141
Joined: 20 May 2016, 16:28
Detinator Steam: Da
Fond eXtream: 0
Contact:

03 Jun 2018, 18:45

LondoN eXtream wrote:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new bool:u[33];

public plugin_init()
{
	register_event("HLTV", "evhltv", "a");
	register_clcmd("say /respawn", "cmdrespawn");
}

public evhltv()
{
	for(new i = 0; i <= get_maxplayers(); i++)
		u = false;
}

public cmdrespawn(id) {
	if(!(get_user_flags(id) & read_flags("r")) || u[id])
		return PLUGIN_HANDLED;

	ExecuteHamB(Ham_CS_RoundRespawn, id);
	u[id] = true;
	return PLUGIN_CONTINUE;
}

Mersi,il voi incerca chiar acum !
edit : apare un bug , indiferent de sunt viu sau mort si daca scriu /respawn imi da respawn si imi da respawn nelimitat, eu vreau sa imi dea doar cand sunt mort si sa imi dea 1 singura data pe runda, si daca poti te rog sa adaugi si mesajele acelea.
Detinator : # Go.Tried.Ro #
User avatar
LondoN eXtream
Membru eXtream
Membru eXtream
Posts: 2756
Joined: 10 Oct 2014, 06:21
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Fost scripter eXtreamCS
Fost moderator ajutator
Membru Club eXtreamCS (6 luni)
Fond eXtream: 0
Location: Roman, Neamț
Has thanked: 3 times
Been thanked: 13 times

04 Jun 2018, 07:20

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define CHAT_TAG "^x04[VIP-Respawn]^x01"

new bool:u[33];

public plugin_init()
{
	register_event("HLTV", "evhltv", "a");
	register_clcmd("say /respawn", "cmdrespawn");
}

public evhltv()
{
	for(new i = 0; i <= get_maxplayers(); i++)
		u = false;
}

public cmdrespawn(id) {
	if(!(get_user_flags(id) & read_flags("r")))
	{
		ColorChat(id, "Nu esti un membru^x04 VIP");
		return PLUGIN_HANDLED;
	}

	if(is_user_alive(id) || u[id])
		return PLUGIN_HANDLED;

	ColorChat(id, "Ai primit^x04 respawn^x01. Poti folosi comanda si runda viitoare!");
	ExecuteHamB(Ham_CS_RoundRespawn, id);
	u[id] = true;
	return PLUGIN_CONTINUE;
}

stock ColorChat(const id, const input[], any:...)
{
	new strMsg[191], strFormat[191];
	vformat(strFormat, 190, input, 3);
	formatex(strMsg, charsmax(strMsg), "%s %s", CHAT_TAG, strFormat);

	new Count = 1, Players[32];
	get_players(Players, Count, "ch");

	new strID;

	if(!id)
	{
		for(new i = 0; i < Count; i++)
		{
			if(is_user_connected(Players))
				strID = Players;
		}
	}
	else
	{
		if(is_user_connected(id))
			strID = id;
	}

	message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, strID);
	write_byte(strID);
	write_string(strMsg);
	message_end();
}
User avatar
Jucks
Membru, skill +3
Membru, skill +3
Posts: 1141
Joined: 20 May 2016, 16:28
Detinator Steam: Da
Fond eXtream: 0
Contact:

05 Jun 2018, 19:46

LondoN eXtream wrote:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define CHAT_TAG "^x04[VIP-Respawn]^x01"

new bool:u[33];

public plugin_init()
{
	register_event("HLTV", "evhltv", "a");
	register_clcmd("say /respawn", "cmdrespawn");
}

public evhltv()
{
	for(new i = 0; i <= get_maxplayers(); i++)
		u = false;
}

public cmdrespawn(id) {
	if(!(get_user_flags(id) & read_flags("r")))
	{
		ColorChat(id, "Nu esti un membru^x04 VIP");
		return PLUGIN_HANDLED;
	}

	if(is_user_alive(id) || u[id])
		return PLUGIN_HANDLED;

	ColorChat(id, "Ai primit^x04 respawn^x01. Poti folosi comanda si runda viitoare!");
	ExecuteHamB(Ham_CS_RoundRespawn, id);
	u[id] = true;
	return PLUGIN_CONTINUE;
}

stock ColorChat(const id, const input[], any:...)
{
	new strMsg[191], strFormat[191];
	vformat(strFormat, 190, input, 3);
	formatex(strMsg, charsmax(strMsg), "%s %s", CHAT_TAG, strFormat);

	new Count = 1, Players[32];
	get_players(Players, Count, "ch");

	new strID;

	if(!id)
	{
		for(new i = 0; i < Count; i++)
		{
			if(is_user_connected(Players))
				strID = Players;
		}
	}
	else
	{
		if(is_user_connected(id))
			strID = id;
	}

	message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, strID);
	write_byte(strID);
	write_string(strMsg);
	message_end();
}

Pune sa fie folosit doar 1 data pe runda ca merge de n ori /respawn
Detinator : # Go.Tried.Ro #
User avatar
Laurentiu P.
Fost moderator
Fost moderator
Posts: 2550
Joined: 10 Jul 2013, 21:26
Detinator Steam: Da
Reputatie: Fost super moderator
Fond eXtream: 100
Has thanked: 26 times
Been thanked: 64 times
Contact:

07 Jun 2018, 22:23

Fix ce cauti tu
MODIFICI FLAGUL LA COMANDA SI AIA E | Afiseaza codul
#include <amxmodx>
#include <hamsandwich>

static const
	PLUGIN[] = "",
	VERSION[] = "1.0",
	AUTHOR[] = "scosmyn";

new count[33] = 0

public plugin_init() {
	register_plugin(PLUGIN,VERSION,AUTHOR);
	
	register_clcmd("say /respawn","cmdRevive")
	
	register_logevent("round_start",2,"1=Round_Start");
}

public round_start( ) {
	static i
	for(i = 1; i <= get_maxplayers(); i++)
		count = 0
}

public cmdRevive(id) {
	if(count[id] == 1)
	{
		color(id,"!team[ VIP RESPAWN ] !yAi folosit odata !grevive !yrunda viitoare poti accesa dinou!")
		return 1
	}
	if(is_user_alive(id))
		return 1
	
	if(!(get_user_flags(id) & ADMIN_LEVEL_H))
	{
		color(id,"!team[ VIP RESPAWN ] !yNu ai acces la /revive , doar !gV.I.P-ul !yare acces!")
		return 1
	}
	
	count[id] = 1
	
	ExecuteHam(Ham_CS_RoundRespawn,id)
	return 0
}

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

	static msg[ 191 ]
	vformat( msg, 190, input, 3 )

	replace_all( msg, 190, "!g", "^4" ) //- verde
	replace_all( msg, 190, "!y", "^1" ) //- galben
	replace_all( msg, 190, "!team", "^3" ) //- echipa
	replace_all( msg, 190, "!n", "^0" ) //- normal

	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( );
			}
		}
	}
}
no...
User avatar
Jucks
Membru, skill +3
Membru, skill +3
Posts: 1141
Joined: 20 May 2016, 16:28
Detinator Steam: Da
Fond eXtream: 0
Contact:

08 Jun 2018, 09:58

Do[N]e ;3 wrote:Fix ce cauti tu
MODIFICI FLAGUL LA COMANDA SI AIA E | Afiseaza codul
#include <amxmodx>
#include <hamsandwich>

static const
	PLUGIN[] = "",
	VERSION[] = "1.0",
	AUTHOR[] = "scosmyn";

new count[33] = 0

public plugin_init() {
	register_plugin(PLUGIN,VERSION,AUTHOR);
	
	register_clcmd("say /respawn","cmdRevive")
	
	register_logevent("round_start",2,"1=Round_Start");
}

public round_start( ) {
	static i
	for(i = 1; i <= get_maxplayers(); i++)
		count = 0
}

public cmdRevive(id) {
	if(count[id] == 1)
	{
		color(id,"!team[ VIP RESPAWN ] !yAi folosit odata !grevive !yrunda viitoare poti accesa dinou!")
		return 1
	}
	if(is_user_alive(id))
		return 1
	
	if(!(get_user_flags(id) & ADMIN_LEVEL_H))
	{
		color(id,"!team[ VIP RESPAWN ] !yNu ai acces la /revive , doar !gV.I.P-ul !yare acces!")
		return 1
	}
	
	count[id] = 1
	
	ExecuteHam(Ham_CS_RoundRespawn,id)
	return 0
}

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

	static msg[ 191 ]
	vformat( msg, 190, input, 3 )

	replace_all( msg, 190, "!g", "^4" ) //- verde
	replace_all( msg, 190, "!y", "^1" ) //- galben
	replace_all( msg, 190, "!team", "^3" ) //- echipa
	replace_all( msg, 190, "!n", "^0" ) //- normal

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

nu poti adauga in pluginul asta un cod cu vip_flag in care vipul are flagul "r"?
Detinator : # Go.Tried.Ro #
User avatar
Laurentiu P.
Fost moderator
Fost moderator
Posts: 2550
Joined: 10 Jul 2013, 21:26
Detinator Steam: Da
Reputatie: Fost super moderator
Fond eXtream: 100
Has thanked: 26 times
Been thanked: 64 times
Contact:

08 Jun 2018, 11:22

Poftim pe flagul "r". Doar inlocuiesti publicul din cel vechi cu asta.

Code: Select all

public cmdRevive(id) {
	if(count[id] == 1)
	{
		color(id,"!team[ VIP RESPAWN ] !yAi folosit odata !grevive !yrunda viitoare poti accesa dinou!")
		return 1
	}
	if(is_user_alive(id))
		return 1
	
	if(!(get_user_flags(id) & ADMIN_LEVEL_F))
	{
		color(id,"!team[ VIP RESPAWN ] !yNu ai acces la /revive , doar !gV.I.P-ul !yare acces!")
		return 1
	}
	
	count[id] = 1
	
	ExecuteHam(Ham_CS_RoundRespawn,id)
	return 0
}
no...
User avatar
Jucks
Membru, skill +3
Membru, skill +3
Posts: 1141
Joined: 20 May 2016, 16:28
Detinator Steam: Da
Fond eXtream: 0
Contact:

10 Jun 2018, 12:19

Stiu ca am gresit cv in cod da nu stiu ce...

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

static const
	PLUGIN[] = "",
	VERSION[] = "1.0",
	AUTHOR[] = "scosmyn";

new count[33] = 0

public plugin_init() {
	register_plugin(PLUGIN,VERSION,AUTHOR);
	
	register_clcmd("say /respawn","cmdRevive")
	
	register_logevent("round_start",2,"1=Round_Start");
}

public round_start( ) {
	static i
	for(i = 1; i <= get_maxplayers(); i++)
		count = 0
}

public cmdRevive(id) {
   if(count[id] == 1)
   {
      color(id,"!team[ VIP RESPAWN ] !yAi folosit runda aceasta !grespawn.!yRunda viitoare poti accesa dinou!")
      return 1
   }
   if(is_user_alive(id))
      return 1
   
   if(!(get_user_flags(id) & ADMIN_LEVEL_F))
   {
      color(id,"!team[ VIP RESPAWN ] !yNu esti membru !gV.I.P , doar !gV.I.P-ul !yare acces!")
      return 1
   }
   
   count[id] = 1
   
   ExecuteHam(Ham_CS_RoundRespawn,id)
   return 0
}
	
	
	count[id] = 1
	
	ExecuteHam(Ham_CS_RoundRespawn,id)
	return 0
}

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

	static msg[ 191 ]
	vformat( msg, 190, input, 3 )

	replace_all( msg, 190, "!g", "^4" ) //- verde
	replace_all( msg, 190, "!y", "^1" ) //- galben
	replace_all( msg, 190, "!team", "^3" ) //- echipa
	replace_all( msg, 190, "!n", "^0" ) //- normal

	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( );
			}
		}
	}
}
Detinator : # Go.Tried.Ro #
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Semrush [Bot] and 51 guests