Also ich hab ein Bot erstellt der wo mit Limo rum faehrt und ich will das ein andere bot ihn begleitet sprich : 2Bots in 1Car
ich hab alles versucht der bot spawnt neben das Car und steigt nicht als Beifahrer ein sondern bleibt da einfach stehn.
So hab ich es gemacht:
new Text3D:Marc;
public OnGameModeInit()
{
ConnectNPC("BulletLS","BulletLS");
ConnectNPC("BulletSF","BulletSF");
new string[MAX_PLAYER_NAME];
new string1[MAX_PLAYER_NAME];
for(new i = 0; i < AUTOHAUSER; i++)
{
Dtc_Info[i] = CreatePickup(1210, 2, DtcSonstiges[i][0][0],DtcSonstiges[i][0][1],DtcSonstiges[i][0][2],0);
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"Sarah",true))
{
//SetSpawnInfo(playerid,0,205,376.0649,-65.4647,1001.5078,177.8031,0,0,0,0,0,0);
Attach3DTextLabelToPlayer(Sarah,playerid,0.0,0.0,0.45);
SetPlayerSkin(playerid,205);
//SetPlayerInterior(playerid,10);
//SetPlayerPos(playerid,376.0649,-65.4647,1001.5078);
//SetPlayerFacingAngle(playerid,177.8031);
return 1;
}
}
M_OnPlayerSpawn(playerid);
TextDrawShowForPlayer(playerid,Copyright);
TextDrawShowForPlayer(playerid,ModeName);
InitLockDoors(playerid);
STDPlayer[playerid] = 0;
gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
if (gTeam[playerid] == 4) //medic / criminal reset team
{
gTeam[playerid] = 3;
}
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "BulletLS", true))
{
PlayerInfo[playerid][pCarLic] = 1;
PutPlayerInVehicle(playerid, car_BulletLS, 0);
Attach3DTextLabelToPlayer(Heinz,playerid,0.0,0.0,0.45);
SetPlayerSkin(playerid,255);
return 1;
}
}
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "BulletSF", true))
{
PlayerInfo[playerid][pCarLic] = 0;
PutPlayerInVehicle(playerid, car_BulletLS, 1);
Attach3DTextLabelToPlayer(Marc,playerid,0.0,0.0,0.45);
SetPlayerSkin(playerid,164);
return 1;
}
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "** Du musst dich voher einloggen oder dir einen Account erstellen! ***");
Kick(playerid);
return 1;
/* if(gPlayerAccount[playerid] == 1)
{
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, 0);
}
else if(gPlayerAccount[playerid] == 0)
{
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, 0);
}
return 1;
*/
}
Marc = Create3DTextLabel("KingCaN's Bodyguard.",COLOR_RED,0.0,0.0,0.0,5.0,0,0);
Heinz = Create3DTextLabel("KingCaN's Chauffeur.",COLOR_YELLOW,0.0,0.0,0.0,5.0,0,0);
ConnectNPC("BulletLS","BulletLS");
ConnectNPC("BulletSF","BulletSF");