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

[REQ] Print random player name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 12-11-2018 , 02:22   [REQ] Print random player name
Reply With Quote #1

Hello. I’m looking for a simple plugin. When admin (ADMIN_BAN) says /random, everyone will see dhudmessage with one of all connected players nickname in the server.

And if possible... some effects included, like this:

Step 1. Say /random
Step 2. Dhudmessage: Random player will be elected in... 3... 2... 1...
Step 3. Dhudmessage: Random player is... LithuanianJack!

Anyone can help me?
LithuanianJack is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-11-2018 , 05:18   Re: [REQ] Print random player name
Reply With Quote #2

I've seen an example made by Exolent. You might wanna do some searches.
__________________
Relaxing is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 12-11-2018 , 06:40   Re: [REQ] Print random player name
Reply With Quote #3

It's something like:
new iPlayers [32], iNum, iRandom
get_players (iPlayers, iNum, "ch")
iRandom = iPlayers [random (iNum)]

So you use the index iRandom to name, or anything you want to do.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-11-2018 , 07:00   Re: [REQ] Print random player name
Reply With Quote #4

PHP Code:
get_random_client()
{
    new 
ply[32], pNum;
    
get_players(plypNum"ch");
    return (
pNum == 0) ? false:ply[random(pNum)];

__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 12-11-2018 at 07:01.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 19:34.


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