12.06.2013, 13:28
I have made a command but you can only spawn cars by ID.I don't know if you want it.Anyway here it is:
pawn Код:
CMD:v(playerid, params[])
{
new vehicle, carcolor1, carcolor2, Float:x, Float:y, Float:z, Float:Angle;
if(sscanf(params, "iii", vehicle,carcolor1, carcolor2)) return SendClientMessage(playerid, -1, "USAGE: /v [carID] [carcolor1] [carcolor2]");
if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, -1, "Vehicle ID can't be below 400 and higher than 611");
if(carcolor1 < 0 || carcolor1 > 129) return SendClientMessage(playerid, -1, "Carcolor1 can't be below 0 and higher than 129");
if(carcolor2 < 0 || carcolor2 > 129) return SendClientMessage(playerid, -1, "Carcolor2 can't be below 0 and higher than 129");
GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid, Angle);
vehicle = CreateVehicle(vehicle, x,y,z, Angle, carcolor1, carcolor2, 1);
PutPlayerInVehicle(playerid, vehicle, 0);
return 1;
}