04.11.2014, 18:42
Quote:
Setting a Timer, first:
pawn Код:
- Then we need to make a new public, from WantedLevel Timer; pawn Код:
|
you have to make a loop between players !!!!!
2.and pay attention that if someone has 0 wanted and you use : SetPlayerWantedLevel(playerid,GetPlayerWantedLevel (playerid)-1);
it will be set his wanted to 255 !
and help
![Cheesy](images/smilies/biggrin.png)
you can use PVars and GetTickCount!
To give you an example (using zcmd and foreach, you can use other command processors and other loops):
pawn Код:
SetTimer("Wanted",1800000,1);
forward Wanted();
public Wanted()
{
foreach(Player, i)
{
SetPVarInt(i, "WantedTime", GetTickCount());
if(GetPlayerWantedLevel(i) > 1) SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)-1);
}
return 1;
}
CMD:wantedtime(playerid, params[])
{
new string[260];
new t = GetTickCount() - GetPVarInt(playerid, "WantedTime");
format(string,sizeof(string),"You have to wait %d seconds to loose another wanted star.",t/1000);
SendClientMessage(playerid,-1,string);
return 1;
}
Good Luck.