[Ajuda] CreateDynamicCP
#2

Checkpoints sгo muito bugados.
Crie uma variбvel por player para controlar os checkpoints.

pawn Code:
#define CP_PIZZABOY_01 1001
new pCheckpoint[MAX_PLAYERS];

SetPlayerDelivery(playerid)
{
  new n = random(10);
  switch(n)
  {
    case 0:
    {
      SetPlayerDynamicCP(playerid, /*outros parametros*/);
      pCheckpoint[playerid] = CP_PIZZABOY_01;
    }
    // Outras coordenadas com outros checkpoints
  }
}

public OnPlayerEntersDynamicCP(playerid, checkpointid) {

  switch(pCheckpoint[playerid])
  {
    case CP_PIZZABOY_01:
    {
          SendClientMessage(playerid, -1, "Vocк entregou a pizza");
      GivePlayerMoney(playerid, 15);
      pCheckpoint[playerid] = -1;
      return 1;
    }
  }
}
Reply


Messages In This Thread
CreateDynamicCP - by moura98 - 11.04.2019, 16:35
Re: CreateDynamicCP - by Ermanhaut - 12.04.2019, 08:29
Re: CreateDynamicCP - by moura98 - 12.04.2019, 10:10
Re: CreateDynamicCP - by Cauezin - 12.04.2019, 22:18
Re: CreateDynamicCP - by 1sbedx - 13.04.2019, 01:35

Forum Jump:


Users browsing this thread: 1 Guest(s)