Advertisement
Guest User

Sistema Pizza

a guest
Aug 17th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.32 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new CheckPizzas[MAX_PLAYERS];
  4.  
  5. CMD:entregarpizzas(playerid, params[])
  6. {
  7.     SetPlayerCheckpoint(playerid, 2104.3772, -1810.1393, 13.5547, 5.0);
  8.     CheckPizzas[playerid] = 1;
  9.     SendClientMessage(playerid, -1, "| PIZZARIA | Vá até o checkpoint para pegar as pizzas!");
  10.     return 1;
  11. }
  12.  
  13.  
  14. public OnPlayerEnterCheckpoint(playerid)
  15. {
  16.     if(CheckPizzas[playerid] == 1)
  17.     {
  18.         SetTimerEx("EntregasE", 5000, false, "i", playerid);
  19.         TogglePlayerControllable(playerid, 0);
  20.         GameTextForPlayer(playerid, "~w~~h~PEGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
  21.         DisablePlayerCheckpoint(playerid);
  22.         CheckPizzas[playerid] = 2;
  23.         SetPlayerCheckpoint(playerid, 1895.2993,-2067.8494,15.6689, 5.0);
  24.         return 1;
  25.     }
  26.     if(CheckPizzas[playerid] == 2)
  27.     {
  28.         SetTimerEx("EntregasE", 5000, false, "i", playerid);
  29.         TogglePlayerControllable(playerid, 0);
  30.         GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
  31.         DisablePlayerCheckpoint(playerid);
  32.         CheckPizzas[playerid] = 3;
  33.         SetPlayerCheckpoint(playerid, 2328.7488,-1681.6417,14.7887, 5.0);
  34.         return 1;
  35.     }
  36.     if(CheckPizzas[playerid] == 3)
  37.     {
  38.         SetTimerEx("EntregasE", 5000, false, "i", playerid);
  39.         TogglePlayerControllable(playerid, 0);
  40.         GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
  41.         DisablePlayerCheckpoint(playerid);
  42.         CheckPizzas[playerid] = 4;
  43.         SetPlayerCheckpoint(playerid, 2110.9265,-1242.8789,25.7978, 5.0);
  44.         return 1;
  45.     }
  46.     if(CheckPizzas[playerid] == 4)
  47.     {
  48.         SetTimerEx("EntregasE", 5000, false, "i", playerid);
  49.         TogglePlayerControllable(playerid, 0);
  50.         GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
  51.         DisablePlayerCheckpoint(playerid);
  52.         CheckPizzas[playerid] = 5;
  53.         SetPlayerCheckpoint(playerid, 2186.0244,-997.8419,66.4688, 5.0);
  54.         return 1;
  55.     }
  56.     if(CheckPizzas[playerid] == 5)
  57.     {
  58.         SetTimerEx("EntregasE", 5000, false, "i", playerid);
  59.         TogglePlayerControllable(playerid, 0);
  60.         GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
  61.         DisablePlayerCheckpoint(playerid);
  62.         CheckPizzas[playerid] = 6;
  63.         SetPlayerCheckpoint(playerid, 1182.2992,-1076.1019,31.6719, 5.0);
  64.         return 1;
  65.     }
  66.     if(CheckPizzas[playerid] == 6)
  67.     {
  68.         SetTimerEx("EntregasD", 5000, false, "i", playerid);
  69.         TogglePlayerControllable(playerid, 0);
  70.         GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
  71.         DisablePlayerCheckpoint(playerid);
  72.         return 1;
  73.     }
  74.     return 1;
  75.  }
  76.  
  77. forward EntregasE(playerid);
  78. public EntregasE(playerid)
  79. {
  80.     if(CheckPizzas[playerid] == 1)
  81.     {
  82.         SendClientMessage(playerid, 0xFFFFFFFF, "| INFO | Você pegou as pizzas, siga o {FF0000}checkpoint{FFFFFF} para entrega-las!");
  83.         return 1;
  84.     }
  85.     TogglePlayerControllable(playerid, 1);
  86.     SendClientMessage(playerid, 0xFFFFFFFF, "| INFO | Pizzas entregues, siga o próximo {FF0000}checkpoint{FFFFFF}!");
  87.     GameTextForPlayer(playerid, "~w~~h~LIBERADO", 4000, 4);
  88.     return 1;
  89. }
  90.  
  91. forward EntregasD(playerid);
  92. public EntregasD(playerid)
  93. {
  94.     TogglePlayerControllable(playerid, 1);
  95.     new Frase[128];
  96.     new Grana = random(6000 - 4000)+ 4000;
  97.     GivePlayerMoney(playerid, Grana);
  98.     format(Frase,sizeof(Frase), "| RODOVIARIA | Você completou a rota, e recebeu [{228B22}R$%d{FFFFFF}]", Grana);
  99.     SendClientMessage(playerid, -1 ,Frase);
  100.     return 1;
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement