[rezolvat]Cerere modificare plugin

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
Laurentiu P.
Fost moderator
Fost moderator
Posts: 2402
Joined: 10 Jul 2013, 20:26
Detinator Steam: Da
Reputatie: Fost super moderator
Fond eXtream: 100
Has thanked: 16 times
Been thanked: 41 times
Contact:

24 Nov 2013, 18:57

Salut am luat pluginul amx_who pentru a vedea adminii Online, i-am pus gradele + accesele dar as dorii sa-mi apara din cand in cand un mesaj in chat cam asa ceva "Scrie /who pentru a vedea adminii online" sau alt mesaj dar cu acelasi scop

Sursa plugin-ului mai jos
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define MAX_GROUPS 10

new g_groupNames[MAX_GROUPS][] = {
"Fondator",
"Owner",
"Co-Owner",
"Maresal",
"General",
"Sergent",
"Maior",
"Helper",
"Slot",
"VIP"
}


new g_groupFlags[MAX_GROUPS][] = {
"abcdefghijklmnopqrstu",
"abcdefghijklmnopqrst",
"bcdefghijklmnopqrst",
"bcdefghijlmnopqrst",
"bcdefghijlmnopqrs",
"bcdefgijlmnopqrs",
"bcdefgijmnoprs",
"bcdefgijmnrs",
"b",
"abi"
}

new g_groupFlagsValue[MAX_GROUPS]

public plugin_init() {
  register_plugin("AMX Who - AdminMod", "1.0", "asd")

  register_concmd("amx_who", "cmdWho", 0)
  register_concmd("admin_who", "cmdWho", 0)

  register_clcmd("say /who", "cmdWho", 0) 
  register_clcmd("say who", "cmdWho", 0) 
  register_clcmd("say /admins", "cmdWho", 0)
  register_clcmd("say admins", "cmdWho", 0)

  register_clcmd("say_team /who", "cmdWho", 0) 
  register_clcmd("say_team who", "cmdWho", 0)
  register_clcmd("say_team /admins", "cmdWho", 0)
  register_clcmd("say_team admins", "cmdWho", 0)

  
  for(new i = 0; i < MAX_GROUPS; i++) {
    g_groupFlagsValue = read_flags(g_groupFlags)
  }
}

public cmdWho(id) {
  new players[32], inum, player, name[32], i, a
  get_players(players, inum)
  console_print(id, ".:: Staff Server ::.")
  for(i = 0; i < MAX_GROUPS; i++) {
    console_print(id, "-----| %s ", g_groupNames)
    for(a = 0; a < inum; ++a) {
      player = players[a]
      get_user_name(player, name, 31)
      if(get_user_flags(player) == g_groupFlagsValue) {
        console_print(id, "%s", name)
     }
    }
  }
  console_print(id, ".:: Staff Server ::.")
  return PLUGIN_HANDLED
}
no...
Rapidserver
User avatar
Raul
Fost administrator
Fost administrator
Posts: 2340
Joined: 03 Feb 2012, 11:33
Detinator Steam: Da
SteamID: /id/raulll
Reputatie: Fost administrator
Location: Germany
Has thanked: 43 times
Been thanked: 120 times

24 Nov 2013, 19:13

Iti trebuie alt plugin pentru mesaje in chat, nu trebuie modificat nimic din amx_who.
Plugin-ul care iti trebuie il gasesti aici: http://forum.tutorialecstrike.com/index ... ic=14019.0 , ai si tutorial.
User avatar
aNNNdReY
Membru, skill +1
Membru, skill +1
Posts: 410
Joined: 07 Sep 2012, 23:45
Detinator Steam: Da
SteamID: ravyvevo
Has thanked: 65 times
Been thanked: 18 times

24 Nov 2013, 19:28

SMA | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define MAX_GROUPS 10

#pragma tabsize 0

new g_groupNames[MAX_GROUPS][] = {
"Fondator",
"Owner",
"Co-Owner",
"Maresal",
"General",
"Sergent",
"Maior",
"Helper",
"Slot",
"VIP"
}


new g_groupFlags[MAX_GROUPS][] = {
"abcdefghijklmnopqrstu",
"abcdefghijklmnopqrst",
"bcdefghijklmnopqrst",
"bcdefghijlmnopqrst",
"bcdefghijlmnopqrs",
"bcdefgijlmnopqrs",
"bcdefgijmnoprs",
"bcdefgijmnrs",
"b",
"abi"
}

new g_groupFlagsValue[MAX_GROUPS]

public plugin_init() {
  register_plugin("AMX Who - AdminMod", "1.0", "asd")

  register_concmd("amx_who", "cmdWho", 0)
  register_concmd("admin_who", "cmdWho", 0)

  register_clcmd("say /who", "cmdWho", 0) 
  register_clcmd("say who", "cmdWho", 0) 
  register_clcmd("say /admins", "cmdWho", 0)
  register_clcmd("say admins", "cmdWho", 0)

  register_clcmd("say_team /who", "cmdWho", 0) 
  register_clcmd("say_team who", "cmdWho", 0)
  register_clcmd("say_team /admins", "cmdWho", 0)
  register_clcmd("say_team admins", "cmdWho", 0)
  
  set_task(60.0,"show_mesaj",0,"",0,"b",0)

  for(new i = 0; i < MAX_GROUPS; i++) {
    g_groupFlagsValue = read_flags(g_groupFlags)
  }
}

public cmdWho(id) 
{
  new players[32], inum, player, name[32], i, a
  get_players(players, inum)
  console_print(id, ".:: Staff Server ::.")
  for(i = 0; i < MAX_GROUPS; i++) {
    console_print(id, "-----| %s ", g_groupNames)
    for(a = 0; a < inum; ++a) 
   {
    player = players[a]
    get_user_name(player, name, 31)
    if(get_user_flags(player) == g_groupFlagsValue) 
	 {
    console_print(id, "%s", name)
     }
   }
  }
  console_print(id, ".:: Staff Server ::.")
  return PLUGIN_HANDLED
}

public show_mesaj(id)
{
   ColorChat(id, GREEN,"^x01[ ^x04WHO^x01 ]^x03 Tasteaza^x04 /who^x03 in chat, pentru a vedea^x04 adminii online^x03 !");
}

Code: Select all

set_task(60.0,"show_mesaj",0,"",0,"b",0)
In loc de 60.0 pui timpu care il vrei in secunde...
User avatar
Laurentiu P.
Fost moderator
Fost moderator
Posts: 2402
Joined: 10 Jul 2013, 20:26
Detinator Steam: Da
Reputatie: Fost super moderator
Fond eXtream: 100
Has thanked: 16 times
Been thanked: 41 times
Contact:

24 Nov 2013, 19:55

Ms Andrei functioaneaza
Rezolvat.
no...
Post Reply

Return to “Cereri”

  • Information