Hallo,
ich versuche meine Bots zu Connecten und irgendwie will das nicht.
2 /4 Bots gehen aber ich will das alle 4 gehen.
Hier mal mein Script:
//Ganz Oben
new Maverick;
new Maverick2;
new Maverick3;
//OnGameModeInit
ConnectNPC("Maverick","Maverick");
Maverick = CreateVehicle(487, 1000.0,1000.0, 1000.0, 0.0, 1, 1, 1);
vehicle3Dtext[ Maverick ] = Create3DTextLabel( "Hubschrauber Transporter", GRÜN, 0.0, 0.0, 0.0, 50.0, 0, 1 );
ConnectNPC("Maverick2","Maverick2");
Maverick2 = CreateVehicle(487, 1000.0,1000.0, 1000.0, 0.0, 1, 1, 1);
vehicle3Dtext[ Maverick2 ] = Create3DTextLabel( "Hubschrauber Transporter", GRÜN, 0.0, 0.0, 0.0, 50.0, 0, 1 );
ConnectNPC("Maverick3","Maverick3");
Maverick3 = CreateVehicle(487, 1000.0,1000.0, 1000.0, 0.0, 1, 1, 1);
vehicle3Dtext[ Maverick3 ] = Create3DTextLabel( "Hubschrauber Transporter", GRÜN, 0.0, 0.0, 0.0, 50.0, 0, 1 );
//OnPlayerConnect
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Maverick", true))
{
SendClientMessageToAll(ROT,"Der Maverick ist nun im Spiel");
}
new z[MAX_PLAYER_NAME];
GetPlayerName(playerid, z, sizeof(z));
if(!strcmp(z, "Maverick3", true))
{
SendClientMessageToAll(ROT,"Der Maverick3 ist nun im Spiel");
}
new i[MAX_PLAYER_NAME];
GetPlayerName(playerid, i, sizeof(i));
if(!strcmp(i, "Maverick2", true))
{
SendClientMessageToAll(ROT,"Der Maverick2 ist nun im Spiel");
}
//OnPlayerSpawn
SetPVarInt(playerid, "SpielerInReichweite", 0);
new bot[MAX_PLAYER_NAME];
GetPlayerName(playerid, bot, sizeof(bot));
if(!strcmp(botname,"Maverick", true))
{
SetPlayerSkin(playerid, 161);
PutPlayerInVehicle(playerid, Maverick, 0);
}
SetPVarInt(playerid, "SpielerInReichweite", 0);
new i[MAX_PLAYER_NAME];
GetPlayerName(playerid, i, sizeof(i));
if(!strcmp(botname,"Maverick2", true))
{
SetPlayerSkin(playerid, 161);
PutPlayerInVehicle(playerid, Maverick2, 0);
}
SetPVarInt(playerid, "SpielerInReichweite", 0);
new z[MAX_PLAYER_NAME];
GetPlayerName(playerid, z, sizeof(z));
if(!strcmp(botname,"Maverick3", true))
{
SetPlayerSkin(playerid, 161);
PutPlayerInVehicle(playerid, Maverick3, 0);
}
Nun hab ich auch ein Befehl und der kickt mich?
ocmd:botreconnect(playerid,params[])
{
if(IsPlayerAnAdmin(playerid,5))
{
new reason[128],string[128];
if(sscanf(params,"s",reason))return SendClientMessage(playerid,GRAU,"Verwendung: /botreconnect [Grund]");
format(string,sizeof(string),"AdmCmd: %s hat die Bots reconnectet. Grund: %s",SpielerName(playerid),reason);
SendClientMessageToAll(ROT,string);
Kick(BotRanger);
Kick(Maverick);
Kick(Maverick2);
{
print("Maverick 2 gekickt");
}
Kick(Maverick3);
ConnectNPC("Infernus","BotRanger");
ConnectNPC("Maverick","Maverick");
ConnectNPC("Maverick2","Maverick2");
{
print("Maverick 2 connecten");
}
ConnectNPC("Maverick3","Maverick3");
}
else
{
ERROR
}
return 1;
}
Printen tut er die beiden Sachen