03.10.2010, 06:05
There is no such a function. You need to destroy and then recreate the vehicle with a new model id
If you mean the command that changes the model of the vehicle you are currently in, then here's it:
You need zcmd and sscanf for this command to work
If you mean the command that changes the model of the vehicle you are currently in, then here's it:
pawn Код:
cmd(setcarmodel, playerid, params[])
{
new model;
if(sscanf(params,"i",model)) SendClientMessage(playerid, 0xFFFFFFFF, "You haven't specified the model id");
else
{
new Float:x, Float:y, Float:z, Float:a, id;
id = GetPlayerVehicleID(playerid);
GetVehicleZAngle(id, a);
GetVehiclePos(id, x, y, z);
RemovePlayerFromVehicle(playerid);
DestroyVehicle(id);
id = CreateVehicle(model, x, y, z, a, -1, -1, 999999);
PutPlayerInVehicle(playerid, id, 0);
}
return 1;
}

