Few questions about Vehicles giving and Objects Materials :
#1

Few questions about Vehicles giving and Objects Materials :

- 1 . Can you give me the full line of example in that object I want will be write : "RULES"

Код:
CreateDynamicObject(2737, 1701.65, -1872.02, 15.46,   0.00, 0.00, 180.00);
- 2 . How can I give player vehicle ? Give me full line please...
Reply
#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
#3

Quote:
Originally Posted by Pooh7
Посмотреть сообщение
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;
}
Its nice man but I really wanna make a dealership system that /buycar show u dialog of cars u can choose :

"Normal , Sports , LowRiders , Bikes" And I dont know how make it all after u press on Sports for example thats show u Infernus , Sultan to choose with the price...
Reply
#4

Are you looking for something like this ?

pawn Код:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////420medit Filter Script Export////////////////////////////////////////////////////////////////////////////////
////medit/carexports/rules.pwn By: [uL]Pottus
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include <a_samp>

new VObject_0;

new CarVid;

public OnFilterScriptInit()
{
    CarVid = CreateVehicle(559, 2485.702636, -1664.794189, 12.963111, 1.945271, 122, 70, 3600);
    ChangeVehiclePaintjob(CarVid, 3);

    VObject_0 = CreateObject(19482, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);

    SetObjectMaterialText(VObject_0, "RULES", 0, 130, "Ariel", 50, 1, -65536, 0, 1);

    AttachObjectToVehicle(VObject_0, CarVid, 0.000000, 1.500000, 0.279999, -2.000000, -90.000000, 45.000000);
}

public OnFilterScriptExit()
{
    DestroyVehicle(CarVid);

    DestroyObject(VObject_0);
}

public OnVehicleSpawn(vehicleid)
{
    if(CarVid == vehicleid)
    {
        ChangeVehiclePaintjob(vehicleid, 3);
    }
}
Reply
#5

Lol man no ty for trying help but only you helped me with the ObjectMaterial , Ty dude , I want to create /buycar system show dialog of vehicles sports , normal , lowriders , BIkerss I'll show you the code here of that but IDK how to create the dialog :

Код:
CMD:buycar(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 4.0, -71.419654846191,1360.4097900391,1080.2185058594)) return SendClientMessage(playerid, -1, "You are not in range of the Car DealerShip!");
    ShowPlayerDialog(playerid, 2812, DIALOG_STYLE_LIST, "Cars", "Normal Cars\nSports Vehicles\nLow Riders Vehicles\nBikes Vehicles", "Select", "Cancel");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)