10.04.2019, 19:53
pq nao aparece o proximo checkpoint?
PHP Code:
public OnPlayerEnterCheckpoint(playerid)
{
DisablePlayerCheckpoint(playerid);
return 1;
}
CMD:pegarencomendas(playerid, params[])
{
if(Player[playerid][pEmprego] != Motoboy) return SCM(playerid, -1,"voce nao e motoboy");
new vehid = GetPlayerVehicleID(playerid);
if( vehid < veh_motoboy[0] || vehid > veh_motoboy[7]) return SCM(playerid, -1, "voce nao esta no veiculo da profissao!");
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1758.7290,-1683.9829,13.4583))
{
new rand = random(sizeof(Encomendas));
cp_motoboy1 = CreateDynamicCP(Encomendas[rand][0], Encomendas[rand][1], Encomendas[rand][2], 3.0,-1,-1,-1,100.0);
SetPlayerCheckpoint(playerid, Encomendas[rand][0], Encomendas[rand][1], Encomendas[rand][2],3.0);
SCM(playerid, -1, "Entregas iniciadas siga as marcas no mapa para entregar!");
}
else SCM(playerid, -1,"voce nao esta no local de coleta!");
return true;
}
if( checkpointid == cp_motoboy1)
{
new str[100], grana, vehid = GetPlayerVehicleID(playerid);
if( vehid < veh_motoboy[0] || vehid > veh_motoboy[7]) return SCM(playerid, -1, "voce nao esta no veiculo da profissao!");
grana = granamotoboyrandom();
GivePlayerMoney(playerid, grana);
format(str, 100, "Voce entregou a encomenda e ganhou %i", grana);
SCM(playerid, -1, str);
DestroyDynamicCP(cp_motoboy1);
new rand = random(sizeof(Encomendas));
cp_motoboy2 = CreateDynamicCP(Encomendas[rand][0],Encomendas[rand][1],Encomendas[rand][2], 3.0,-1,-1,-1,100.0);
SetPlayerCheckpoint(playerid, Encomendas[rand][0], Encomendas[rand][1], Encomendas[rand][2],3.0);
}