Car owner with 3dtext label - 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: Car owner with 3dtext label (
/showthread.php?tid=564863)
Car owner with 3dtext label -
wahyumahadir - 23.02.2015
hello guys
How to make it like when someone is online the vehicles spawn( in my script) and that there stand: Car owner: "Ownername" Who can make that for me? Or explain it?
Car Data Code
Код:
House_ReplaceVehicle(HouseID, CarSlot)
{
// Setup local variables
new vid, cModel, cPaint, cComponents[14], Float:cx, Float:cy, Float:cz, Float:crot, Col1, Col2, Float:Health, cFuel;
new panels, doors, lights, tires;
// Get the data from the already existing vehicle that was parked before
vid = AHouseData[HouseID][VehicleIDs][CarSlot];
cModel = AVehicleData[vid][Model];
cPaint = AVehicleData[vid][PaintJob];
cFuel = AVehicleData[vid][Fuel];
for (new i; i < 14; i++)
cComponents[i] = AVehicleData[vid][Components][i];
Col1 = AVehicleData[vid][Color1];
Col2 = AVehicleData[vid][Color2];
cx = AVehicleData[vid][SpawnX];
cy = AVehicleData[vid][SpawnY];
cz = AVehicleData[vid][SpawnZ];
crot = AVehicleData[vid][SpawnRot];
GetVehicleHealth(vid, Health);
GetVehicleDamageStatus(vid, panels, doors, lights, tires);
// Delete the vehicle and clear the data
Vehicle_Delete(vid);
// Create a new vehicle in the same carslot
vid = House_AddVehicle(HouseID, cModel, cPaint, cComponents, Float:cx, Float:cy, Float:cz, Float:crot, Col1, Col2);
// Update the fuel of the vehicle to the previous setting
AVehicleData[vid][Fuel] = cFuel;
// Update the health to what it was before and update the bodywork
SetVehicleHealth(vid, Health);
UpdateVehicleDamageStatus(vid, panels, doors, lights, tires);
return vid;
}
Help me please
Re : Car owner with 3dtext label -
Golimad - 23.02.2015
Exemple code :
Код:
new Text3D:vehicle3Dtext[MAX_VEHICLES],vehicle_id;
// Creating the TextLabel for later use
public OnGameModeInit ( )
{
vehicle_id = CreateVehicle( 510, 0.0. 0.0, 15.0, 5, 0, 120 );
vehicle3Dtext[ vehicle_id ] = Create3DTextLabel( "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
//Creating the Vehicle
//Attaching Text Label To Vehicle
Attach3DTextLabelToVehicle( vehicle3Dtext[ vehicle_id ] , vehicle_id, 0.0, 0.0, 2.0);
}
public OnGameModeExit ( )
{
Delete3DTextLabel( vehicle3Dtext[ vehicle_id ] );
return true;
}
Source to read more about it :
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle
Re: Car owner with 3dtext label -
HyperLink - 24.02.2015
I already done it for PPC_Housing...It has 7 Warnings but its working.
I Prefer Remove Car System from house system and Use AVS.
Because I ll do it too
Because your house system is not made for this kind of things..and also it has some bugs after i used 3d text label on cars. thats why i will remove car system from the house system.