Raised This Month: $ Target: $400
 0% 

List of word and things


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
piepie
Member
Join Date: May 2013
Location: Pieland *.*
Old 05-24-2013 , 18:44   List of word and things
Reply With Quote #1

Hey, how can i make 2 lists of words and then choose 1 of each list?
__________________

piepie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-24-2013 , 19:46   Re: List of word and things
Reply With Quote #2

PHP Code:
new const Words1[][] = 
{
    
"hello",
    
"these",
    
"are",
    
"words"
};

new const 
Words2[][] = 
{
    
"here",
    
"is",
    
"more"
};

server_print"%s %s" Words1randomsizeofWords1 ) ) ] , Words2randomsizeofWords2 ) ) ] ); 
__________________
Bugsy is offline
Old 05-25-2013, 05:07
piepie
This message has been deleted by piepie.
piepie
Member
Join Date: May 2013
Location: Pieland *.*
Old 05-25-2013 , 08:48   Re: List of word and things
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
PHP Code:
new const Words1[][] = 
{
    
"hello",
    
"these",
    
"are",
    
"words"
};

new const 
Words2[][] = 
{
    
"here",
    
"is",
    
"more"
};

server_print"%s %s" Words1randomsizeofWords1 ) ) ] , Words2randomsizeofWords2 ) ) ] ); 
I want like if Word 1 is "hello" it gets the 1st word from words2 that's "here", and so on...
__________________


Last edited by piepie; 05-25-2013 at 08:49.
piepie is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-28-2013 , 00:23   Re: List of word and things
Reply With Quote #4

Quote:
Originally Posted by piepie View Post
I want like if Word 1 is "hello" it gets the 1st word from words2 that's "here", and so on...
Ok, so what do you need help with?
__________________
fysiks is offline
piepie
Member
Join Date: May 2013
Location: Pieland *.*
Old 05-28-2013 , 03:34   Re: List of word and things
Reply With Quote #5

If i have 5 words each list, it gets a random word from the 1st list and if the word is in 3rd place on the list it will get the 3rd word from second list.
__________________

piepie is offline
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 05-28-2013 , 03:46   Re: List of word and things
Reply With Quote #6

Quote:
Originally Posted by piepie View Post
If i have 5 words each list, it gets a random word from the 1st list and if the word is in 3rd place on the list it will get the 3rd word from second list.
Could you please speak more slowly???
__________________
youtube:
@holla16
11922911 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-28-2013 , 04:08   Re: List of word and things
Reply With Quote #7

Quote:
Originally Posted by piepie View Post
If i have 5 words each list, it gets a random word from the 1st list and if the word is in 3rd place on the list it will get the 3rd word from second list.
So then save the random value and use that as the index for both arrays
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
piepie
Member
Join Date: May 2013
Location: Pieland *.*
Old 05-28-2013 , 07:25   Re: List of word and things
Reply With Quote #8

Quote:
Originally Posted by YamiKaitou View Post
So then save the random value and use that as the index for both arrays
How can i do that?
__________________

piepie is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-28-2013 , 14:13   Re: List of word and things
Reply With Quote #9

Quote:
Originally Posted by piepie View Post
How can i do that?
This is something that anybody writing a script or program can do. You assign it to a variable and use the variable . . . maybe you need to learn the basics of programming.
__________________
fysiks is offline
piepie
Member
Join Date: May 2013
Location: Pieland *.*
Old 05-28-2013 , 17:06   Re: List of word and things
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
This is something that anybody writing a script or program can do. You assign it to a variable and use the variable . . . maybe you need to learn the basics of programming.
If it's so easy why cant you show me an example?
__________________

piepie 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 22:08.


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