Duda SendCommand/GetDistanceFromMeToPoint NPC - 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 SendCommand/GetDistanceFromMeToPoint NPC (
/showthread.php?tid=593728)
Duda SendCommand/GetDistanceFromMeToPoint NPC -
H@hn - 08.11.2015
Hola, tengo una consulta, lo que me gustarнa realizar es que un NPC ejecute un comando cuando este en X posiciуn
Estuve ******ando y encontrй estas funciones
SendCommand/GetDistanceFromMeToPoint
pero la verdad no entendн mucho con la informaciуn que dejaron el wiki, alguien para que me explique el uso de estas funciones en los NPC
O que me diga si hay otra manera de que el NPC ejecute un comando mientras lo estoy grabando, no se si me dejo a entender
gracias
Respuesta: Duda SendCommand/GetDistanceFromMeToPoint NPC -
Swedky - 09.11.2015
SendCommand - el NPC envнa un comando al servidor (como cuando un jugador lo hace mediante el chat)
GetDistanceFromMeToPoint - retorna la distancia que hay entre un NPC y un lugar x|y|z.
SendCommand es ъtil para sincronizar el script de tu NPC con el servidor. Por ejemplo, en el script del NPC uso
SendCommnd("/sync_me");, entonces el servidor recibirб ese comando y tъ podrнas saberlo (llamarб a
OnPlayerCommandText
A tu pregunta, lo que podrнas hacer es usar
SetPlayerCheckpoint(npcid, fX, fY, fZ, 1.5);, entonces cuando el NPC llegue a ese lugar
OnPlayerEnterCheckpoint serб llamado.
Respuesta: Duda SendCommand/GetDistanceFromMeToPoint NPC -
H@hn - 09.11.2015
Quote:
Originally Posted by EnzoMetlc
A tu pregunta, lo que podrнas hacer es usar SetPlayerCheckpoint(npcid, fX, fY, fZ, 1.5);, entonces cuando el NPC llegue a ese lugar OnPlayerEnterCheckpoint serб llamado.
|
Muchas gracias, no se me ocurriу lo del Checkpoint.