#1

How can I make a neon system for a private vehicle system? How to save and load neon.
Код:
case 1999:
        {
            if(!response) return 1;

            new Float:X, Float:Y, Float:Z, Float:A;
            GetPlayerPos(playerid, X, Y, Z);
            GetPlayerFacingAngle(playerid, A);

            switch(listitem)
            {
                case 0:
                {
                    if(GetPlayerMoney(playerid) > 25000)
                    {
                        new INI:File = INI_Open(CarPath(playerid));
                        INI_SetTag(File, "CarData");
                        INI_WriteString(File, "Owner", Nick(playerid));
                        INI_WriteInt(File, "Vehicle ID", 541);
                        INI_WriteInt(File, "Color 1", 1);
                        INI_WriteInt(File, "Color 2", 1);
                        INI_WriteFloat(File, "Position X", X);
                        INI_WriteFloat(File, "Position Y", Y);
                        INI_WriteFloat(File, "Position Z", Z);
                        INI_WriteFloat(File, "Facing Angle", A);
                        INI_Close(File);

                        VehicleInfo[vid_][vID_vvv] = 541;
                        VehicleInfo[vid_][vOwner] = Nick(playerid);
                        VehicleInfo[vid_][vColor1] = 1;
                        VehicleInfo[vid_][vColor2] = 1;
                        VehicleInfo[vid_][vX] = X;
                        VehicleInfo[vid_][vY] = Y;
                        VehicleInfo[vid_][vZ] = Z;
                        VehicleInfo[vid_][vA] = A;

                        vid_++;

                        new veh;
                        veh = AddStaticVehicle(541, X, Y, Z, A, 1, 1);
                        PutPlayerInVehicle(playerid, veh, 0);
                        GivePlayerMoney(playerid, -25000);
                    }
                    else
                    {
                        SendClientMessage(playerid, 0, "You don't have enough cash to buy this car!");
                    }
                    return 1;
                }
            }
        }
Reply
#2

Check this system : [FilterScript] Simple Neon System V2 - SA-MP Forums - https://sampforum.blast.hk/showthread.php?tid=287650
Reply
#3

Yes. But I mean to save and load the neon into a private vehicle in Y_INI.
Reply
#4

I did. surely
Код:
//Load Car
PrivateCar = AddStaticVehicle(VehicleInfo[vid_][vID_vvv], VehicleInfo[vid_][vX], VehicleInfo[vid_][vY], VehicleInfo[vid_][vZ], VehicleInfo[vid_][vA], VehicleInfo[vid_][vColor1], VehicleInfo[vid_][vColor2]);

//Load Neon
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18647, 0, 0, 0, 0, 0, 0));
SetPVarInt(playerid, "neon1", CreateObject(18647, 0, 0, 0, 0, 0, 0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), PrivateCar, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), PrivateCar, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
And how can one do this neon system only for a private vehicle?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)