SA-MP Forums Archive
HELP! - 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: HELP! (/showthread.php?tid=484816)



HELP! - iOxide - 01.01.2014

Somebody tell me whats wrong on this code

pawn Код:
new vid, CarSlot, carlabel[MAX_VEHICLES], labelstring[50];

    // Get a free carslot from the house
    CarSlot = House_GetFreeCarSlot(HouseID);

    // Check if there is a free carslot
    if (CarSlot != -1)
    {
        // Create a new vehicle and get the vehicle-id
        vid = CreateVehicle(cModel, cx, cy, cz, crot, Col1, Col2, 600);
        format(labelstring, sizeof(labelstring), "Vehicle owned by %s", AVehicleData[vid][Owner]);
        carlabel[vid] = Create3DTextLabel(labelstring, 0xFFFF00FF, cx, cy, cz, 50.0, 0,0);
        Attach3DTextLabelToVehicle(carlabel[vid], vid, 0.0,0.0,0.0);
        // Store the vehicle-id in the house's free carslot
        AHouseData[HouseID][VehicleIDs][CarSlot] = vid;
Its saying tag missmatched at these 2 lines

Код:
carlabel[vid] = Create3DTextLabel(labelstring, 0xFFFF00FF, cx, cy, cz, 50.0, 0,0);
Attach3DTextLabelToVehicle(carlabel[vid], vid, 0.0,0.0,0.0);



Re: HELP! - Jstylezzz - 01.01.2014

pawn Код:
carlabel[MAX_VEHICLES]
Should be
pawn Код:
Text3D:carlabel[MAX_VEHICLES]
On the first line of code.


Re: HELP! - iOxide - 01.01.2014

LOL! i didn't even notice. Sorry for wasting your time dude. And thanks D: