[Duda] MapAndreas. - 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: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Duda] MapAndreas. (
/showthread.php?tid=469419)
[Duda] MapAndreas. -
Swedky - 13.10.2013
Hola.
Estaba pensando en que para que los Npc's se mantengan a piй (a tierra firme), deberнa utilizar el MapAndreas y un timer para que los mismos se mantengan a piй. Pero la cosa es que no sй como hacerlo
Intentй con esto:
pawn Код:
new Float:Z;
MapAndreas_FindZ_For2DCoord(Pos[0], Pos[1], Z);
SetRNPCPos(i, Pos[0], Pos[1], Z);
Pero no funciona
P/D: Tengo incluido el MapAndreas en los plugin's.
Saludos.
Respuesta: [Duda] MapAndreas. -
adri1 - 13.10.2013
Se hace de otra manera...
pero viste esta funciуn?
quizб te sirva
SetPlayerPosFindZ
Re: [Duda] MapAndreas. -
PT - 13.10.2013
solo isto
https://sampforum.blast.hk/showthread.php?tid=428066
hasta
Respuesta: [Duda] MapAndreas. -
Swedky - 13.10.2013
Quote:
Originally Posted by adri1
|
Sep, con eso ya lo intentй hace mucho.
Quote:
Originally Posted by PT
|
Es un plugin beta, y en linux es muy inestable, por lo cual eso es muy inapropiado :S...
Respuesta: [Duda] MapAndreas. -
Swedky - 15.10.2013
Alguna ayuda?
Respuesta: [Duda] MapAndreas. -
TheChaoz - 16.10.2013
Estas obteniendo la posicion previamente a utilizarlas? ('Pos[0]' y 'Pos[1]')
Respuesta: [Duda] MapAndreas. -
Swedky - 16.10.2013
Quote:
Originally Posted by the_chaoz
Estas obteniendo la posicion previamente a utilizarlas? ('Pos[0]' y 'Pos[1]')
|
Te refieres a esto a algo asн?:
pawn Код:
new Float:Z;
MapAndreas_FindZ_For2DCoord(rnpcpos[0], rnpcpos[1], Z);
GetRNPCPos(i, rnpcpos[0], rnpcpos[1], Z); // Extrae la posiciуn.
SetRNPCPos(i, rnpcpos[0], rnpcpos[1], Z);
Re: [Duda] MapAndreas. -
0xFFFFFF - 16.10.2013
pawn Код:
new Float:Z;
GetRNPCPos(i, rnpcpos[0], rnpcpos[1], Z); // Extrae la posiciуn.
MapAndreas_FindZ_For2DCoord(rnpcpos[0], rnpcpos[1], Z);
SetRNPCPos(i, rnpcpos[0], rnpcpos[1], Z);
Asн seria no?
Respuesta: Re: [Duda] MapAndreas. -
Swedky - 16.10.2013
Quote:
Originally Posted by 0xFFFFFF
pawn Код:
new Float:Z; GetRNPCPos(i, rnpcpos[0], rnpcpos[1], Z); // Extrae la posiciуn. MapAndreas_FindZ_For2DCoord(rnpcpos[0], rnpcpos[1], Z); SetRNPCPos(i, rnpcpos[0], rnpcpos[1], Z);
Asн seria no?
|
Esos giles todavнa vuelan...
Re: [Duda] MapAndreas. -
0xFFFFFF - 16.10.2013
Intenta usando esta funcion:
pawn Код:
#define RUTA_ARCHIVO "aqui la ruta de el archivo que usa el mapandreas en scriptfiles."
forward Float:GetPointZPos(const Float:fX,const Float:fY,&Float:fZ);
public Float:GetPointZPos(const Float:fX,const Float:fY,&Float:fZ)
{
if(!((-3000.0 < fX < 3000.0) && (-3000.0 < fY < 3000.0)))
return 0.0;
static File: s_hMap;
if(!s_hMap)
{
s_hMap = fopen(RUTA_ARCHIVO, io_read);
if(!s_hMap)
return 0.0;
}
new afZ[1];
fseek(s_hMap, ((6000 * (-floatround(fY, floatround_tozero) + 3000) + (floatround(fX, floatround_tozero) + 3000)) << 1));
fblockread(s_hMap, afZ);
return (fZ = ((afZ[0] >>> 16) * 0.01));
}
y su uso seria asi:
pawn Код:
new Float:Z;
GetRNPCPos(i, rnpcpos[0], rnpcpos[1], Z); // Extrae la posiciуn.
GetPointZPos(rnpcpos[0], rnpcpos[1], Z);
SetRNPCPos(i, rnpcpos[0], rnpcpos[1], Z);