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


Messages In This Thread
Scale Objects - by redreaper666 - 04.08.2013, 10:22
Re: Scale Objects - by redreaper666 - 04.08.2013, 15:35
Re: Scale Objects - by Pottus - 04.08.2013, 16:55
Re: Scale Objects - by redreaper666 - 05.08.2013, 08:33
Re: Scale Objects - by Mattjones17 - 14.08.2013, 12:24

Forum Jump:


Users browsing this thread: 1 Guest(s)