SA-MP Forums Archive
[Ayuda] GetObjectPos... - 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: [Ayuda] GetObjectPos... (/showthread.php?tid=341027)



[Ayuda] GetObjectPos... - OTACON - 09.05.2012

Buenas a Todos, Necesito ayuda con GetObjectPos, Cree Un IF Con GetObjectPos para comprobar una posicion de un objeto, pero me tira el siguiente error:

error 035: argument type mismatch (argument 2)

Asi Coloco La Lineas:

pawn Код:
if(GetObjectPos(objetoid, -2912.77, 440.21, 7.71))
{
     FUNCION
}
Desde Ya muchas Gracias.

EDIT: Ya Me solucionaron, igual Gracias .


Respuesta: [Ayuda] GetObjectPos... - [Vector] - 09.05.2012

pawn Код:
new Float:X, Float:Y, Float:Z;
GetObjectPos(objetoid, X, Y, Z);
if(X == -2912.77 && Y == 440.21 && Z == 7.71){
    //Funciуn
}
Tu error fue que pusiste el GetObjectPos dentro del if porque GetObjectPos lo que hace es almacenar las coordenadas en 3 variables float, luego para poder comparar tenйs que usar el if y comparar las variables con otros valores.