Amount of time in a vehicle..
#2

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.
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...
Reply


Messages In This Thread
Amount of time in a vehicle.. - by [L3th4l] - 13.11.2010, 23:52
Re: Amount of time in a vehicle.. - by GaGlets(R) - 13.11.2010, 23:59
Re: Amount of time in a vehicle.. - by [L3th4l] - 14.11.2010, 00:02
Re: Amount of time in a vehicle.. - by The_Gangstas - 14.11.2010, 00:02
Re: Amount of time in a vehicle.. - by GaGlets(R) - 14.11.2010, 00:05
Re: Amount of time in a vehicle.. - by The_Gangstas - 14.11.2010, 00:08
Re: Amount of time in a vehicle.. - by GaGlets(R) - 14.11.2010, 00:18
Re: Amount of time in a vehicle.. - by The_Gangstas - 14.11.2010, 00:24
Re: Amount of time in a vehicle.. - by GaGlets(R) - 14.11.2010, 00:33
Re: Amount of time in a vehicle.. - by The_Gangstas - 14.11.2010, 00:38

Forum Jump:


Users browsing this thread: 6 Guest(s)