Ich hab das jetzt so gemacht:
public OnPlayerConnect(playerid)
{
new tmppass[64];
if(IsPlayerNPC(playerid))
{
OnPlayerLogin(playerid,tmppass);
return 1;
}
public OnPlayerLogin(playerid,password[])
{
if(IsPlayerNPC(playerid))
{
SetSpawnInfo(playerid,69,255,1462.0745,2630.8787,10.8203,0.0,-1,-1,-1,-1,-1,-1);
gPlayerLogged[playerid] = 1;
SpawnPlayer(playerid);
}
return 1;
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "BUSNPCA", true))
{
PutPlayerInVehicle(playerid, BUSBOT1, 0);
return 1;
}
else if(!strcmp(npcname, "BUSNPCB", true))
{
PutPlayerInVehicle(playerid, BUSBOT2, 0);
return 1;
}
return 1;
}
Allerdings sieht das im Server Log dann so aus:
[13:11:11] Incoming connection: 127.0.0.1:51656
[13:11:11] [npc:join] BUSNPCA has joined the server (0:127.0.0.1)
[13:11:11] BUSNPCA has logged in.
[13:11:11] Incoming connection: 127.0.0.1:51657
[13:11:11] [npc:join] BUSNPCB has joined the server (1:127.0.0.1)
[13:11:11] BUSNPCB has logged in.
[13:11:22] [npc:part] BUSNPCB has left the server (1:0)
[13:11:22] [npc:part] BUSNPCA has left the server (0:0)
Was kann ich da machen?