Liebe Breadfisher,
ich bin verzweifelt ich suche schon seit mehr als einer Woche damit dieser kack bot läuft.
Mein Problem: Der Bot hängt in der Luft. Tut nix.
Codes:
public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)) return 1; // We only deal with NPC players in this script
{
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"BUS1",true))
{
PutPlayerInVehicle(playerid,431,0);
SetPlayerColor(playerid,0xFFFFFFFF);
}
else if(!strcmp(playername,"BUS2",true))
{
PutPlayerInVehicle(playerid,431,0);
SetPlayerColor(playerid,0xFFFFFFFF);
}
}
public SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(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, "BUS1", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, BUSCAR1, 0); //Putting the NPC into the vehicle we created for it.
return 1;
}
if(!strcmp(npcname, "BUS2", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, BUSCAR2, 0); //Putting the NPC into the vehicle we created for it.
return 1;
}//usw...
} //ende für npc
public OnPlayerRequestClass(playerid, classid)
{
if(!IsPlayerNPC(playerid)) return 1;// We only deal with NPC players in this script
{
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"BUS1",true))
{
OnPlayerCommandText(playerid,"/login BOTPASSWORD");
}
else if(!strcmp(playername,"BUS2",true))
{
OnPlayerCommandText(playerid,"/login BOTPASSWORD");
}
}
Der Bot connected, und loggt sich ein. Aber er hängt in der Luft fest.!
Fahrzeug ist da aber keiner wird teleportiert und so.
MfG luXuskerN