Like2
Компетентный
Добрый вечер..
Никак не могу понять, что с сис-мой GPS в Engine RP.
Видео:
Код:
Никак не могу понять, что с сис-мой GPS в Engine RP.
Видео:
Код:
PHP:
#define GPSS(%0) ShowPlayerDialog(%0, D_GPS, DIALOG_STYLE_LIST, " ", "1. Важные места\n2. Спауны организаций\n3. Другое", "Принять", "Закрыть")
PHP:
case D_GPS:
{
if(!response) return 1;
static str[128], varv[2048], gps = 1;
switch(listitem)
{
case 0:
{
for(new g = 1; g <= 3; g++)
{
format(str, 64, "%i. %s\n", gps, GPSInfo[g][Name]);
strcat(varv,str);
gps++;
}
SetPVarInt(playerid, "GPSID", 1);
}
case 1:
{
for(new g = 4; g <= 19; g++)
{
format(str, 64, "%i. %s\n", gps, GPSInfo[g][Name]);
strcat(varv,str);
gps++;
}
SetPVarInt(playerid, "GPSID", 4);
}
case 2:
{
for(new g = 20; g <= TOTALGPS; g++)
{
format(str, 64, "%i. %s\n", gps, GPSInfo[g][Name]);
strcat(varv,str);
gps++;
}
SetPVarInt(playerid, "GPSID", 20);
}
}
ShowPlayerDialog(playerid, D_JOB+65, 2, " ", varv, "Далее", "Назад");
}
PHP:
case D_JOB+65:
{
if(!response) return GPSS(playerid);
new Float:VPos[3];
SetPVarFloat(playerid,"Spongebob",GPSInfo[listitem+GetPVarInt(playerid, "GPSID")][LocationX]);
SetPVarFloat(playerid,"Mario",GPSInfo[listitem+GetPVarInt(playerid, "GPSID")][LocationY]);
SetPVarFloat(playerid,"SpiderPig",GPSInfo[listitem+GetPVarInt(playerid, "GPSID")][LocationZ]);
GetPlayerPos(playerid, VPos[0], VPos[1], VPos[2]);
SetPVarInt(playerid,"YEAH",1);
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 1, GetPVarFloat(playerid,"Spongebob"), GetPVarFloat(playerid,"Mario"), GetPVarFloat(playerid,"SpiderPig"), 0, 0, 0, 5.0);
SendMes(playerid, COLOR_YELLOW, "Вы отметили на карте локацию: ''%s''. Расстояние до локации: %.1f метров.",GPSInfo[listitem+GetPVarInt(playerid, "GPSID")][Name],GetDistanceBetweenPoints(VPos[0], VPos[1], VPos[2], GetPVarFloat(playerid,"Spongebob"), GetPVarFloat(playerid,"Mario"),GetPVarFloat(playerid,"SpiderPig")));
GPSObject[playerid] = CreateObject(1559, 0, 0, 0, 0.0, 0.0, 0);
return 1;
}
Вроде тут ничего не трогал..
P.s если что я не проверял, была-ли данная проблема в чистой Engine.
P.ss думаю по видео понятно, какой баг. :ap:
