09.12.2009, 07:00
is there a way to do the following make a list of fish names and then i can go / fish and it would produce one of them randomly
new fishNames[][] = {
"Fish 1",
"Fish 2",
"Fish 3",
"Fish 4",
"Fish 5",
"Fish 6",
"Fish 7",
"Fish 8" // You can add as many fishes as you want.
};
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/fish", true))
{
printf("Player %d got a %s!", playerid, fishNames[random(sizeof(fishNames))]);
return 1;
}
return 0;
}