AttachDynamicObjectToVehicle
#1

Alright so the problem is quite simple. Im able to attach these lights on my truck but unable to detach them. It entirely ignores the check before the last one ie: vAttachedSiren[vid]
Maybe Im making some really small mistake and I cant see it (havent slept for a while now) so yeah if you find anything thats bugged let me know
PHP код:
if(PRESSED(KEY_FIRE)) {
        if(
IsPlayerInAnyVehicle(playerid)) {
            new 
vid GetPlayerVehicleID(playerid);
            if(
AccInfo[playerid][PlayerFaction] == 1) {
                if(
VehInfo[vid][VehFaction] == 1) {
                    if(
vAttachedSiren[vid] == 0) { //ignores this part, continues going forward
                        
if(GetVehicleModel(vid) == 554) {
                                    
VehicleSiren[vid] = CreateDynamicObject(19419,0,0,0,0,0,0,0,0);
                                    
VehicleSiren[vid] = AttachDynamicObjectToVehicle(VehicleSiren[vid],vid,-0.00282, -0.136810.83630,   0.000000.000000.00000);
                                    
vAttachedSiren[vid] = 1;
                        }
                        else if(
GetVehicleModel(vid) == 515) {
                                    
VehicleSiren[vid] = CreateDynamicObject(194190.004611.292061.23484,   0.000000.000000.00000);
                                    
VehicleSiren[vid] = AttachDynamicObjectToVehicle(VehicleSiren[vid],vid,0.004611.292061.23484,   0.000000.000000.00000);
                                    
vAttachedSiren[vid] = 1;
                        }
                    }
                    else {
                        
DestroyDynamicObject(VehicleSiren[vid]);
                        
vAttachedSiren[vid] = 0;
                    }
                }
            }
        }
    } 
So basically if(vAttachedSiren[vid] == 0) { doesnt work
Reply


Messages In This Thread
AttachDynamicObjectToVehicle - by TwinkiDaBoss - 05.12.2015, 13:02
Re: AttachDynamicObjectToVehicle - by SilverStand - 05.12.2015, 13:15
Re: AttachDynamicObjectToVehicle - by TwinkiDaBoss - 05.12.2015, 13:19
Re: AttachDynamicObjectToVehicle - by SilverStand - 05.12.2015, 13:21
Re: AttachDynamicObjectToVehicle - by TwinkiDaBoss - 05.12.2015, 13:28
Re: AttachDynamicObjectToVehicle - by SilverStand - 05.12.2015, 13:31

Forum Jump:


Users browsing this thread: 1 Guest(s)