Scale Objects
#1

So as i found out that you can actually scale objects on a special way i tried to attach that object to a car afterwards but somehow it aint working maybe you can help me.
Код:
//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;
}
Reply
#2

Anyone ?
Reply
#3

Even if it would work which it won't your not even returning the object id your returning 1.
Reply
#4

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:
Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Even if it would work which it won't.
Fixed it myself works now
I can attach scaled objects to vehicles now.
Reply
#5

Quote:
Originally Posted by redreaper666
Посмотреть сообщение
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.
How did you get it working? Would be interested in doing this myself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)