SA-MP Forums Archive
Number under car - Attach3DTextLabelToVehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Number under car - Attach3DTextLabelToVehicle (/showthread.php?tid=505159)



Number under car - Attach3DTextLabelToVehicle - MrSnapp - 07.04.2014

I want to attach a 3D Label to a spawned vehicle. I tried creating a /setunit command and that didn't work out so well

My question is how should I attach an assigned unit number underneath the car via an input dialog? The car has just spawned and I want to show an input dialog which they enter a number and it attaches it to the vehicle.

pawn Код:
if (listitem == 0) // LSPD Car
            {
                policecar[playerid] = copcar[random(499)] = CreateVehicle(596,1568.7487,-1696.1331,5.6107,179.7715, 0, 1, 30000);
                SetVehicleNumberPlate(policecar[playerid], "LSPD");
                PutPlayerInVehicle(playerid, policecar[playerid], 0);
                new lights, alarm, doors, bonnet, boot, objective;
                SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective);
                engineOn[policecar[playerid]] = true;
                ccspawn[playerid] = 1;
            }
This is my first time dealing with them so please forgive my noob-ness thanks in advance


Respuesta: Number under car - Attach3DTextLabelToVehicle - OTACON - 07.04.2014

Код:
O_O?
policecar[playerid] = copcar[random(499)] = CreateVehicle(596,1568.7487,-1696.1331,5.6107,179.7715, 0, 1, 30000); //
https://sampwiki.blast.hk/wiki/SetVehicleNumberPlate
https://sampwiki.blast.hk/wiki/CreateVehicle

pawn Код:
if (listitem == 0) // LSPD Car
{
    new lights, alarm, doors, bonnet, boot, objective;
    policecar[playerid] = CreateVehicle(random(499),1568.7487,-1696.1331,5.6107,179.7715, 0, 1, 30000);
    SetVehicleNumberPlate(policecar[playerid], "LSPD");
    PutPlayerInVehicle(playerid, policecar[playerid], 0);
    SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective);
    engineOn[policecar[playerid]] = true;
    ccspawn[playerid] = 1;
}