How would i get the random data that was made in one function to another?
Code:
stock buying(id,pet[],cost)
{
new ages = random_num(1,8)
new menu_body[256]
new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)
if(equali(pet,"dog"))
{
format(menu_body,256,"Pet is %s^n Age: %i",pet,ages)
show_menu(id,keys,menu_body)
}
}
public data_here(id)
{
client_print(id,print_chat,"[TEST] %s",pet)
}
So, how would i get the age/pet from 'buying' to a different function?