Raised This Month: $114 Target: $400
 28% 

How can i get random word on plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
stephen473
Senior Member
Join Date: Jan 2017
Location: somewhere on earth
Old 01-30-2017 , 06:54   How can i get random word on plugin
Reply With Quote #1

Hi i need to get random word ON plugin. But i don't know how can I make it. Can anyone give me an example, please?

Last edited by stephen473; 08-22-2018 at 12:11. Reason: Restored post
stephen473 is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 01-30-2017 , 07:38   Re: How can i get random word on plugin
Reply With Quote #2

You mean like this?
Spoiler
__________________
ambn is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 01-30-2017 , 10:34   Re: How can i get random word on plugin
Reply With Quote #3

Quote:
Originally Posted by ambn View Post
You mean like this?
Spoiler
It triggers me how you mix syntax. + That won't work since you can't assign 'strings' like that.

Anyway, if you do it that way best to switch 'Num'

Last edited by Michael Shoe Maker; 01-30-2017 at 10:35.
Michael Shoe Maker is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 01-30-2017 , 10:37   Re: How can i get random word on plugin
Reply With Quote #4

Quote:
Originally Posted by Michael Shoe Maker View Post
It triggers me how you mix syntax. + That won't work since you can't assign 'strings' like that.

Anyway, if you do it that way best to switch 'Num'
you mean that i can't use Word = "WORD_1"; ??
__________________
ambn is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 01-30-2017 , 10:54   Re: How can i get random word on plugin
Reply With Quote #5

You would probably be better of with this.

PHP Code:
char RandomWordsList[][] = {
    
"Word 1",
    
"Word 2",
    
"Word 3",
    
"Word 4",
    
"Word 5"
};

//Generate random word and print to all in chat.
PrintToChatAll("Random Word: %s"RandomWordsList[GetRandomInt(0sizeof(RandomWordsList) - 1)]); 
__________________
xines is offline
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 01-30-2017 , 14:10   Re: How can i get random word on plugin
Reply With Quote #6

He is trying make my plugin, my idea. Good luck! xD
__________________
vortex. is offline
Timocop
AlliedModders Donor
Join Date: Mar 2013
Location: Germany
Old 01-30-2017 , 14:31   Re: How can i get random word on plugin
Reply With Quote #7

wut
Timocop is offline
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 01-30-2017 , 14:46   Re: How can i get random word on plugin
Reply With Quote #8

He's trying to do my idea. I said "I wish good luck xD"
__________________
vortex. is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 01-30-2017 , 22:33   Re: How can i get random word on plugin
Reply With Quote #9

I was asked for this 2 times from different people on steam, I don't know if this was OP or Vortex.

They want a plugin that show a "random word" in chat and the first player(terror) who type this in chat will be moved to CT.

Both could not understand my question if these random words should be hardcoded(ambn,xines examples), get from a *.cfg config file or a database. Both was talking about a "random word generator for sourcepawn".
Maybe I don't have understood them, maybe they don't have understood me. idk
__________________
free software
coding
shanapu is offline
stephen473
Senior Member
Join Date: Jan 2017
Location: somewhere on earth
Old 01-31-2017 , 03:43   Re: How can i get random word on plugin
Reply With Quote #10

Quote:
Originally Posted by vortex. View Post
He's trying to do my idea. I said "I wish good luck xD"
I don't understand, this plugin was made by other authors a few months ago. How can it be your idea?

Last edited by stephen473; 11-17-2018 at 07:06.
stephen473 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 23:55.


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