Q: Fishing System [Using Arrays]
#2

Take a look at https://sampforum.blast.hk/showthread.php?tid=318212

The way you would do this is like:
pawn Код:
new fishies[][]
{
    "Fish One",
    "Fish Two",
    "Fish Three"
    //.......
};
Then you can easily just chose a random fish name from this array by doing the following:
pawn Код:
new string[100];
format(string, sizeof(string), "You have caught a %s", fishies[random(sizeof(fishies))]);
If you are looking to put more information about the fish, look into 3 dimensional arrays or 2 dimensional arrays with enums.
Reply


Messages In This Thread
Q: Fishing System [Using Arrays] - by Ezay - 14.04.2012, 02:31
Re: Q: Fishing System [Using Arrays] - by [HiC]TheKiller - 14.04.2012, 04:38
Re : Q: Fishing System [Using Arrays] - by Islam_Gerland_99 - 09.07.2012, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)