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


Messages In This Thread
Server crashes when i /veh - by Hammertime - 19.03.2012, 23:36
Re: Server crashes when i /veh - by Skribblez - 20.03.2012, 02:16
Re: Server crashes when i /veh - by MaximumGaming - 20.03.2012, 03:52
Re: Server crashes when i /veh - by petrolhead - 20.03.2012, 05:12
Re: Server crashes when i /veh - by Hammertime - 20.03.2012, 13:38

Forum Jump:


Users browsing this thread: 1 Guest(s)