[Ajuda] Problema NPC
#1

Pessoal to com um problema no meu NPC quando eu ligo o servidor, ele aparece como Joined e depois de alguns segundos aparece Left the Server, como resolver? tб aqui o cуdigo

pawn Код:
//Inнcio GM
new NPConibus;

//OnPlayerConnect
if(IsPlayerNPC(playerid)) {
        SpawnPlayer(playerid);
        return 1;
    }

//SetPlayerSpawn //StateChange //RequestClass
if(IsPlayerNPC(playerid)) return 1;

//OnPlayerSpawn
if(IsPlayerNPC(playerid)) //teste bot
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname)); //Obtendo o nome do(s) NPC(s).
        if(!strcmp(npcname, "BOT_Motorista", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
        {
            PutPlayerInVehicle(playerid, NPConibus, 0);
        }
        return 1;
    }

//GameModeInit
NPConibus = AddStaticVehicleEx(431,-247.6109,1201.7476,19.6864,90.3797,2,1,-1); // NPC inicial
ConnectNPC("bot_onibus","Bus");
Reply
#2

BUMP !
Reply
#3

Algo deve tar kickando ele, pode ser algum outro sistema do seu gamemode.
Reply
#4

Tente:
pawn Код:
//Inнcio GM
new NPConibus;

//OnPlayerConnect
if(!IsPlayerNPC(playerid)) {
        SpawnPlayer(playerid);
        return 1;
    }

//SetPlayerSpawn //StateChange //RequestClass
if(!IsPlayerNPC(playerid)) return 1;

//OnPlayerSpawn
if(!IsPlayerNPC(playerid)) //teste bot
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname)); //Obtendo o nome do(s) NPC(s).
        if(!strcmp(npcname, "BOT_Motorista", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
        {
            PutPlayerInVehicle(playerid, NPConibus, 0);
        }
        return 1;
    }

//GameModeInit
NPConibus = AddStaticVehicleEx(431,-247.6109,1201.7476,19.6864,90.3797,2,1,-1); // NPC inicial
ConnectNPC("bot_onibus","Bus");
Espero Ter Ajudado !
Reply
#5

Tira o ! Menos no strcmp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)