NPC bots bug
#1

Hello everybody I have another bug in my gamemode i'll try to create NPC who rides around the city, and it's almost done but again I have mistake...
Code:
In npcmodes:
Код:
#define RECORDING "taksioras" //Jūsų failo pavadinimas.
#define RECORDING_TYPE 1 //1 reiљkia, kad veiksmas vyko transporte, o 2 reiљkia, kad veiksmas buvo ant kojų.

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
    public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
    public OnNPCExitVehicle() StopRecordingPlayback();
#else
    public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
In my Gamemode:
INIT
Код:
    ConnectNPC("Taksistas","taksioras");
    TaksiMasina = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 6, 6, 5000);
in OnPlayerSpawn:
Код:
if(IsPlayerNPC(playerid)) //Tikrina, ar ћaidėjas paleistas kaip NPC botas.
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Gauna NPC boto vardą.
    if(!strcmp(npcname, "Pardaveja", true)) //Tikrina, ar NPC boto vardas Martin_M
        {
        SetPlayerSkin(playerid, 76);
        }
    if(!strcmp(npcname, "Pardaveja_A", true)) //Tikrina, ar NPC boto vardas Martin_M
        {
        SetPlayerSkin(playerid, 76);
        }
	if(!strcmp(npcname, "Taksistas", true)) //Ar čia taksistas?
	    {
	    PutPlayerInVehicle(playerid, TaksiMasina, 0);
	    SetPlayerSkin(playerid, 189);
	    }
    return 1;
    }
The NPC Pardaveja and Pardaveja_A spawns, but the NPC taksistas doesen't run, but connect...
Server_LOG:
Код:
[21:11:02] [npc:join] Pardaveja_A has joined the server (0:127.0.0.1)
[21:11:02] [npc:join] Pardaveja has joined the server (1:127.0.0.1)
[21:11:02] [npc:join] Taksistas has joined the server (2:127.0.0.1)
Thanks in advice for helpin
Reply
#2

Can anyone help me?
Reply
#3

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)