Modificare plugin[rezolvat]

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
N3v3rM1nd
Membru, skill +1
Membru, skill +1
Posts: 106
Joined: 06 Oct 2018, 13:41
Detinator Steam: Da
CS Status: Just a simple guy :P
Detinator server CS: As vrea eu xD
SteamID: Da
Fond eXtream: 0
Location: Constanta
Has thanked: 20 times
Contact:

21 May 2020, 18:26

X-D3$[T]Ro! wrote:
01 Mar 2020, 11:47
Salut am si eu i problema minora cu un plugin de basebuilder cand dau /help sau un jucator nu-i apare numele complet ci, astefel

- https://i.imgur.com/D931MrA.png
Copy din consola: [HELP] Jucatorul yBer[N]eTicK are nevoie de ajutor

Numele meu este CyBer[N]eTicK, si cand am dat /help mi-a aparut nu mai "yBer[N]eTicK" , nu doar eu am probleme ce toti care dau /help

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <cstrike>
#include <basebuilder>

#define SPRITE "sprites/white.spr"
#define HELPSOUND "misc/bb_help.wav"

new bool:valuri
new sprite_white;

public plugin_init() {
   register_plugin("Help System","1.0","MAGNET")
   register_event("HLTV", "rundanoua", "a", "1=0", "2=0");
   register_clcmd("say /ajutor", "ajutor")
   register_clcmd("say /help", "ajutor")
}


public plugin_precache()
{
   sprite_white = precache_model(SPRITE);
   precache_sound(HELPSOUND)

}
public bb_prepphase_started()
{
   valuri = true
}

public bb_round_started()
{
   valuri = false;
}

public rundanoua()
{
   valuri = false;
}


public ajutor(id)
{

   new nick[33];
   get_user_name(id, nick, charsmax(nick));
   
   if(!is_user_alive(id))
      return PLUGIN_HANDLED;

   if(cs_get_user_team(id) != CS_TEAM_CT)
   {
      ColorChat(id,"^3Trebuie sa fii om, pentru a folosi aceasta comanda!")
      return PLUGIN_HANDLED;
   }
   
   if(!valuri)
   {
      ColorChat(id,"^3Lipirea nu se poate inca realiza napule")
      return PLUGIN_HANDLED;
   }
   
   for(new i = 0;i<32;i++)
   {
      if(!is_user_connected(i) || !(get_user_flags(i) & ADMIN_BAN))   continue;
      ColorChat(i,"[Help System]^4 Jucatorul ^3 %s ^1 are nevoie de ajutor", nick[id])
      client_cmd(i, "spk misc/bb_help.wav")
   }
   set_task(1.0, "Info", id+32, _, _, "b");
   
   return PLUGIN_CONTINUE;
}



public Info(id)
{
   id-=32;
   
   if(!is_user_alive(id) || !valuri || cs_get_user_team(id) != CS_TEAM_CT)
   {
      remove_task(id+32);
      return;
   }

   emit_sound(id, CHAN_AUTO, HELPSOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
   new Float:forigin[3];
   entity_get_vector(id, EV_VEC_origin, forigin);

   new iOrigin[3];
   for(new i=0;i<3;i++)
   iOrigin[i] = floatround(forigin[i]);

   message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin );
   write_byte( TE_BEAMCYLINDER );
   write_coord( iOrigin[0] );
   write_coord( iOrigin[1] );
   write_coord( iOrigin[2] );
   write_coord( iOrigin[0] );
   write_coord( iOrigin[1] + 300 );
   write_coord( iOrigin[2] + 300 );
   write_short( sprite_white );
   write_byte( 0 ); // startframe
   write_byte( 0 ); // framerate
   write_byte( 10 ); // life
   write_byte( 10 ); // width
   write_byte( 255 ); // noise
   write_byte( 255 ); // r, g, b
   write_byte( 100 );// r, g, b
   write_byte( 100 ); // r, g, b
   write_byte( 128 ); // brightness
   write_byte( 0 ); // speed
   message_end();
   
}


stock ColorChat(const id, const input[], any:...)
{
   new count = 1, players[32];
   static msg[191];
   vformat(msg, 190, input, 3);
   
   replace_all(msg, 190, "^x04", "^4");
   replace_all(msg, 190, "^x01", "^1");
   replace_all(msg, 190, "^x03", "^3");
   
   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();
         }
      }
   }
}
P.S imi puteti face ca acel mesaj sa apara cu verde multumesc mult
Ai incercat sa compilezi local ? Pentru ca ................. compilerele online nu preiau semnul "^" ,respectiv "\"
Zonek
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2440
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 254 times
Been thanked: 278 times
Contact:

22 May 2020, 15:07

Esti pe langa...
Incearca asa:

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <cstrike>
#include <basebuilder>

#define SPRITE "sprites/white.spr"
#define HELPSOUND "misc/bb_help.wav"

new bool:valuri
new sprite_white;

public plugin_init() {
	register_plugin("Help System","1.0","MAGNET")
	register_event("HLTV", "rundanoua", "a", "1=0", "2=0");
	register_clcmd("say /ajutor", "ajutor")
	register_clcmd("say /help", "ajutor")
}

public plugin_precache()
{
	sprite_white = precache_model(SPRITE);
	precache_sound(HELPSOUND)
	
}
public bb_prepphase_started()
{
	valuri = true
}

public bb_round_started()
{
	valuri = false;
}

public rundanoua()
{
	valuri = false;
}

public ajutor(id)
{
	new nick[32];
	get_user_name(id, nick, charsmax(nick));
	
	if(!is_user_alive(id))
		return PLUGIN_HANDLED;
	
	if(cs_get_user_team(id) != CS_TEAM_CT)
	{
		ColorChat(id,"!4[Help System]!3 Trebuie sa fii om, pentru a folosi aceasta comanda!")
		return PLUGIN_HANDLED;
	}
	
	if(!valuri)
	{
		ColorChat(id,"!4[Help System]!3 Lipirea nu se poate inca realiza napule")
		return PLUGIN_HANDLED;
	}
	
	for(new i = 1;i<=32;i++)
	{
		if(!is_user_connected(i) || !(get_user_flags(i) & ADMIN_BAN))   continue;
		ColorChat(i,"!4[Help System]!3 Jucatorul!1 ^"%s^"!3 are nevoie de ajutor", nick)
		client_cmd(i, "spk misc/bb_help.wav")
	}
	set_task(1.0, "Info", id+32, _, _, "b");
	
	return PLUGIN_CONTINUE;
}



public Info(id)
{
	id-=32;
	
	if(!is_user_alive(id) || !valuri || cs_get_user_team(id) != CS_TEAM_CT)
	{
		remove_task(id+32);
		return;
	}
	
	emit_sound(id, CHAN_AUTO, HELPSOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
	new Float:forigin[3];
	entity_get_vector(id, EV_VEC_origin, forigin);
	
	new iOrigin[3];
	for(new i=0;i<3;i++)
		iOrigin[i]= floatround(forigin[i]);
	
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin );
	write_byte( TE_BEAMCYLINDER );
	write_coord( iOrigin[0] );
	write_coord( iOrigin[1] );
	write_coord( iOrigin[2] );
	write_coord( iOrigin[0] );
	write_coord( iOrigin[1] + 300 );
	write_coord( iOrigin[2] + 300 );
	write_short( sprite_white );
	write_byte( 0 ); // startframe
	write_byte( 0 ); // framerate
	write_byte( 10 ); // life
	write_byte( 10 ); // width
	write_byte( 255 ); // noise
	write_byte( 255 ); // r, g, b
	write_byte( 100 );// r, g, b
	write_byte( 100 ); // r, g, b
	write_byte( 128 ); // brightness
	write_byte( 0 ); // speed
	message_end();
	
}

stock ColorChat(id, String[], any:...) 
{
	static szMesage[192];
	vformat(szMesage, charsmax(szMesage), String, 3);
	
	replace_all(szMesage, charsmax(szMesage), "!1", "^1");
	replace_all(szMesage, charsmax(szMesage), "!3", "^3");
	replace_all(szMesage, charsmax(szMesage), "!4", "^4");
	
	static g_msg_SayText = 0;
	if(!g_msg_SayText)
		g_msg_SayText = get_user_msgid("SayText");
	
	new Players[32], num = 1, i;
	
	if(id) Players[0] = id;
	else get_players(Players, num, "ch");
	
	for(--num; num >= 0; num--) 
	{
		i = Players[num];
		
		message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
		write_byte(i);
		write_string(szMesage);
		message_end();
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
„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ș

discord: IonutC#5114

Vrei sa joci pe un server de biohazard clasic specific timpurilor 2008-2012?
CLICK | Afiseaza codul
89.44.246.14:27015 biohazard clasic
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 62
Joined: 13 Aug 2018, 19:19
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: NU
Fond eXtream: 0
Has thanked: 2 times
Been thanked: 1 time
Contact:

Yesterday, 03:02

YONTU wrote:
22 May 2020, 15:07
Esti pe langa...
Incearca asa:

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <cstrike>
#include <basebuilder>

#define SPRITE "sprites/white.spr"
#define HELPSOUND "misc/bb_help.wav"

new bool:valuri
new sprite_white;

public plugin_init() {
	register_plugin("Help System","1.0","MAGNET")
	register_event("HLTV", "rundanoua", "a", "1=0", "2=0");
	register_clcmd("say /ajutor", "ajutor")
	register_clcmd("say /help", "ajutor")
}

public plugin_precache()
{
	sprite_white = precache_model(SPRITE);
	precache_sound(HELPSOUND)
	
}
public bb_prepphase_started()
{
	valuri = true
}

public bb_round_started()
{
	valuri = false;
}

public rundanoua()
{
	valuri = false;
}

public ajutor(id)
{
	new nick[32];
	get_user_name(id, nick, charsmax(nick));
	
	if(!is_user_alive(id))
		return PLUGIN_HANDLED;
	
	if(cs_get_user_team(id) != CS_TEAM_CT)
	{
		ColorChat(id,"!4[Help System]!3 Trebuie sa fii om, pentru a folosi aceasta comanda!")
		return PLUGIN_HANDLED;
	}
	
	if(!valuri)
	{
		ColorChat(id,"!4[Help System]!3 Lipirea nu se poate inca realiza napule")
		return PLUGIN_HANDLED;
	}
	
	for(new i = 1;i<=32;i++)
	{
		if(!is_user_connected(i) || !(get_user_flags(i) & ADMIN_BAN))   continue;
		ColorChat(i,"!4[Help System]!3 Jucatorul!1 ^"%s^"!3 are nevoie de ajutor", nick)
		client_cmd(i, "spk misc/bb_help.wav")
	}
	set_task(1.0, "Info", id+32, _, _, "b");
	
	return PLUGIN_CONTINUE;
}



public Info(id)
{
	id-=32;
	
	if(!is_user_alive(id) || !valuri || cs_get_user_team(id) != CS_TEAM_CT)
	{
		remove_task(id+32);
		return;
	}
	
	emit_sound(id, CHAN_AUTO, HELPSOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
	new Float:forigin[3];
	entity_get_vector(id, EV_VEC_origin, forigin);
	
	new iOrigin[3];
	for(new i=0;i<3;i++)
		iOrigin[i]= floatround(forigin[i]);
	
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin );
	write_byte( TE_BEAMCYLINDER );
	write_coord( iOrigin[0] );
	write_coord( iOrigin[1] );
	write_coord( iOrigin[2] );
	write_coord( iOrigin[0] );
	write_coord( iOrigin[1] + 300 );
	write_coord( iOrigin[2] + 300 );
	write_short( sprite_white );
	write_byte( 0 ); // startframe
	write_byte( 0 ); // framerate
	write_byte( 10 ); // life
	write_byte( 10 ); // width
	write_byte( 255 ); // noise
	write_byte( 255 ); // r, g, b
	write_byte( 100 );// r, g, b
	write_byte( 100 ); // r, g, b
	write_byte( 128 ); // brightness
	write_byte( 0 ); // speed
	message_end();
	
}

stock ColorChat(id, String[], any:...) 
{
	static szMesage[192];
	vformat(szMesage, charsmax(szMesage), String, 3);
	
	replace_all(szMesage, charsmax(szMesage), "!1", "^1");
	replace_all(szMesage, charsmax(szMesage), "!3", "^3");
	replace_all(szMesage, charsmax(szMesage), "!4", "^4");
	
	static g_msg_SayText = 0;
	if(!g_msg_SayText)
		g_msg_SayText = get_user_msgid("SayText");
	
	new Players[32], num = 1, i;
	
	if(id) Players[0] = id;
	else get_players(Players, num, "ch");
	
	for(--num; num >= 0; num--) 
	{
		i = Players[num];
		
		message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
		write_byte(i);
		write_string(szMesage);
		message_end();
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
Multumesc mult ionut
!Rezolvat
Post Reply

Return to “Modificari pluginuri”

  • Information