Abend,
Ich habe mich mal an mein Script gesetzt und versucht einen Zug als Bot zu erstellen, der einmal um die Map fährt stehen bleibt usw...
Nunja der Bot bewegt sich nicht. Spawnt aber .
SA-MP Dedicated Server
----------------------
v0.3x, (C)2005-2013 SA-MP Team
[19:06:52]
[19:06:52] Server Plugins
[19:06:52] --------------
[19:06:52] Loading plugin: sscanf
[19:06:52]
[19:06:52] ===============================
[19:06:52] sscanf plugin loaded.
[19:06:52] Version: 2.8.1
[19:06:52] (c) 2012 Alex "Y_Less" Cole
[19:06:52] ===============================
[19:06:52] Loaded.
[19:06:52] Loaded 1 plugins.
[19:06:52]
[19:06:52] Filterscripts
[19:06:52] ---------------
[19:06:52] Loading filterscript 'gl_realtime.amx'...
[19:06:52] Loaded 1 filterscripts.
[19:06:53] Only create trains with AddStaticVehicle/Ex // Erstellt
[19:06:53]
----------------------------------
[19:06:53] German Reallife
[19:06:53] ----------------------------------
[19:06:53] Number of vehicle models: 107
[19:06:53] Incoming connection: 127.0.0.1:61449 //spawnt
[19:07:26] Incoming connection: 127.0.0.1:57591
[19:07:26] [join] Ralf124 has joined the server (0:127.0.0.1)
Sciptausschnitt:
public OnGameModeInit()
{
ConnectNPC("Zug","Zug");
car_Zug = AddStaticVehicle(538, 1000.0,1000.0, 1000.0,100.321,0,1);
SetGameModeText("German Reallife");
DisableInteriorEnterExits();
EnableStuntBonusForAll(0);
Das ist bei OnPlayerConnect:
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if (!strcmp(botname, "Zug", true))
{
gPlayerLogged[playerid]=1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Zug", true))
{
PutPlayerInVehicle(playerid, car_Zug, 0);
}
}
return 1;
}