Vehicle Owner name?? -
SomebodyAndMe - 12.12.2011
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?
Code for cardata:
pawn Код:
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;
}
EDIT and there is a define:
pawn Код:
// Setup a custom type to hold all data about a vehicle
enum TVehicleData
{
bool:MafiaLoad, // Holds True if the vehicle (or trailer) is carrying a mafia-wanted load
Fuel, // Holds the amount of fuel for this vehicle
BelongsToHouse, // Holds the HouseID to which this vehicle belongs
bool:StaticVehicle, // Holds true if this is a static vehicle
bool:Owned, // Holds true if the vehicle is owned by somebody
Owner[24], // Holds the name of the owned of the vehicle
Model, // Holds the vehicle-model of this vehicle
PaintJob, // Holds the ID of the paintjob applied to the vehicle
Components[14], // Holds all Component-ID's for all components on the vehicle
Color1, // Holds the primary color for this vehicle
Color2, // Holds the secundairy color for this vehicle
NeonLeft, // Holds the neon-object on the left side
NeonRight, // Holds the neon-object on the right side
Float:SpawnX, // Holds the X-coordinate of the parking spot for this vehicle
Float:SpawnY, // Holds the Y-coordinate of the parking spot for this vehicle
Float:SpawnZ, // Holds the Z-coordinate of the parking spot for this vehicle
Float:SpawnRot, // Holds the rotation of the parking spot for this vehicle
bool:Clamped // Holds "true" if the vehicle is clamped by an admin
}
Re: Vehicle Owner name?? -
SomebodyAndMe - 13.12.2011
Someone? I need it fast!
Ty.
Re: Vehicle Owner name?? -
SomebodyAndMe - 13.12.2011
The end of day 2 still no answers.. Please help me figure this out. Thanks.
Sorry for the BUMP.
Re: Vehicle Owner name?? -
JamesC - 13.12.2011
What exactly do you want? Please explain a bit better.
Re: Vehicle Owner name?? -
SomebodyAndMe - 13.12.2011
I want it that players can see the owner name with a 3d textlabel or something similar with it.
Re: Vehicle Owner name?? -
SomebodyAndMe - 14.12.2011
Someone know's how to do this?
Re: Vehicle Owner name?? - suhrab_mujeeb - 14.12.2011
Don't bump the topics so fast, you are no VIP. There are tons of people waiting the list down there to get their problems solved.
Re: Vehicle Owner name?? -
SomebodyAndMe - 18.12.2011
Ok, then I will bump this topic now after 72 hours. :P
Re: Vehicle Owner name?? -
FarSe. - 18.12.2011
In That Function
pawn Код:
if(_:AVehicleData[vid][ZaText] != 0)Delete3DTextLabel(AVehicleData[vid][ZaText]);
vid = House_AddVehicle(HouseID, cModel, cPaint, cComponents, Float:cx, Float:cy, Float:cz, Float:crot, Col1, Col2);///reference this line
new string[50];format(string, 50, "Owner:{77FF00}%s",AVehicleData[vid][Owner]);
AVehicleData[vid][ZaText] = Create3DTextLabel(string,0xFF0000FF,cx,cy,cz,40,1);
Attach3DTextLabelToVehicle(AVehicleData[vid][ZaText],vid,0.0,0.0,+0.4);
In Enum:
I king this is what you want.
Re: Vehicle Owner name?? -
SomebodyAndMe - 18.12.2011
Thanks alot, but getting some errors.
Код:
C:\Users\Barbara\Desktop\SAMP Kevin\hoi\pawno\include\PPC_Housing.inc(292) : error 029: invalid expression, assumed zero
C:\Users\Barbara\Desktop\SAMP Kevin\hoi\pawno\include\PPC_Housing.inc(292) : warning 215: expression has no effect
C:\Users\Barbara\Desktop\SAMP Kevin\hoi\pawno\include\PPC_Housing.inc(292) : error 001: expected token: ";", but found ")"
C:\Users\Barbara\Desktop\SAMP Kevin\hoi\pawno\include\PPC_Housing.inc(292) : error 029: invalid expression, assumed zero
C:\Users\Barbara\Desktop\SAMP Kevin\hoi\pawno\include\PPC_Housing.inc(292) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
The script with line 292:
pawn Код:
if(_:AVehicleData[vid][ZaText] != 0)Delete3DTextLabel(AVehicleData[vid][ZaText]);
vid = House_AddVehicle(HouseID, cModel, cPaint, cComponents, Float:cx, Float:cy, Float:cz, Float:crot, Col1, Col2);///reference this line
new string[50];format(string, 50, "Owner:{77FF00}%s",AVehicleData[vid][Owner]);
AVehicleData[vid][ZaText] = Create3DTextLabel(string,0xFF0000FF,cx,cy,cz,40,1);
Attach3DTextLabelToVehicle(AVehicleData[vid][ZaText],vid,0.0,0.0,+0.4); //line 292