Hello Every One i see a Tutorial on forums so i try to make Like That But Npc Join Server and After some Miniutes
its Left the Server .i have must Login system + After Login system player have to Chose class what i do now !!help
Код:
new Hunter;
#endif
public OnGameModeInit()
{
SetTimer("hostname",3000,1);
ConnectNPC("Hunter","mynpc");
Hunter = CreateVehicle(425, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
}
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, "Hunter", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid,Hunter , 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
}