01/05/2024 15:44
Alterei apenas uma callback, além de ser possível de otimizar mais esse code, teste para ver se esta de acordo com oque imaginava.
Código PHP:
public OnPlayerEnterCheckpoint(playerid)
{
if (!IsPlayerConnected(playerid)) return 0;
for(new i; i != sizeof(JornalCar); ++i)
{
if(IsPlayerInVehicle(playerid, JornalCar[i]))
{
switch(empregojornal[playerid])
{
case 1:
{
GameTextForPlayer(playerid, "entregando jornal....1/10", 10000, 4);
SetPlayerCheckpoint(playerid,1964.9343,-2093.5779,13.4930,10);
}
case 2:
{
GameTextForPlayer(playerid, "entregando jornal....2/10", 10000, 4);
SetPlayerCheckpoint(playerid,1824.0347,-1842.7266,13.5143,10);
}
case 3:
{
GameTextForPlayer(playerid, "entregando jornal....3/10", 10000, 4);
SetPlayerCheckpoint(playerid,1531.9675,-1674.4497,13.4812,10);
}
case 4:
{
GameTextForPlayer(playerid, "entregando jornal....4/10", 10000, 4);
SetPlayerCheckpoint(playerid,1360.4689,-1298.3595,13.4092,10);
}
case 5:
{
GameTextForPlayer(playerid, "entregando jornal....5/10", 10000, 4);
SetPlayerCheckpoint(playerid,1192.8175,-1320.8759,13.4989,10);
}
case 6:
{
GameTextForPlayer(playerid, "entregando jornal....6/10", 10000, 4);
SetPlayerCheckpoint(playerid,818.9773,-1392.3652,13.4928,10);
}
case 7:
{
GameTextForPlayer(playerid, "entregando jornal....7/10", 10000, 4);
SetPlayerCheckpoint(playerid,797.4005,-1071.3063,24.4965,10);
}
case 8:
{
GameTextForPlayer(playerid, "entregando jornal....8/10", 10000, 4);
SetPlayerCheckpoint(playerid,1354.9268,-979.9109,30.8619,10);
}
case 9:
{
GameTextForPlayer(playerid, "entregando jornal....9/10", 10000, 4);
SetPlayerCheckpoint(playerid,1294.4608,-1789.3079,13.4850,10);
}
case 10:
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~missao concluida~g~$600", 10000, 4);
SendClientMessage(playerid,-1,"para continuar use /ej.");
GivePlayerMoney(playerid,600);
empregojornal[playerid] = 0;
return true;
}
}
SetTimerEx("Tempu", 5000, false, "d", playerid);
TogglePlayerControllable(playerid,0);
empregojornal[playerid]++;
return true;
}
}
}
k2bi#9906
[C.E.O]Brasil Play Socity
[C.E.O]Brasil Play Socity