19/01/2023 15:31
(19/01/2023 14:49)Burunu Escreveu:(19/01/2023 14:29)LOS_SANTOS Escreveu: pessoal alguem poderia criar um comando onde tivesse 3 checkpoints? tipo voce usa o comando e o primeiro checkpoint e mostrado chagando ao checkpoint ele ira para o proximo chegando no proximo ele te dar 500 de grana
queria saber como ficaria a estrutura desse codigo preciso saber como e a logica para se criar quantos eu quiser entao atraves de um exemplo eu ja imagino como se faz
exeemplo
CMD:test(playerid)
{
SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
SendClientMessage(playerid, -1,"siga para o proximo checkpoint");
return 1;
}
Olá, da uma olhada nesse arquivo que disponibilizo. É um sistema de auto-escola simples, onde é possivel se basear para desenvolver oque realmente deseja!
Sistema de Auto-Escola Basic: https://pastebin.com/w355DQ1a
vlw mano consegui criar esse comando test baseado no seu
/* //missao test
new pizza[MAX_PLAYERS];
new Float:pizzapoints[8][3] = //Cordenadas dos Checkpoints
{
{2199.8767,1390.9615,10.5999},//checkpoint 1
{2191.9358,1442.2544,10.6001},//checkpoint 2
{2180.2905,1449.4957,10.6002},//checkpoint 3
{2149.8728,1481.9102,10.5996},//checkpoint 4
{2096.6741,1437.1576,10.5989},//checkpoint 5
{2064.8838,1389.8499,10.4513},//checkpoint 6
{2065.0835,1374.7532,10.4514},//checkpoint 7
{2065.3398,1355.1704,10.4513}};//checkpoint 8
CMD:test(playerid){
SetPlayerRaceCheckpoint(playerid, 0, pizzapoints[0][0], pizzapoints[0][1], pizzapoints[0][2],pizzapoints[1][0], pizzapoints[1][1], pizzapoints[1][2], 10);
pizza[playerid] = 1;
return 1;
}
//
public OnPlayerEnterRaceCheckpoint(playerid)
{
switch(pizza[playerid])
{
case 1:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 2, pizzapoints[1][0], pizzapoints[1][1], pizzapoints[1][2],pizzapoints[2][0], pizzapoints[2][1], pizzapoints[2][2], 10);
pizza[playerid] = 2;
return 1;
}
case 2:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 2, pizzapoints[2][0], pizzapoints[2][1], pizzapoints[2][2],pizzapoints[3][0], pizzapoints[3][1], pizzapoints[3][2], 10);
pizza[playerid] = 3;
return 1;
}
case 3:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 2, pizzapoints[3][0], pizzapoints[3][1], pizzapoints[3][2],pizzapoints[4][0], pizzapoints[4][1], pizzapoints[4][2], 10);
pizza[playerid] = 4;
return 1;
}
case 4:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 2, pizzapoints[4][0], pizzapoints[4][1], pizzapoints[4][2],pizzapoints[5][0], pizzapoints[5][1], pizzapoints[5][2], 10);
pizza[playerid] = 5;
return 1;
}
case 5:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 2, pizzapoints[5][0], pizzapoints[5][1], pizzapoints[5][2],pizzapoints[6][0], pizzapoints[6][1], pizzapoints[6][2], 10);
pizza[playerid] = 6;
return 1;
}
case 6:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 2, pizzapoints[6][0], pizzapoints[6][1], pizzapoints[6][2],pizzapoints[7][0], pizzapoints[7][1], pizzapoints[7][2], 10);
pizza[playerid] = 7;
return 1;
}
case 7:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 2, pizzapoints[7][0], pizzapoints[7][1], pizzapoints[7][2],pizzapoints[7][0], pizzapoints[7][1], pizzapoints[7][2], 10);
pizza[playerid] = 8;
return 1;
}
case 8:
{
DisablePlayerRaceCheckpoint(playerid);
pizza[playerid] = 0;
GivePlayerMoney(playerid, 500);
SendClientMessage(playerid, -1,"voce recebeu 500 em grana");
SendClientMessage(playerid, -1,"para continuar use /test");
return 1;
}
}*/