24/08/2022 09:54
(23/08/2022 23:01)Eduardofi Escreveu: Olá! Gostaria de saber como eu posso fazer um npc(fcnpc) dirigir um veículo até uma posição? Eu tentei fazer, mas o veículo fica andando e teleportando, e não parece estar dirigindo; o outro problema é que tenho que pegar posição de cada parte pra andar, por exemplo, em uma curva eu teria que pegar a posição na hora que irá dar a curva e a posição após dar a curva. Eu queria apenas pegar uma posição inicial e a final
Alguém poderia me ajudar nisso?
Código:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
SendClientMessage(playerid, -1, "Gravacao interrompida!");
StopRecordingPlayerData(playerid);
return 1;
}
CMD:gravarnpc(id, args[])
{
static state;
state = GetPlayerState(id);
StopRecordingPlayerData(playerid);
if(state == PLAYER_STATE_DRIVER)
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_DRIVER, args);
else if(state == PLAYER_STATE_ONFOOT)
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_ONFOOT, args);
else
return SendClientMessage(playerid, -1, "Gravacao apenas ONFOOT e DRIVER!");
SendClientMessage(playerid, -1, "Gravacao iniciada!");
return 1;
}
como carregar o npc:
Código:
FCNPC_StartPlayingPlayback(npcid, "nome da gravação");