Raised This Month: $51 Target: $400
 12% 

amx_who Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrSnow
Junior Member
Join Date: Feb 2024
Old 02-28-2024 , 16:47   amx_who Problem
Reply With Quote #1

Hey, So i have an amx_who plugin But it doesnt print in the console It shows the default “Yes yes”

This is how i want it to print: https://pastebin.com/a1Mg2jcM

This is the amx_who.sma code: https://pastebin.com/RU342U5T

I also want At VIP grade to show the name and then Gold Like this:

VIP
Player - Gold
Player - Gold
Etc and also show for admins Like
Admin -VIP Gold
Admin -VIP Gold
Only if they have VIP on flag “t” Like in the sma At VIP flag “bt”

Last edited by MrSnow; 02-28-2024 at 16:53.
MrSnow is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-29-2024 , 00:14   Re: amx_who Problem
Reply With Quote #2

Just post the code here, it's a tiny plugin (if it were large, just attach the .sma file). Also, indent your code and learn to use whitespace (empty lines between major sections of code) so that it's readable, making it easier for people to help you.

There is nothing in this plugin that would print "Yes yes". Did you try debugging it? I.e. print out the player names and their flags to see if your code is actually doing what you think it should be doing.

Also, there is a possibility that you're spamming too fast to the server with the console_print() command but I can't remember what kind of limits there are.
__________________
fysiks is offline
MrSnow
Junior Member
Join Date: Feb 2024
Old 02-29-2024 , 07:18   Re: amx_who Problem
Reply With Quote #3

I cant post the code here Its in the pastebin just copy it from there, i dont spam it, when I use amx_who Its shows “name” “steamid” “immunity” “Access” “flag Access” i tried to modify it But it still doesnt show how i want it to show i also gave you another pastebin But i will give you the sma

Here: https://www.mediafire.com/file/36ph5...o.txt.sma/file
This is how i want it to Look: https://www.mediafire.com/file/rc3ir...g2jcM.txt/file
MrSnow is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 02-29-2024 , 08:35   Re: amx_who Problem
Reply With Quote #4

If someone asks you to post code here, then do it, no one will download your files which are not verified, considering that you joined the forum this month!
Uzviseni Bog is offline
MrSnow
Junior Member
Join Date: Feb 2024
Old 02-29-2024 , 09:42   Re: amx_who Problem
Reply With Quote #5

PHP Code:
#include <amxmodx>
#include <amxmisc>
#define MAX_GROUPS 10
new g_groupNames[MAX_GROUPS][] = {
"Fondator",
"Owner",
"Co-Owner",
"Manager",
"Capitan",
"Administrator",
"Moderator",
"Helper",
"VIP",
"Slot"
}
new 
g_groupFlags[MAX_GROUPS][] = {
"abcdefghijklmnopqrstux",
"bcdefghijklmnopqrsu",
"abcdefijmnopqrsu",
"bcdefijmnopqrs",
"bcdefijmnopqr",
"bcdefijmnopq",
"bcdefijmno",
"bceijmno",
"bt",
"b"
}
new 
g_groupFlagsValue[MAX_GROUPS]
public 
plugin_init() {
register_plugin("Amx Who by eXtream""1.0""eXtreamCS.com")
register_concmd("amx_who""cmdWho"0)
for(new 
0MAX_GROUPSi++) {
g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
}
}
public 
cmdWho(id) {
new 
players[32], inumplayername[32], ia
get_players
(playersinum)
console_print(id"USP.INTRUSII.RO")
for(
0MAX_GROUPSi++) {
console_print(id"-----[%d]%s-----"i+1g_groupNames[i])
for(
0inum; ++a) {
player players[a]
get_user_name(playername31)
if(
get_user_flags(player) == g_groupFlagsValue[i]) {
console_print(id"%s"name)
}
}
}
console_print(id"USP.INTRUSII.RO")
return 
PLUGIN_HANDLED

Code:
============================================================
                Lista Admine [Server Name]
============================================================
 
============================================================
[1]  => Fondator <=
============================================================
 
 
 
 
============================================================
[2]  => Owner <=
============================================================
 
 
============================================================
[3]  => Co-Owner <=
============================================================
 
 
============================================================
[4]  => Manager <=
============================================================
 
 
============================================================
[5]  => Capitan <=
============================================================
 
 
============================================================
[6]  => Administrator <=
============================================================
 
 
============================================================
[8]  => Moderator <=
============================================================
 
 
============================================================
[9]  => Helper <=
============================================================
 
 
============================================================
[10] => VIP<=
============================================================
 
 
============================================================
[11] => Slot <=
============================================================
 
============================================================
              Lista Admine [Server Name]
============================================================

Last edited by MrSnow; 02-29-2024 at 09:52.
MrSnow is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 02-29-2024 , 11:25   Re: amx_who Problem
Reply With Quote #6

What is your request?
Uzviseni Bog is offline
MrSnow
Junior Member
Join Date: Feb 2024
Old 02-29-2024 , 11:30   Re: amx_who Problem
Reply With Quote #7

It doesnt print in console Like i sent in the code it just prințs “name” “steamid” “immunity” “acces flag” i want it to print Like in the second code. And when you have VIP with flags “bt” to show VIP NexT their names for admins

Last edited by MrSnow; 02-29-2024 at 11:31.
MrSnow is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 02-29-2024 , 12:27   Re: amx_who Problem
Reply With Quote #8

Quote:
Originally Posted by MrSnow View Post
It doesnt print in console Like i sent in the code it just prințs “name” “steamid” “immunity” “acces flag” i want it to print Like in the second code. And when you have VIP with flags “bt” to show VIP NexT their names for admins
Buddy, do I need to draw it for you? If you're inserting a new plugin, then remove the existing default plugin. Two plugins can't open with the same command, amx_who, so change the following.

PHP Code:
register_concmd("amx_who""cmdWho"0
To
PHP Code:
register_concmd("amx_who1""cmdWho"0
Uzviseni Bog is offline
MrSnow
Junior Member
Join Date: Feb 2024
Old 02-29-2024 , 12:42   Re: amx_who Problem
Reply With Quote #9

But it doesnt print Like in the code i sent you.
MrSnow is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 02-29-2024 , 12:59   Re: amx_who Problem
Reply With Quote #10

Quote:
Originally Posted by MrSnow View Post
But it doesnt print Like in the code i sent you.
How is it print?
Copy and paste!
Uzviseni Bog is offline
Reply



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 10:23.


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