10.05.2014, 00:32
Using ZCMD:
pawn Код:
CMD:veh(playerid,params[])
{
if(P_Info[playerid][Admin] >= 4) {
// Use the below line, if you have a engine script.
// new lights,alarm,doors,bonnet,boot,objective;
new Float:Pos[3], model, Col[2], CreatedCar;
if(sscanf(params,"iii",model,Col[0],Col[1])) return SendClientMessage(playerid, -1, "SYNTAX: /veh [model] [Color-1] [Color-2]");
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
CreatedCar = CreateVehicle(model,Pos[0],Pos[1],Pos[2],0.0,Col[0],Col[1],60000);
new vw = GetPlayerVirtualWorld(playerid);
SetVehicleVirtualWorld(CreatedCar, vw);
PutPlayerInVehicle(playerid, CreatedCar, 0);
// Use SetVehicleParams if you have a engine script.
// SetVehicleParamsEx(CreatedCar,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
}
return 1;
}