Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new CheckPizzas[MAX_PLAYERS];
- CMD:entregarpizzas(playerid, params[])
- {
- SetPlayerCheckpoint(playerid, 2104.3772, -1810.1393, 13.5547, 5.0);
- CheckPizzas[playerid] = 1;
- SendClientMessage(playerid, -1, "| PIZZARIA | Vá até o checkpoint para pegar as pizzas!");
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(CheckPizzas[playerid] == 1)
- {
- SetTimerEx("EntregasE", 5000, false, "i", playerid);
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~w~~h~PEGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
- DisablePlayerCheckpoint(playerid);
- CheckPizzas[playerid] = 2;
- SetPlayerCheckpoint(playerid, 1895.2993,-2067.8494,15.6689, 5.0);
- return 1;
- }
- if(CheckPizzas[playerid] == 2)
- {
- SetTimerEx("EntregasE", 5000, false, "i", playerid);
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
- DisablePlayerCheckpoint(playerid);
- CheckPizzas[playerid] = 3;
- SetPlayerCheckpoint(playerid, 2328.7488,-1681.6417,14.7887, 5.0);
- return 1;
- }
- if(CheckPizzas[playerid] == 3)
- {
- SetTimerEx("EntregasE", 5000, false, "i", playerid);
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
- DisablePlayerCheckpoint(playerid);
- CheckPizzas[playerid] = 4;
- SetPlayerCheckpoint(playerid, 2110.9265,-1242.8789,25.7978, 5.0);
- return 1;
- }
- if(CheckPizzas[playerid] == 4)
- {
- SetTimerEx("EntregasE", 5000, false, "i", playerid);
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
- DisablePlayerCheckpoint(playerid);
- CheckPizzas[playerid] = 5;
- SetPlayerCheckpoint(playerid, 2186.0244,-997.8419,66.4688, 5.0);
- return 1;
- }
- if(CheckPizzas[playerid] == 5)
- {
- SetTimerEx("EntregasE", 5000, false, "i", playerid);
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
- DisablePlayerCheckpoint(playerid);
- CheckPizzas[playerid] = 6;
- SetPlayerCheckpoint(playerid, 1182.2992,-1076.1019,31.6719, 5.0);
- return 1;
- }
- if(CheckPizzas[playerid] == 6)
- {
- SetTimerEx("EntregasD", 5000, false, "i", playerid);
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~w~~h~ENTREGANDO ~b~~h~PIZZAS~w~...", 5000, 4);
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- return 1;
- }
- forward EntregasE(playerid);
- public EntregasE(playerid)
- {
- if(CheckPizzas[playerid] == 1)
- {
- SendClientMessage(playerid, 0xFFFFFFFF, "| INFO | Você pegou as pizzas, siga o {FF0000}checkpoint{FFFFFF} para entrega-las!");
- return 1;
- }
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFFFF, "| INFO | Pizzas entregues, siga o próximo {FF0000}checkpoint{FFFFFF}!");
- GameTextForPlayer(playerid, "~w~~h~LIBERADO", 4000, 4);
- return 1;
- }
- forward EntregasD(playerid);
- public EntregasD(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- new Frase[128];
- new Grana = random(6000 - 4000)+ 4000;
- GivePlayerMoney(playerid, Grana);
- format(Frase,sizeof(Frase), "| RODOVIARIA | Você completou a rota, e recebeu [{228B22}R$%d{FFFFFF}]", Grana);
- SendClientMessage(playerid, -1 ,Frase);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement