13.11.2010, 23:59
i dont suggest you to use GetTickCount because if your server will run 24 days without restart or smth then it will fu** your server up.
Use a repeated timer for a player.
Edit:
Oops use Callback OnPlayerStateChange.
if(newstate == PLAYER_STATE_PASSENGER)
settimer...
Use a repeated timer for a player.
pawn Код:
OnPlayerEnterVehicle
If(GetPlayerVehicleID(playerid,yourcarids))
SetTimerEx("Fuction",1000,1,"i",playerid);
forward Function(playerid);
public Function(playerid)
{
GivePlayerMoney(playerid,-yourcash);
//messages and other stuff
}
Edit:
Oops use Callback OnPlayerStateChange.
if(newstate == PLAYER_STATE_PASSENGER)
settimer...