AttachObjectToVehicle and delete attached object.
#1

Hello everybody! I Attached a red light to maverick and it's attaching but is isn't detaching. Where is my mistake?
Код:
Definicje:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define RELEASED(%0) \
    (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))

OnPlayerKeyStateChange:
new helilight = CreateObject(18657,0,0,0,0,0,0,100.0);
        if    (PRESSED( KEY_CROUCH ))
        {
            new heliid = GetPlayerVehicleID(playerid);
            switch(GetVehicleModel(heliid))
            {
                case 487:
                {
                    AttachObjectToVehicle(helilight, GetPlayerVehicleID(playerid), 0.004999, 2.019998, 0.599999, -80.025001, 0.000000, 0.000000); //Object Model: 18657 | 0
                    return 1;
                }
            }
        }
        if    (RELEASED( KEY_CROUCH ))
        {
            switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
            {
                case 487:
                {
                    DestroyObject(helilight);
                    return 1;
                }
            }
        }
Reply


Messages In This Thread
AttachObjectToVehicle and delete attached object. - by [TLCL]_ECM_PPP - 22.09.2012, 14:30
Re: AttachObjectToVehicle and delete attached object. - by clarencecuzz - 22.09.2012, 14:36
Re: AttachObjectToVehicle and delete attached object. - by [TLCL]_ECM_PPP - 22.09.2012, 16:48

Forum Jump:


Users browsing this thread: 1 Guest(s)