Pular para o conteúdo principal

NPC_ExitVehicle

aviso

Esta função foi adicionada no omp v1.5.8.3079 e não funcionará em versões anteriores!

Descrição

Faz um NPC sair de seu veículo atual.

NomeDescrição
npcidO ID do NPC

Retornos

Retorna true se a operação foi bem-sucedida, caso contrário, false.

Exemplos

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/npcexitbike", true))
{
new npcid = PlayerNPC[playerid];
if (npcid == INVALID_NPC_ID)
return SendClientMessage(playerid, 0xFF0000FF, "You are not debugging a NPC.");

if (NPC_ExitVehicle(npcid))
SendClientMessage(playerid, 0x00FF00FF, "NPC %d is exiting motorcycle.", npcid);
else
SendClientMessage(playerid, 0xFF0000FF, "NPC %d failed to exit motorcycle.", npcid);

return 1;
}
return 0;
}

Notas

  • O NPC deve estar em um veículo para que esta função funcione, caso contrário esta função não terá efeito
  • O NPC realizará a animação de saída e após sair o NPC estará a pé próximo ao veículo

Funções Relacionadas

Callbacks Relacionadas

Nenhum callback específico é acionado por esta função.