Few questions about Vehicles giving and Objects Materials :
#2

I've never tried working with object materials, but as regards vehicles, I think you're looking for something like this:

pawn Код:
CMD:givevehicle(const playerid, const params[])
{
    new
        id,
        model,
        vehid,
        Float:pos[4]
    ;
    if(sscanf(params, "ui", id, model)) return SendClientMessage(playerid, -1, "USAGE: /givevehicle <playerid> <modelid>");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Invalid playerid.");
    if(model < 400 || model > 611) return SendClientMessage(playerid, -1, "Invalid modelid.");

    GetPlayerPos(id, pos[0], pos[1], pos[2]);
    GetPlayerFacingAngle(id, pos[3]);
    vehid = CreateVehicle(model, pos[0], pos[1], pos[2], pos[3], -1, -1, 1000);
    PutPlayerInVehicle(id, vehid, 0);

    return 1;
}
Reply


Messages In This Thread
Few questions about Vehicles giving and Objects Materials : - by yaron0600 - 08.05.2013, 11:17
Re: Few questions about Vehicles giving and Objects Materials : - by Pooh7 - 08.05.2013, 11:33
Re: Few questions about Vehicles giving and Objects Materials : - by yaron0600 - 08.05.2013, 11:37
Re: Few questions about Vehicles giving and Objects Materials : - by Pottus - 08.05.2013, 11:45
Re: Few questions about Vehicles giving and Objects Materials : - by yaron0600 - 08.05.2013, 11:53

Forum Jump:


Users browsing this thread: 3 Guest(s)