NPC Skip the login Dialog HELP
#3

In the GameMode. Not in the NPCs.

GAMEMODE:

Code:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid)) return 1;
	SetupPlayerForClassSelection(playerid, classid);
	return 1;
}

OnPlayerConnect: if(IsPlayerNPC(playerid)) return 1;

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  	{
    	new npcname[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
    if(!strcmp(npcname, "PoliceAndChatBotByte", true)) //Checking if the NPC's name is MyFirstNPC
    {
        SetPlayerColor(playerid,YELLOW);
      	PutPlayerInVehicle(playerid, PoliceAndChatBotByteVehicle, 0); //Putting the NPC into the vehicle we created for it.
      	return 1;
    }
    if(!strcmp(npcname, "WorldBus", true))
    {
        SetPlayerColor(playerid,YELLOW);
      	PutPlayerInVehicle(playerid, WorldBusVehicle, 0);
      	return 1;
    }
    return 1;
  }
.....

OnGameModeInit:
ConnectNPC("PoliceAndChatBotByte","sfpdpolice");
PoliceAndChatBotByteVehicle = CreateVehicle(597, 0.0, 0.0, 5.0, 0.0, 0, 1, 5000);
ConnectNPC("WorldBus","busdriver");
WorldBusVehicle = CreateVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
Reply


Messages In This Thread
NPC Skip the login Dialog HELP - by Stoyanov - 08.01.2015, 20:13
Re: NPC Skip the login Dialog HELP - by HeLiOn_PrImE - 08.01.2015, 20:48
Re: NPC Skip the login Dialog HELP - by Stoyanov - 08.01.2015, 20:52
Re: NPC Skip the login Dialog HELP - by HeLiOn_PrImE - 08.01.2015, 21:15
Re: NPC Skip the login Dialog HELP - by Stoyanov - 09.01.2015, 04:49
Re: NPC Skip the login Dialog HELP - by cyberlord - 09.01.2015, 06:04
Re: NPC Skip the login Dialog HELP - by KayJ - 09.01.2015, 06:29
Re: NPC Skip the login Dialog HELP - by Stoyanov - 09.01.2015, 11:44
Re: NPC Skip the login Dialog HELP - by Clad - 09.01.2015, 11:47
Re: NPC Skip the login Dialog HELP - by Stoyanov - 09.01.2015, 18:20

Forum Jump:


Users browsing this thread: 2 Guest(s)