Problem with timer
#1

Hi!


I tired to make a timer but I get a error, I want it to give money when it pass 0

pawn Код:
public robc()  //(robc is my timer name...)
{
    GivePlayerMoney(playerid,9000);
}
But I get error:

Код:
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV.pwn(847) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
(At that line)

The rest of the code:

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    SetTimer("robc",5000,false);
    return 1;
}
When the timer will start..

And on top of my script (forward)

pawn Код:
forward robc();
I had almost the same but on a filterscript but then I had so the timer started by a command
and it got a explode... And that workt with that...

Edit: Maybe it not work under there ?.. But I need it when it pass 0...
Reply
#2

pawn Код:
forward robc(playerid);
public robc(playerid)  //(robc is my timer name...)
{
    GivePlayerMoney(playerid,9000);
}
Reply
#3

pawn Код:
forward robc(playerid);

public robc(playerid)
{
GivePlayerMoney(playerid,9000);
return 1;
}
Reply
#4

This is an example on how to do it with an variable

pawn Код:
new robbing[MAX_PLAYERS];

forward robc();

public robc()
{
 foreach(Player, i)
 {
 if(robbing[i] = 1)
  {
  GivePlayerMoney(i,9000);
  }
 }
 return 1;
}
Reply
#5

Thanks alot all!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)