[Duda] MapAndreas.
#1

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.
Reply
#2

Se hace de otra manera...
pero viste esta funciуn?
quizб te sirva
SetPlayerPosFindZ
Reply
#3

solo isto

https://sampforum.blast.hk/showthread.php?tid=428066

hasta
Reply
#4

Quote:
Originally Posted by adri1
Посмотреть сообщение
Se hace de otra manera...
pero viste esta funciуn?
quizб te sirva
SetPlayerPosFindZ
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...
Reply
#5

Alguna ayuda?
Reply
#6

Estas obteniendo la posicion previamente a utilizarlas? ('Pos[0]' y 'Pos[1]')
Reply
#7

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);
Reply
#8

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?
Reply
#9

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...
Reply
#10

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)