how to make cmd:findcar
#4

Quote:
Originally Posted by Lucases
Посмотреть сообщение
Код:
CMD:carpos(playerid, params[])
{
	new string[128], CARID;
	if(sscanf(params, "i", CARID)) // Check if there's a param
	{	// There's no param:
		SendClientMessage(playerid, COLOR_RED, "USAGE: /carpos (CARID)");
	}
	else
	{	// There is a param and it's a number (integer):
		if (IsValidVehicle(CARID)) // Check if your param is a valid vehicle
		{	// There is a vehicle with this ID:
			new Float: carx, Float: cary, Float: carz;
			GetVehiclePos(CARID, carx, cary, carz);
			format(string, sizeof(string), "%d's Position: %.3f, %.3f, %.3f.", CARID, carx, cary, carz); // The floats will be shown with 3 point numbers. (Hence the .3, you can change or remove this if you want)
SetPlayerCheckpoint(playerid, carx, cary, carz);
			SendClientMessage(playerid, COLOR_WHITE, string);
			new Float: carangle;
			GetVehicleZAngle(CARID, carangle);
			format(string, sizeof(string), "%d's angle: %.3f.", CARID, carangle);
			SendClientMessage(playerid, COLOR_WHITE, string);
		}
		else
		{	// There is no vehicle with this ID:
			SendClientMessage(playerid, COLOR_RED, "This vehicle does not exist!");
		}
	}
	return 1;
}
i get WARNING (4487 : warning 202: number of arguments does not match definition
Reply


Messages In This Thread
solved how to make cmd:findcar - by langit - 19.11.2017, 15:14
Re: how to make cmd:findcar - by Baseball - 19.11.2017, 15:37
Re: how to make cmd:findcar - by Lucases - 19.11.2017, 19:47
Re: how to make cmd:findcar - by langit - 20.11.2017, 00:03
Re: how to make cmd:findcar - by Beryllium - 20.11.2017, 00:28
Re: how to make cmd:findcar - by L97 - 20.11.2017, 02:56
Re: how to make cmd:findcar - by langit - 20.11.2017, 06:02
Re: how to make cmd:findcar - by langit - 20.11.2017, 06:04

Forum Jump:


Users browsing this thread: 1 Guest(s)