Jump to content
  • 0

Neon


Exaton

Question

Salut sa:mp am si eu o problema la toate masinile si motocicletele se baga 2 neon dar la nrg vreau sa fie doar unu si nu pot am incercat cu if(model == 522) cu switch(car) {

 case 522:

Si am pus acolo 1 neon dar nu merge, ma poate ajuta cineva?

Poftim codu

function AttachNeon(carid) {
    if(CarInfo[carid][cNeon] == 0)
        return true;

    new vehicleid = CarInfo[carid][Spawned];
    switch(CarInfo[carid][cNeon]) {
        case 1: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18652,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18652,0,0,0,0,0,0);
        }
        case 2: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18651,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18651,0,0,0,0,0,0);
        }
        case 3: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18650,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18650,0,0,0,0,0,0);
        }
        case 4: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18649,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18649,0,0,0,0,0,0);
        }
        case 5: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18648,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18648,0,0,0,0,0,0);
        }
        case 6: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18647,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18647,0,0,0,0,0,0);                    
        }
    }
    AttachDynamicObjectToVehicle(NeonObj[0][vehicleid], CarInfo[carid][Spawned], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachDynamicObjectToVehicle(NeonObj[1][vehicleid], CarInfo[carid][Spawned], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    return true;
}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
function AttachNeon(carid) {
    if(CarInfo[carid][cNeon] == 0)
        return true;

    new vehicleid = CarInfo[carid][Spawned];
    switch(CarInfo[carid][cNeon]) {
        case 1: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18652,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18652,0,0,0,0,0,0);
        }
        case 2: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18651,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18651,0,0,0,0,0,0);
        }
        case 3: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18650,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18650,0,0,0,0,0,0);
        }
        case 4: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18649,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18649,0,0,0,0,0,0);
        }
        case 5: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18648,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18648,0,0,0,0,0,0);
        }
        case 6: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18647,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18647,0,0,0,0,0,0);                    
        }
    }
	if( vehicleid == 522 )
	{
    	AttachDynamicObjectToVehicle(NeonObj[0][vehicleid], CarInfo[carid][Spawned], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    	//AttachDynamicObjectToVehicle(NeonObj[1][vehicleid], CarInfo[carid][Spawned], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
	}
	else
	{
		AttachDynamicObjectToVehicle(NeonObj[0][vehicleid], CarInfo[carid][Spawned], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    	AttachDynamicObjectToVehicle(NeonObj[1][vehicleid], CarInfo[carid][Spawned], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
	}
    return true;
}

Incearca asa.

35012l1.png.aee1a3398b9bd9f8eec50574d2cd

Link to comment
Share on other sites

  • 0
Acum 12 ore, [XSR]NexT a spus:
function AttachNeon(carid) {
    if(CarInfo[carid][cNeon] == 0)
        return true;

    new vehicleid = CarInfo[carid][Spawned];
    switch(CarInfo[carid][cNeon]) {
        case 1: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18652,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18652,0,0,0,0,0,0);
        }
        case 2: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18651,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18651,0,0,0,0,0,0);
        }
        case 3: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18650,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18650,0,0,0,0,0,0);
        }
        case 4: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18649,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18649,0,0,0,0,0,0);
        }
        case 5: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18648,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18648,0,0,0,0,0,0);
        }
        case 6: {
            NeonObj[0][vehicleid] = CreateDynamicObject(18647,0,0,0,0,0,0);
            NeonObj[1][vehicleid] = CreateDynamicObject(18647,0,0,0,0,0,0);                    
        }
    }
	if( vehicleid == 522 )
	{
    	AttachDynamicObjectToVehicle(NeonObj[0][vehicleid], CarInfo[carid][Spawned], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    	//AttachDynamicObjectToVehicle(NeonObj[1][vehicleid], CarInfo[carid][Spawned], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
	}
	else
	{
		AttachDynamicObjectToVehicle(NeonObj[0][vehicleid], CarInfo[carid][Spawned], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    	AttachDynamicObjectToVehicle(NeonObj[1][vehicleid], CarInfo[carid][Spawned], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
	}
    return true;
}

Incearca asa.

E la fel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.