//Lightsobject
new Lights1[MAX_PLAYERS];
stock CreateScaledObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:scale)
{
foreach (Player, playerid)
{
for (new slot = 0; slot != 5; ++slot)
{
if (!IsPlayerAttachedObjectSlotUsed(playerid, slot))
{
new
Float:px,
Float:py,
Float:pz;
GetPlayerPos(playerid, px, py, pz);
// Create the object.
SetPlayerAttachedObject(playerid, slot, modelid, 1, x - px, y - py, z - pz, rx ,ry, rz, scale, scale, scale);
// Remove it from the player.
RemovePlayerAttachedObject(playerid, slot);
return 1;
}
}
}
return 0;
}
CMD:test(playerid)
{
Lights1[playerid] = CreateScaledObject(18656, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.0);
AttachObjectToVehicle(Lights1[playerid], GetPlayerVehicleID(playerid), 0.0, -2.588, 3.0, 0.000000, 0.0, 0.0);
return 1;
}

|
It has to work because of ****** wrote that stock himself:http://forum.sa-mp.com/showthread.ph...le#post1163030
and also it worked to attach it to the player scaled how you want it. EDIT: Fixed it myself works now ![]() I can attach scaled objects to vehicles now. |