help flags
can some one do this code just who have flag ADMIN_BAN can see who connect ?
Code:
|
Re: help flags
No because this is not the "do it for me" section. The function you need is "get_user_flags" - try to do it, otherwise post in the REQUESTS section.
Also, that's not how you upload codes in the forum. Use [code], [php] or [pawn] tags. |
Re: help flags
Quote:
Code:
|
Re: help flags
Quote:
|
Re: help flags
Quote:
Code:
|
Re: help flags
The player doesn't have admin flags while he is connecting.
|
Re: help flags
Quote:
|
Re: help flags
Make a task of 2 seconds in client_putinserver with the index of the player.
In the task callback function, get the client name or whatever you want then loop through all players, check if the player has the required flags then show message. |
Re: help flags
like this ?
Code:
#include <amxmodx> |
Re: help flags
No, that is very wrong.
The important part is that you're wanting to print something to all admins that are already in the server. That actually means that you're needing to address the client_print() function, not when the new player joins the server. The other major requirement for your plugin is that you do do the printing of the message after two events have occurred: the player has joined the server and the the player has been authenticated by Steam (meaning they have a SteamID). I suggest that you start with just printing the name when the player is put into the server. Get that working first using client_putinserver(). Then, you can add to printing only to admins by replacing your client_print() with a for loop that goes through all connected players and then calling client_print() only on those that have admin access. I suggest that you look for other plugins and threads where you see get_players() being used, most of these will have an example of how to use it and its results in a for loop. Once you have that working, you can then work on adding the SteamID. The simplest (but not the most proper) would be to do what was previously mentioned to add a delay. So, in client_putinserver() you would use set_task() to call a custom function that contains the player loop code that prints the message. Try to do some of those steps and if you run into issues, post the code that you've tried and we can help you out. If you make a decent effort to do these steps on your own, people will generally be more willing to help. |
| All times are GMT -4. The time now is 13:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.