SA-MP Forums Archive
Help. - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: Help. (/showthread.php?tid=214503)



Help. - Domozinho - 21.01.2011

pawn Код:
public OnRecordingPlaybackEnd()
{
    StartRecordingPlayback(1, "taxistanpc");
    return 1;
}

public OnNPCEnterVehicle(vehicleid, seatid)
{
    StartRecordingPlayback(1, "taxistanpc");
    return 1;
}

public OnNPCExitVehicle()
{
    StopRecordingPlayback();
    return 1;
}

public OnNPCSpawn()
{
    StartRecordingPlayback(1, "taxistanpc");
    return 1;
}
pawn Код:
C:\Users\Pctv\Desktop\beta.pwn(48) : warning 235: public function lacks forward declaration (symbol "OnRecordingPlaybackEnd")
C:\Users\Pctv\Desktop\beta.pwn(50) : error 017: undefined symbol "StartRecordingPlayback"
C:\Users\Pctv\Desktop\beta.pwn(54) : warning 235: public function lacks forward declaration (symbol "OnNPCEnterVehicle")
C:\Users\Pctv\Desktop\beta.pwn(56) : error 017: undefined symbol "StartRecordingPlayback"
C:\Users\Pctv\Desktop\beta.pwn(60) : warning 235: public function lacks forward declaration (symbol "OnNPCExitVehicle")
C:\Users\Pctv\Desktop\beta.pwn(62) : error 017: undefined symbol "StopRecordingPlayback"
C:\Users\Pctv\Desktop\beta.pwn(66) : warning 235: public function lacks forward declaration (symbol "OnNPCSpawn")
C:\Users\Pctv\Desktop\beta.pwn(68) : error 017: undefined symbol "StartRecordingPlayback"
A include estб ativada.


Re: Help. - rjjj - 21.01.2011

Normalmente com a pasta do sa-mp server vem uma FS chamada npc_record.amx, nгo precisa compilб-la, apenas grave seu NPC usando ela e depois sу terб que trabalhar com o arquivo criado na pasta scriptfiles e com o arquivo criado na pasta npcmodes.


Este tutorial deve ajudб-lo:


https://sampforum.blast.hk/showthread.php?tid=109701


Quanto бs funзхes do NPC, vocк pode muito bem usar as funзхes que usa nos players, como SetPlayerPos, entre outras, apenas adicione um if usando strcmp para checar se o nome do jogador й igual ao nome do NPC:

Exemplo:

pawn Код:
new PlayerNick[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerNick, MAX_PLAYER_NAME);
if(strcmp(PlayerNick,"Coloque o Nome do NPC aqui",true)==0)
{
     //Coloque a funзгo para executar no NPC aqui. Exemplo: Kick(playerid);, playerid corresponderб ao NPC
}

Espero ter ajudado


Re: Help. - Domozinho - 21.01.2011

Resolvido.