points +1
#1

Hello ,i writing one more post,and i need help
Please if anyone knows how to do this please tell me.

ok this is the problem--------I want to make that when player enters in some aircraft (but only aircraft etc dodo,maverick,hunter,...) hes points riing on this diagram

1 real minute of flying = 1 point in game .

So PLEASE IF ANYBODY CAN HELP ME ,PLEASE MAKE SCRIPT EXAMPLE ,SO I CAN LEARN METHOD.

THANKS A LOT Aleksandar Adzic
Reply
#2

Try researching how to use timers in the script, then increment their points if they're in a specific vehicle.
Reply
#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
#4

Quote:
Originally Posted by AleksandarAdzic
Hello ,i writing one more post,and i need help
Please if anyone knows how to do this please tell me.

ok this is the problem--------I want to make that when player enters in some aircraft (but only aircraft etc dodo,maverick,hunter,...) hes points riing on this diagram

1 real minute of flying = 1 point in game .

So PLEASE IF ANYBODY CAN HELP ME ,PLEASE MAKE SCRIPT EXAMPLE ,SO I CAN LEARN METHOD.

THANKS A LOT Aleksandar Adzic





And yes i use admin fs script ,and i want to make that when some player logged in,he can save his flying points


Please help



Adza
Reply
#5

Quote:
Originally Posted by MidoBan

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);
        }
      }
    }
  }
}
Wheree should I put the last script?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)