SA-MP Forums Archive
[Ajuda] OnPlayerEnterCheckpoint - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] OnPlayerEnterCheckpoint (/showthread.php?tid=570062)



OnPlayerEnterCheckpoint - Bigdk - 05.04.2015

ai galera, eu criei um cmd simples (uma volta no quarteirao), й o seguinte, eu criei alguns checkpoints para uma profissao eu digito o comando pego o primeiro checkpoint(atй ai tudo bem) , mas quando eu chego perto do segundo checkpoint ele some, alguem pode me ajudar?


Re: OnPlayerEnterCheckpoint - matheusspohr - 05.04.2015

Tente usar a callback public PnPlayerEnterRaceCheckpoint


Re: OnPlayerEnterCheckpoint - Bigdk - 05.04.2015

Agora funciono nem o primeiro


Re: OnPlayerEnterCheckpoint - matheusspohr - 05.04.2015

Postar o code muitas vezes ajuda.

Abraзos.


Re: OnPlayerEnterCheckpoint - Bigdk - 05.04.2015

cara o code ta aki
Quote:

if(strcmp(cmd, "/catarlixo", true) == 0)
{
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(dini_Int(file, "Profissao") == Lixeiro || dini_Int(file, "Profissao") == Gari)
{
TruckingJob[playerid] = 1;
SetPlayerCheckpoint(playerid,2059.3647, -1985.8686, 13.5468,10);
SendClientMessage(playerid, Blue, "Vocк limpou a rua.");
}
return 1;
}

Quote:

public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 408 )
{
if(TruckingJob[playerid] == 1)
{
TruckingJob[playerid] = 2;
SetPlayerCheckpoint(playerid,1926.5679, -1928.4460, 12.9512,10);
SendClientMessage(playerid,COLOR_RED,"Siga os checkpoints para catar o lixo. !");
return 1;
}
if(TruckingJob[playerid] == 2){
TruckingJob[playerid] = 3;
SetPlayerCheckpoint(playerid,1825.6751, -1634.5753, 12.9540,10);
return 1;
}
if(TruckingJob[playerid] == 3){
TruckingJob[playerid] = 4;
SetPlayerCheckpoint(playerid,2076.7683, -1699.3287, 12.9472,10);
return 1;
}
if(TruckingJob[playerid] == 4){
TruckingJob[playerid] = 5;
SetPlayerCheckpoint(playerid,2136.2097, -1414.0341, 23.5644,10);
return 1;
}
if(TruckingJob[playerid] == 5){
TruckingJob[playerid] = 6;
SetPlayerCheckpoint(playerid,2337.7834, -1435.1702, 23.3986,10);
return 1;
}
if(TruckingJob[playerid] == 6){
TruckingJob[playerid] = 7;
SetPlayerCheckpoint(playerid,2296.6225, -1654.7807, 14.2566,10);
return 1;
}
if(TruckingJob[playerid] == 7){
TruckingJob[playerid] = 8;
SetPlayerCheckpoint(playerid,2066.7763, -1994.9351, 13.1086,10);
SendClientMessage(playerid,COLOR_RED,"Volte a sua HQ para receber");
DisablePlayerCheckpoint(playerid);
return 1;
}
if(TruckingJob[playerid] == 8 ){
TruckingJob[playerid] = 0;
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,COLOR_RED,"Voce recebeu $850 pelo trabalho extra");
GivePlayerGrana(playerid, 850);
return 1;
}
}
return 1;
}




Re: OnPlayerEnterCheckpoint - matheusspohr - 05.04.2015

Verifique as chaves "{}" .

Abraзos.


Re: OnPlayerEnterCheckpoint - Bigdk - 05.04.2015

Agora o primeiro check point funciono quando usei o comando /catarlixo, o segundo apareceu mas quando cheguei perto sumiu.