Raised This Month: $32 Target: $400
 8% 

/random PLUGIN


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Taha_rajper
Member
Join Date: Jun 2021
Location: Under The Sea
Old 06-28-2022 , 12:39   /random PLUGIN
Reply With Quote #1

Hello, I Want. A Plugin That If Any Admin Types /random in chat The Plugin will Give A Random one Player Name out of max players
acess : ADMIN_KICK

NOTE : That's For Events Purpose Of The Server

Last edited by Taha_rajper; 06-28-2022 at 12:40.
Taha_rajper is offline
TribalBlood
Member
Join Date: Oct 2020
Old 07-01-2022 , 16:58   Re: /random PLUGIN
Reply With Quote #2

PHP Code:
#include <amxmodx>

new Players[32], Players_NumCPCP_Name[33];

public 
plugin_init()
{
    
register_plugin("Choose_Random_Player""1.0""TribalBlood");
    
register_clcmd("say /random""random_player");
}

public 
random_player(id)
{
    if(
get_user_flags(id) & ADMIN_KICK)
    {
        
get_players(PlayersPlayers_Num);
        
CP Players[random(Players_Num)];
        
get_user_name(CPCP_Namecharsmax(CP_Name));
        
client_print_color(00"The Chosen Player Is: %s"CP_Name);
    }

__________________
My Steam Profile

- Online Rarely -

Last edited by TribalBlood; 07-01-2022 at 17:01.
TribalBlood 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 07:01.


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