Changing car model ID [HELP]
#2

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:
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;
}
You need zcmd and sscanf for this command to work
Reply


Messages In This Thread
Changing car model ID [HELP] - by Dennis - 03.10.2010, 04:27
Re: Changing car model ID [HELP] - by CracK - 03.10.2010, 06:05
Re: Changing car model ID [HELP] - by boelie - 03.10.2010, 09:48
Re: Changing car model ID [HELP] - by Dennis - 03.10.2010, 13:32
Re: Changing car model ID [HELP] - by Calgon - 03.10.2010, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)