[NPC] So fica no spawn
#1

Ok, hoje decide criar u NPC, OH, mas o seguinte, ele estas a conectar e tudo, mгггsssss (mas), como nem tudo й perfeito, venho as partes ruins, ele sу fica no spawn !!!

Aqui a ultima log do server_log:
Код:
[14:58:43] Number of vehicle models: 38
[14:58:43] Incoming connection: 127.0.0.1:1781
[14:58:43] [npc:join] Testando has joined the server (0:127.0.0.1)
[14:58:43] [Entrou] Testando entrou no servidor (0:49)
[14:59:14] Incoming connection: 192.168.1.64:1783
[14:59:14] [join] [WinG]BiieL has joined the server (1:192.168.1.64)
[14:59:14] [Entrou] [WinG]BiieL entrou no servidor (1:49)
[14:59:28] RCON (In-Game): Player #1 ([WinG]BiieL) has logged in.
[15:09:04] Saiu : 
[15:09:04] [part] [WinG]BiieL has left the server (1:1)
[15:09:13] --- Server Shutting Down.
[15:09:13] [npc:part] Testando has left the server (0:0)
O testando, foi o nome que dei a ele, ele conecta mesmo, atй aparece lб no server, nгo sei se й minha gravaзгo, porque na minha gravaзгo gravei ele pulando de paraquedas !!! Vou tentar agora dar a arma 46 (paraquedas) quando der spawn.

No meu Gm eu botei:
pawn Код:
//NPC ----------- GameModeInit
    ConnectNPC("Testando","Teste");
No script que tem de criar estб assim:
pawn Код:
#define RECORDING "Teste" //Este й o nome do seu arquivo de gravaзгo, sem a extenзгo(.rec).
#define RECORDING_TYPE 2 //1 para gravaзхes em veнculo e 2 para gravaзхes apй.

#include <a_npc>

main(){}
public OnRecordingPlaybackEnd()
StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 2
  public OnNPCEnterVehicle(vehicleid, seatid)
  StopRecordingPlayback();

  public OnNPCExitVehicle()
  StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#else
  public OnNPCSpawn()
  StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
Acredito que nгo й pela falta da arma, pois se fosse iria aparecer no console que o player (NPC) morreu.

O que hб de errado ?

Bom, nгo era a arma, ja testei com a arma, atй botei isso:
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        GivePlayerWeapon(playerid, 46, 1);
        StartRecordingPlayerData(playerid, 2, "Teste");
        print("Sucesso com o NPC");
    }
    return 1;
}
Mas ainda assim, nгo dб certo, acredito que o erro estб no script que tem de ser criado.

Melhorou, agora ele estб fazendo o print (retirei o mesmo), mas nгo executa as aзхes (a gravaзгo ...)
Botei atй pra setar a skin, setou tambйm, mas o NPC fica no spawn !!!!
Por Que ?


Alguem ??, Por Favor

ALGUEM
Reply
#2

Nossa, um dia e ninguem respondeu, qual й gente ? Alguem ?

Pelo menos eu nгo fico mandando PM pros outros responderem meu tуpico que nem certas pessoas ("loukofire"), viu Roam, kd vc ?
Reply
#3

Vocк tem que por no script para chegar se ele й um player, e setar para que o NPC seje registrado no servidor, pesquise no fуrum que vocк talvez ache alguma coisa. (pesquise em inglкs.)
Reply
#4

cara, eu ano tenho sistema de registro no meu sv, (aleluia alguem respondeu, eu tava ate vendo as teias de aranha aqui ja)
Reply
#5

https://sampforum.blast.hk/showthread.php?tid=169752
Reply
#6

eh anaзfabeto, meu sever NГO TEM sistema de login
Reply
#7

Quote:
Originally Posted by [WinG]BiieL
Посмотреть сообщение
eh anaзfabeto, meu sever NГO TEM sistema de login
Tenta botar no public OnPlayerConnect(playerid)
pawn Код:
if(IsPlayerNPC(playerid))
    {        
        SpawnPlayer(playerid);        
        return 1;
    }
Reply
#8

continua mesma coisa
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)