SA-MP Forums Archive
fishing help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: fishing help (/showthread.php?tid=112641)



fishing help - sggassasin - 09.12.2009

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


Re: fishing help - ExoSanty - 09.12.2009

say what?


Re: fishing help - Finn - 09.12.2009

pawn Код:
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.
};
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!strcmp(cmdtext, "/fish", true))
  {
    printf("Player %d got a %s!", playerid, fishNames[random(sizeof(fishNames))]);
    return 1;
  }
  return 0;
}