Server crashes when i /veh
#1

Hello. Everytime i type /veh the server crashes.
My /veh command is

Код:
command(veh, playerid, params[])
{
	new carid, string[128], Float: CarToX, Float: CarToY, Float: CarToZ, physical_car_id;
	if(sscanf(params, "d", carid))
	{
	    if(Player[playerid][AdminLevel] >= 3)
	    {
			SendClientMessage(playerid, WHITE, "Server:  /veh [vehicleid]");
		}
	}
	else
	{
		if(Player[playerid][AdminLevel] >= 3)
		{
	    	if(CarCount < MAX_VEHICLES)
	    	{
				if(carid < 400 || carid > 611)
				{
					SendClientMessage(playerid, WHITE, "Valid car IDs start from 400, ending at 611.");
				    return 1;
				}
				GetPlayerPos(playerid, CarToX, CarToY, CarToZ);
				physical_car_id = CreateVehicle(carid, CarToX, CarToY+4, CarToZ, 90, -1, -1, -1);
				format(string, sizeof(string), "PF11 %i", carid);
				SetVehicleNumberPlate(physical_car_id, string);
				SetVehicleToRespawn(physical_car_id);
				PutPlayerInVehicle(playerid, physical_car_id, 0);
				new vehid = GetPlayerVehicleID(playerid);
				format(string, sizeof(string), "[AdmCmd] %s has spawned a vehicle; Model ID: %d - Vehicle ID: %d", RemoveUnderScore(playerid), carid, vehid);
				SendToAdmins(RED, string, 0);
				fuel[physical_car_id] = 100;
				Player[playerid][KeyShare] = physical_car_id;
				LinkVehicleToInterior(physical_car_id, GetPlayerInterior(playerid));
				Engine[physical_car_id] = 0;
				Windows[physical_car_id] = 0;
				Siren[physical_car_id] = 0;
				SirenObject[physical_car_id] = 0;
				Lights[physical_car_id] = 0;
				AdminSpawned[physical_car_id] = 1;
		    }
		}
		else return SendClientMessage(playerid, GREY, "You must be on Admin Duty to perform this command.");
	}
	return 1;
}
Does anyone know what is wrong?
Reply
#2

what shows up in the server_log.txt after your server crashes?
Reply
#3

Quote:
Originally Posted by Skribblez
Посмотреть сообщение
what shows up in the server_log.txt after your server crashes?
Yes give us some server logs
Reply
#4

whole server crashes with players or only you?
Reply
#5

The whole server crashes and the samp-server.exe shuts down.

Quote:

SA-MP Dedicated Server
----------------------
v0.3d, ©2005-2011 SA-MP Team

[00:40:24] password = "" (string)
[00:40:24] filterscripts = "" (string)
[00:40:24]
[00:40:24] Server Plugins
[00:40:24] --------------
[00:40:24] Loading plugin: sscanf.dll
[00:40:24]

[00:40:24] ===============================

[00:40:24] sscanf plugin loaded.

[00:40:24] © 2009 Alex "******" Cole

[00:40:24] ===============================

[00:40:24] Loaded.
[00:40:24] Loading plugin: streamer.dll
[00:40:24]

*** Streamer Plugin v2.5.2 by Incognito loaded ***

[00:40:24] Loaded.
[00:40:24] Loaded 2 plugins.

[00:40:24]
[00:40:24] Filterscripts
[00:40:24] ---------------
[00:40:24] Loaded 0 filterscripts.

[00:40:24]
[00:40:24] =======================================
[00:40:24] | |
[00:40:24] | YSI version 1.03.0011 |
[00:40:24] | By Alex "******" Cole |
[00:40:24] | |
[00:40:24] | Checking the latest YSI version.. |
[00:40:24] | |
[00:40:24] =======================================
[00:40:24]
[00:40:24] Server: Please wait whilst the script initiates...
[00:40:24] Server: Loading Spawn.ini
[00:40:24] Server: Loaded file Spawn.ini! Proceeding..
[00:40:24] Server: Loading Configuration.ini
[00:40:24] Server: Loaded file Configuration.ini! Proceeding..
[00:40:24] Server: Loading Assets.ini
[00:40:24] Server: Loaded file Assets.ini! Proceeding..
[00:40:24] Camera has succesfully loaded 1 camera(s).
[00:40:24] [system] Vehicle 0 has spawned (spawned from Vehicles.json).
[00:40:24] [system] Vehicle 1 has spawned (spawned from Vehicles.json).
[00:40:24] [system] Vehicle 2 has spawned (spawned from Vehicles.json).
[00:40:24] Server: Gas Station 1 spawned.
[00:40:24] Server: Business 1 spawned.
[00:40:24] Server: Business 2 spawned.
[00:40:24] Server: Business 3 spawned.
[00:40:24] Server: Business 4 spawned.
[00:40:24] Server: Business 5 spawned.
[00:40:24] Server: Business 6 spawned.
[00:40:24] Server: Business 7 spawned.
[00:40:24] Server: Business 8 spawned.
[00:40:24] Server: Business 9 spawned.
[00:40:24] Server: Business 10 spawned.
[00:40:24] Server: Business 11 spawned.
[00:40:24] Server: Business 13 spawned.
[00:40:24] Server: Business 14 spawned.
[00:40:24] Server: Business 15 spawned.
[00:40:24] Server: Business 16 spawned.
[00:40:24] Server: Group 1 spawned.
[00:40:24] Server: Group 2 spawned.
[00:40:24] Server: Group 3 spawned.
[00:40:24] Server: Group 4 spawned.
[00:40:24] Server: Group 5 spawned.
[00:40:24] Server: Group 6 spawned.
[00:40:24] Server: Group 7 spawned.
[00:40:24] Server: Group 8 spawned.
[00:40:24] Server: Group 9 spawned.
[00:40:24] Server: Group 10 spawned.
[00:40:24] Server: Group 11 spawned.
[00:40:24] Server: Group 12 spawned.
[00:40:24] Server: Group 13 spawned.
[00:40:24] Server: Group 14 spawned.
[00:40:24] Server: Group 15 spawned.
[00:40:24] Server: Group 16 spawned.
[00:40:24] Server: Group 17 spawned.
[00:40:24] Server: Group 18 spawned.
[00:40:24] Server: Group 19 spawned.
[00:40:24] Server: Script Initialized.
[00:40:24] Number of vehicle models: 2
[00:40:44] Incoming connection: 31.45.26.164:58392
[00:40:44] [join] Christian_Hammer has joined the server (0:31.45.26.164)
[00:40:44] Christian Hammer (ID 0) has joined the Server.{FFFFFF} IP: 31.45.26.164
[00:40:44] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<?>.
[00:40:44] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:40:44] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:40:45]
[00:40:45] =======================================
[00:40:45] | |
[00:40:45] | Error: Could not connect to YSI |
[00:40:45] | update server (response was 003). |
[00:40:45] | |
[00:40:45] =======================================
[00:40:45]

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)