points +1
#3

pawn Код:
new FlyPoints[MAX_PLAYERS];
new FlyTimer[MAX_PLAYERS];
pawn Код:
public OnPlayerConnect(playerid)
{
  FlyPoints[playerid] = 0;
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate);
{
  if (newstate == PLAYER_STATE_DRIVER)
  {
    new vehmdl = GetVehicleModel(GetPlayerVehicleID(playerid));
    if (vehmdl == SomeModel || vehmdl == SomeModel2 || vehmdl == SomeModel3 ||... )
    {
      FlyTimer[playerid] = SetTimerEx("FlyTimer", 1000, 0, "iii", playerid, GetPlayerVehicleID(playerid), 0);
    }
  }
}
pawn Код:
forward FlyTimer(playerid, vehid, count);
public FlyTimer(playerid, vehid, count)
{
  if (IsPlayerConnected(playerid))
  {
    if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
      if (GetPlayerVehicleID(playerid) == vehid)
      {
        if (count == 60)
        {
          FlyPoints[playerid] = FlyPoints[playerid]+1;
          FlyTimer[playerid] = SetTimerEx("FlyTimer", 1000, 0, "iii", playerid, vehid, 0);
        }
        else
        {
          FlyTimer[playerid] = SetTimerEx("FlyTimer", 1000, 0, "iii", playerid, vehid, count+1);
        }
      }
    }
  }
}
Reply


Messages In This Thread
points +1 - by AleksandarAdzic - 10.06.2008, 08:21
Re: points +1 - by Shadow07 - 10.06.2008, 08:27
Re: points +1 - by MidoBan - 10.06.2008, 08:36
Re: points +1 - by AleksandarAdzic - 10.06.2008, 12:15
Re: points +1 - by Fresh9884 - 25.04.2010, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)