Modificare plugin[rezolvat]

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 65
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:

01 Mar 2020, 11:47

Rezolvat
Last edited by X-D3$[T]Ro! on 29 May 2020, 04:29, edited 2 times in total.
Zonek
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 65
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:

02 Mar 2020, 11:17

Sus
User avatar
mariusexeqt
Membru, skill +1
Membru, skill +1
Posts: 114
Joined: 01 Jan 2020, 22:55
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 3 times

03 Mar 2020, 18:31

| Afiseaza codul
#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,"x04[Help] Jucatorul %s 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 = floatround(forigin);

   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)) {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 65
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:

05 Mar 2020, 21:24

mariusexeqt wrote:
03 Mar 2020, 18:31
| Afiseaza codul
#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,"x04[Help] Jucatorul %s 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 = floatround(forigin);

   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)) {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Argument type mismatch (argument 1) on line 94
Error: Array must be indexed (variable "iOrigin") on line 94
Error: Argument type mismatch (argument 1) on line 133
Error: Argument type mismatch (argument 4) on line 134
Error: Argument type mismatch (argument 1) on line 135

5 Errors.
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 65
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:

06 Mar 2020, 15:14

Mă ajută cineva?
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 65
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:

11 Mar 2020, 23:36

UP cineva imi rezolva bug-ul
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 65
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:

28 Mar 2020, 03:21

Va rog, mă ajutați
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 65
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:

31 Mar 2020, 02:13

Suss
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 65
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:

02 Apr 2020, 03:02

mariusexeqt wrote:
03 Mar 2020, 18:31
| Afiseaza codul
#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,"x04[Help] Jucatorul %s 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 = floatround(forigin);

   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)) {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}


Mă încerci odată te rog
User avatar
mariusexeqt
Membru, skill +1
Membru, skill +1
Posts: 114
Joined: 01 Jan 2020, 22:55
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 3 times

02 Apr 2020, 09:12

X-D3$[T]Ro! wrote:
02 Apr 2020, 03:02
mariusexeqt wrote:
03 Mar 2020, 18:31
| Afiseaza codul
#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,"x04[Help] Jucatorul %s 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 = floatround(forigin);

   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)) {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}


Mă încerci odată te rog

| Afiseaza codul
#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;
      client_print(i, print_chat, "[Help]  Jucatorul  %s  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 = floatround(forigin);

   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)) {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 65
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:

20 May 2020, 22:44

mariusexeqt wrote:
02 Apr 2020, 09:12
X-D3$[T]Ro! wrote:
02 Apr 2020, 03:02
mariusexeqt wrote:
03 Mar 2020, 18:31
| Afiseaza codul
#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,"x04[Help] Jucatorul %s 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 = floatround(forigin);

   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)) {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}


Mă încerci odată te rog

| Afiseaza codul
#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;
      client_print(i, print_chat, "[Help]  Jucatorul  %s  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 = floatround(forigin);

   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)) {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}


tot nu-i bun da erori
User avatar
EnTeR_
Membru, skill +1
Membru, skill +1
Posts: 477
Joined: 13 Sep 2014, 15:36
Detinator Steam: Da
Fond eXtream: 0
Been thanked: 4 times

20 May 2020, 22:51

| Afiseaza codul
#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,"^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,"^4[Help System] Jucatorul %s 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 = floatround(forigin);

   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)) {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}
Discord: EyeKon#3230
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests