29.03.2011, 11:54
i need cmd for spawn car please give
/veh carid color1 color2
/veh carid color1 color2
CMD:veh( playerid, params[ ] )
{
new string[128], car, colour1, colour2;
if(sscanf(params, "ddd", car, colour1, colour2)) return SendClientMessage(playerid, -1, "USAGE: /car [Model] [Colour 1] [Colour 2]");
if(car < 400 || car > 611) return SendClientMessage(playerid, -1, "ERROR: Invalid Vehicle Model ID!");
new VehicleID;
new Float:X,Float:Y,Float:Z;
new Float:Angle,int1;
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
int1 = GetPlayerInterior(playerid);
VehicleID = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1);
LinkVehicleToInterior(VehicleID,int1);
format(string, sizeof(string), "You have Spawned a Vehicle (Model: %d) with Colours: %d,%d", car, colour1, colour2);
SendClientMessage(playerid,-1, string);
return 1;
}