All cars indicators ar working.. (Need help)
#1

SO on vehicle spawn all cars have indicators on like this



Maybe some one could help me out..

With best regards Scrillex.
Reply
#2

Is that mod? If yes, Contact the maker of that mod.
Reply
#3

Quote:
Originally Posted by ChristianIvann09
Посмотреть сообщение
Is that mod? If yes, Contact the maker of that mod.
No, that looks like the use of https://sampwiki.blast.hk/wiki/AttachObjectToVehicle

Make sure when the vehicle is created (statically or whatever), that it has no objects on it.
Reply
#4

I thought the same thing.. But I'm adding cars trough mysql db.. and there is no attachment on them. + I ain't using mods...


CMD one where is attachment..
pawn Код:
if(strcmp(cmd, "/ucl", true) == 0 || strcmp(cmd, "/uclights", true) == 0 || strcmp(cmd, "/undercoverlights", true) == 0)
    {
        if(PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pMember] != 2 &&  PlayerInfo[playerid][pMember] != 14)
        {
            SendClientMessage(playerid, COLOR_RED, "You are not a cop!");
            return 1;
        }
        if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
        {
            SendClientMessage(playerid, COLOR_GREY, "You are not in a car or you are not a driver!");
            return 1;
        }
        new vehicleid = GetPlayerVehicleID(playerid);
        if(UCL[vehicleid] == 0)
        {
            UCL[vehicleid] = CreateObject(18646,0,0,0,0,0,0);
            AttachObjectToVehicle(UCL[vehicleid], GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
            SendClientMessage(playerid, COLOR_WHITE, "Undercover lights on. Type /ucl again to turn the lights off.");
        }
        else
        {
            DestroyObject(UCL[vehicleid]);
            UCL[vehicleid] = 0;
            SendClientMessage(playerid, COLOR_WHITE, "Undercover lights off. Type /ucl again to turn the lights on.");
        }
        return 1;
    }

DIALOG with attachment, that's all..
pawn Код:
else if(dialogid == NEON_DIALOG)
    {
        if(response)
        {
            new vehicleid = GetPlayerVehicleID(playerid);
            if(VehicleNeon1[vehicleid] != 0 && listitem != 6|| VehicleNeon2[vehicleid] != 0 && listitem != 6)
            {
                return SendClientMessage(playerid, COLOR_GREY, "You got neons, remove them first.");
            }
            if(listitem == 0)
            {//blue
                VehicleNeon1[vehicleid] = CreateObject(18648,0,0,0,0,0,0);
                VehicleNeon2[vehicleid] = CreateObject(18648,0,0,0,0,0,0);
                SendClientMessage(playerid, COLOR_BLUE, "Blue neon bought");
            }
            if(listitem == 1)
            {//red
                VehicleNeon1[vehicleid] = CreateObject(18647,0,0,0,0,0,0);
                VehicleNeon2[vehicleid] = CreateObject(18647,0,0,0,0,0,0);
                SendClientMessage(playerid, COLOR_RED, "Red neon bought");
            }
            if(listitem == 2)
            {//green
                VehicleNeon1[vehicleid] = CreateObject(18649,0,0,0,0,0,0);
                VehicleNeon2[vehicleid] = CreateObject(18649,0,0,0,0,0,0);
                SendClientMessage(playerid, COLOR_GREEN, "Green neon bought");
            }
            if(listitem == 3)
            {//white
                VehicleNeon1[vehicleid] = CreateObject(18652,0,0,0,0,0,0);
                VehicleNeon2[vehicleid] = CreateObject(18652,0,0,0,0,0,0);
                SendClientMessage(playerid, COLOR_WHITE, "White neon bought");
            }
            if(listitem == 4)
            {//pink
                VehicleNeon1[vehicleid] = CreateObject(18651,0,0,0,0,0,0);
                VehicleNeon2[vehicleid] = CreateObject(18651,0,0,0,0,0,0);
                SendClientMessage(playerid, COLOR_PURPLE, "Pink neon bought");
            }
            if(listitem == 5)
            {//yellow
                VehicleNeon1[vehicleid] = CreateObject(18650,0,0,0,0,0,0);
                VehicleNeon2[vehicleid] = CreateObject(18650,0,0,0,0,0,0);
                SendClientMessage(playerid, COLOR_YELLOW, "Yellow neon bought");
            }
            if(listitem == 6)
            {//remove neon
                DestroyObject(VehicleNeon1[vehicleid]);
                DestroyObject(VehicleNeon2[vehicleid]);
                VehicleNeon1[vehicleid] = 0;
                VehicleNeon2[vehicleid] = 0;
                return 1;
            }
            AttachObjectToVehicle(VehicleNeon1[vehicleid], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
            AttachObjectToVehicle(VehicleNeon2[vehicleid], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
            GivePlayerPCash(playerid, -200);
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)