04.09.2012, 21:34
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");