SA-MP Forums Archive
problem with randomid - 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: problem with randomid (/showthread.php?tid=213960)



problem with randomid - Face9000 - 20.01.2011

pawn Код:
forward RandPlayer1()
public RandPlayer1()
{
  GivePlayerWeapon(GetRandomID(), 16, 5);
  SetPlayerArmour(GetRandomID(), 100);
  SendClientMessageToAll(COLOR_YELLOW, "[Random: A Random Player has been given ''5 Grenades'' and ''Full Armor'']");
  return 1;
}
Timer:

pawn Код:
SetTimer("RandPlayer1", 5000, true);
What's wrong?

error 001: expected token: ";", but found "public"


Re: problem with randomid - ExeC - 20.01.2011

pawn Код:
forward RandPlayer1(playerid);
public RandPlayer1(playerid)
{
  GivePlayerWeapon(GetRandomID(playerid), 16, 5);
  SetPlayerArmour(GetRandomID(playerid), 100);
  SendClientMessageToAll(COLOR_YELLOW, "[Random: A Random Player has been given ''5 Grenades'' and ''Full Armor'']");
  return 1;
}
Maybe that would work?

Because you forgot to add ";" to

pawn Код:
forward RandPlayer1(playerid);



Re: problem with randomid - Face9000 - 20.01.2011

LOL i'm a stupid :/ i missed that ;

Thanks