23.12.2013, 13:34
(
Последний раз редактировалось Sydcul; 27.12.2013 в 16:48.
Причина: Unclear title
)
Hello,
My server crashes when trying to run it. It stops while/after reading the filterscript (according to the logfile). I tried running an empty GM too, but that did not work either. Everything works when I disable this FS. I used the loops and all so I can add new buses to an INI file later on.
server.cfg
bus.pwn (filterscript)
bus.pwn (npc mode)
Logfile:
My server crashes when trying to run it. It stops while/after reading the filterscript (according to the logfile). I tried running an empty GM too, but that did not work either. Everything works when I disable this FS. I used the loops and all so I can add new buses to an INI file later on.
server.cfg
Код:
echo Executing Server Config... lanmode 0 rcon_password password maxplayers 50 port 7777 hostname Sydcul's SA-MP Server gamemode0 grandlarc 1 filterscripts bus announce 0 query 1 chatlogging 0 weburl www.sydcul.com onfoot_rate 40 incar_rate 40 weapon_rate 40 stream_distance 300.0 stream_rate 1000 maxnpc 10 logtimeformat [%H:%M:%S]
Код:
// © 2013 Sydcul. All rights reserved. #include <a_samp> new bus[][4][MAX_PLAYER_NAME+1] = { //Format: player/recording name, vehicle id, fare per IRL second {"Fred", 400, 10, 0} }; public OnFilterScriptInit() { print("Bus v1.0 - by Sydcul"); for(new i = 0; i < sizeof bus[]; i++) { ConnectNPC(bus[i][0][0], "bus"); bus[i][3][0] = CreateVehicle(bus[i][1][0], 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); } return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) { for(new i = 0; i < sizeof bus[]; i++) { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); if(!strcmp(npcname, bus[i][0][0], true)) { SetPlayerSkin(playerid, 253); PutPlayerInVehicle(playerid, bus[i][3][0], 0); } } return 1; } return 1; }
Код:
#include <a_npc> new name[MAX_PLAYER_NAME+1]; public OnNPCConnect(myplayerid) { GetPlayerName(myplayerid, name, sizeof(name)); } public OnRecordingPlaybackEnd() { StartRecordingPlayback(1, name); } public OnNPCEnterVehicle(vehicleid, seatid){ StartRecordingPlayback(1, name); } public OnNPCExitVehicle(){ StopRecordingPlayback(); }
Код:
SA-MP Dedicated Server ---------------------- v0.3x-R2, ©2005-2013 SA-MP Team [15:30:27] [15:30:27] Server Plugins [15:30:27] -------------- [15:30:27] Loaded 0 plugins. [15:30:27] [15:30:27] Filterscripts [15:30:27] --------------- [15:30:27] Loading filterscript 'bus.amx'... [15:30:27] Bus v1.0 - by Sydcul