[Ajuda] Sistema de local (mais perto) - 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] Sistema de local (mais perto) (
/showthread.php?tid=357702)
Sistema de local (mais perto) -
ReDKiiL - 08.07.2012
Pessoal andei pesquisando mais nгo achei nada que me ajudou rsrs sem opзao tive que vim criar o tуpico !
Fica dando os seguintes erros:
Код:
D:\ReDKiiL-PC\Area De Trabalho\BAGUNЗA DO DUDU\Servidores SAMP\Brasil Fly\gamemodes\gm.pwn(69) : error 022: must be lvalue (non-constant)
D:\ReDKiiL-PC\Area De Trabalho\BAGUNЗA DO DUDU\Servidores SAMP\Brasil Fly\gamemodes\gm.pwn(73) : warning 204: symbol is assigned a value that is never used: "aeroid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Code todo!
pawn Код:
enum AEROS_ZN
{
NOME[30],
Float:P_POS[3]
}
new InfoAeros[][AEROS_ZN]=
{
{"LS Aeroporto", {1942.6123,-2388.9624,14.2731}},
{"SF Aeroporto", {-1255.0103,-137.0753,14.8701}},
{"LV Aeroporto", {1558.4735,1307.9192,11.5992}}
};
CMD:t(playerid)
{
new perto,aeroid,uperto;
for(new p; p < sizeof(InfoAeros); ++p)
{
floatround(perto) = GetPlayerDistanceFromPoint(playerid,InfoAeros[p][P_POS][0],InfoAeros[p][P_POS][1],InfoAeros[p][P_POS][2]);//linha 69
if(perto < uperto)
{
uperto = perto;
aeroid = p;//linha 73
}
}
return 1;
}
Re: Sistema de local (mais perto) -
zSuYaNw - 08.07.2012
pawn Код:
CMD:t(playerid)
{
new perto,aeroid,uperto;
for(new p; p < sizeof(InfoAeros); ++p)
{
perto = floatround(GetPlayerDistanceFromPoint(playerid,InfoAeros[p][P_POS][0],InfoAeros[p][P_POS][1],InfoAeros[p][P_POS][2]));
if(perto < uperto)
{
uperto = perto;
aeroid = p;
}
}
printf("Perto do aeroporto: %i", aeroid);
return 1;
}
Re: Sistema de local (mais perto) -
ReDKiiL - 08.07.2012
Nгo prestar atenзгo da nisso ;(
Obrigado Garfield!
@off
THE SPIDER WINS!!!