problem with randomid
#1

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"
Reply
#2

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);
Reply
#3

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

Thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)