Raised This Month: $ Target: $400
 0% 

/admin | who etc


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-05-2007 , 17:25   /admin | who etc
Reply With Quote #1

I modify the amx_who.sma to show in a hud not in console.
but the problem is when more admin connect is shown on not all
PHP Code:
#include <amxmod>
#include <amxmisc>

#define MAX_GROUPS 7

new g_groupNames[MAX_GROUPS][] = {
"Conqueror",
"High Guard Warrior",
"Mortal Figthers",
"Comandos",
"Delta Squad",
"The Undead",
"NightCrawlers"
}

new 
g_groupFlags[MAX_GROUPS][] = {
"abcdefghijklmnopqrstuvwy",
"abcdefghijlmnopqrstuvw",
"abcdefghijlmnopqrstu",
"abcdefghijmnopqru",
"abcdefgijmnopu",
"abcdefijmu",
"ab"
}

new 
g_groupFlagsValue[MAX_GROUPS]

public 
plugin_init() {
    
register_plugin("Amx_who Hud","0.1","FireW@ll")
    
register_concmd("say who","who",0)
    
register_concmd("say admin","who",0)
    
register_concmd("say /admin","who",0)
    for(new 
0MAX_GROUPSi++) {
    
g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
  }
}


public 
who(id){
    new 
players[32], inumplayername[32], ia
      get_players
(playersinum)
      for(
0MAX_GROUPSi++) {
    for(
0inum; ++a) {
     
player players[a]
     
get_user_name(playername31)
     if(
get_user_flags(player) == g_groupFlagsValue[i]) {
     
set_hudmessage(42255850.030.2906.06.0)
    
show_hudmessage(id,"..:: Admini Online ::..^n-=- %s -=-^n%s^n..:: Intrati pe site-ul oficial http://hl.darkstrike.ro ::..",g_groupNames[i],name)
              }
            }
    }
    return 
PLUGIN_HANDLED

Have a fix for this?
__________________


I hate Spammers....
vl@d is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 09-05-2007 , 17:29   Re: /admin | who etc
Reply With Quote #2

Let me guess, It only shows four of em? And they get melded together in one single row?
[ --<-@ ] Black Rose is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 09-05-2007 , 17:38   Re: /admin | who etc
Reply With Quote #3

How's the output of this?
Please screen & post.
Code:
#include <amxmod> #include <amxmisc> #define MAX_GROUPS 7 new g_groupNames[MAX_GROUPS][] = {     "Conqueror",     "High Guard Warrior",     "Mortal Figthers",     "Comandos",     "Delta Squad",     "The Undead",     "NightCrawlers" } new g_groupFlags[MAX_GROUPS][] = {     "abcdefghijklmnopqrstuvwy",     "abcdefghijlmnopqrstuvw",     "abcdefghijlmnopqrstu",     "abcdefghijmnopqru",     "abcdefgijmnopu",     "abcdefijmu",     "ab" } new g_groupFlagsValue[MAX_GROUPS] public plugin_init() {     register_plugin("Amx_who Hud","0.1","FireW@ll")     register_concmd("say who","who",0)     register_concmd("say admin","who",0)     register_concmd("say /admin","who",0)     for(new i = 0; i < MAX_GROUPS; i++) {         g_groupFlagsValue[i] = read_flags(g_groupFlags[i])     } } public who(id){         new players[32], inum, player, name[32], i, a, text[2048]     new len = formatex(text, 2047, "..:: Admini Online ::..^n")         get_players(players, inum, "c")         for(i = 0; i < MAX_GROUPS; i++) {                 len += formatex(text[len], 2047-len, "^n-=- %s -=-", g_groupNames[i])                 for(a = 0; a < inum; ++a) {                         if ( get_user_flags(player) == g_groupFlagsValue[i] ) {                                 player = players[a]                 get_user_name(player, name, 31)                                 len += formatex(text[len], 2047-len, "^n   %s", name)             }         }     }         set_hudmessage(42, 255, 85, 0.03, 0.15, 0, 6.0, 6.0)     show_hudmessage(id, "%s^n^n..:: Intrati pe site-ul oficial http://hl.darkstrike.ro ::..", text)         return PLUGIN_HANDLED }

Last edited by [ --<-@ ] Black Rose; 09-05-2007 at 17:43.
[ --<-@ ] Black Rose is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-05-2007 , 17:53   Re: /admin | who etc
Reply With Quote #4

no it shows like it suposed to show but one of the group not all admin
I will try your code

Edit: It shows like i want but it does not show the name of the admin
__________________


I hate Spammers....

Last edited by vl@d; 09-05-2007 at 17:58.
vl@d is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 09-05-2007 , 18:22   Re: /admin | who etc
Reply With Quote #5

print screen?
[ --<-@ ] Black Rose is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-05-2007 , 18:28   Re: /admin | who etc
Reply With Quote #6

sry i tryed to show a print but my driver is not working right and the picture is black
it shows like this:
Code:
..:: Admini Online ::..

-=- Conqueror -=-
-=- High Guard Warrior  -=-
-=- Mortal Figthers -=-   
-=- Comandos  -=-
-=- Delta Squad -=-   
-=- The Undead -=-   
-=- NightCrawlers -=-

..:: Intrati pe site-ul oficial http://hl.darkstrike.ro ::..
The spaces in this code is corect.
But no name
__________________


I hate Spammers....
vl@d is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 09-05-2007 , 18:42   Re: /admin | who etc
Reply With Quote #7

I assume there was no "conquerors" online, anyway the a var was never reset.

I belive this would work.
Code:
#include <amxmod> #include <amxmisc> #define MAX_GROUPS 7 new g_groupNames[MAX_GROUPS][] = {     "Conqueror",     "High Guard Warrior",     "Mortal Figthers",     "Comandos",     "Delta Squad",     "The Undead",     "NightCrawlers" } new g_groupFlags[MAX_GROUPS][] = {     "abcdefghijklmnopqrstuvwy",     "abcdefghijlmnopqrstuvw",     "abcdefghijlmnopqrstu",     "abcdefghijmnopqru",     "abcdefgijmnopu",     "abcdefijmu",     "ab" } new g_groupFlagsValue[MAX_GROUPS] public plugin_init() {     register_plugin("Amx_who Hud","0.1","FireW@ll")     register_concmd("say who","who",0)     register_concmd("say admin","who",0)     register_concmd("say /admin","who",0)         for ( new i = 0 ; i < MAX_GROUPS ; i++)         g_groupFlagsValue[i] = read_flags(g_groupFlags[i]) } public who(id){         new players[32], inum, player, name[32], text[2048]     new len = formatex(text, 2047, "..:: Admini Online ::..^n")         get_players(players, inum, "c")         for ( new i = 0; i < MAX_GROUPS; i++ ) {                 len += formatex(text[len], 2047-len, "^n-=- %s -=-", g_groupNames[i])                 for ( new a = 0; a < inum ; ++a ) {                                 player = players[a]             if ( get_user_flags(player) == g_groupFlagsValue[i] ) {                 get_user_name(player, name, 31)                 len += formatex(text[len], 2047-len, "^n   %s", name)             }         }     }         set_hudmessage(42, 255, 85, 0.03, 0.15, 0, 6.0, 6.0)     show_hudmessage(id, "%s^n^n..:: Intrati pe site-ul oficial http://hl.darkstrike.ro ::..", text)         return PLUGIN_HANDLED }

Last edited by [ --<-@ ] Black Rose; 09-06-2007 at 04:48.
[ --<-@ ] Black Rose is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-05-2007 , 19:03   Re: /admin | who etc
Reply With Quote #8

html code in a hud? why?
__________________


I hate Spammers....
vl@d is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 09-05-2007 , 19:15   Re: /admin | who etc
Reply With Quote #9

its the auto link parser of the forum...
[ --<-@ ] Black Rose is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-05-2007 , 19:16   Re: /admin | who etc
Reply With Quote #10

aaa sry
I will tell if it works tommorow.
going to sleep
__________________


I hate Spammers....
vl@d is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode