Jump to content
  • 0

Problema neoane


rObY.

Question

Salutare, am si eu o problema cu neoanele. Cumpar neonul din /shop, il aplic pe masina, dar nu se ataseaza in nici-un fel neon-ul de masina. ( nu apare neonul deloc )

 

function AttachNeon(playerid, idcar) {
	if(PlayerInfo[playerid][pCarNeon][idcar] != 0) {
		new neoooonss;
		if(PlayerInfo[playerid][pCarNeon][idcar] == 1) neoooonss = 18647;
		else if(PlayerInfo[playerid][pCarNeon][idcar] == 2) neoooonss = 18649;
		else if(PlayerInfo[playerid][pCarNeon][idcar] == 3) neoooonss = 18650;
		else if(PlayerInfo[playerid][pCarNeon][idcar] == 4) neoooonss = 18651;
		else if(PlayerInfo[playerid][pCarNeon][idcar] == 5) neoooonss = 18648;
		DestroyObject(Neons[0][PlayerInfo[playerid][pCarID][idcar]]);
		DestroyObject(Neons[1][PlayerInfo[playerid][pCarID][idcar]]);
		Neons[0][PlayerInfo[playerid][pCarID][idcar]] = CreateObject(neoooonss,0,0,0,0,0,0);
		Neons[1][PlayerInfo[playerid][pCarID][idcar]] = CreateObject(neoooonss,0,0,0,0,0,0);
        AttachObjectToVehicle(Neons[0][PlayerInfo[playerid][pCarID][idcar]], PlayerInfo[playerid][pCarID][idcar],-0.8, 0.0, -0.50, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(Neons[1][PlayerInfo[playerid][pCarID][idcar]], PlayerInfo[playerid][pCarID][idcar],0.8, 0.0, -0.50, 0.0, 0.0, 0.0);
	} 
	else {
		DestroyObject(Neons[0][PlayerInfo[playerid][pCarID][idcar]]);
		DestroyObject(Neons[1][PlayerInfo[playerid][pCarID][idcar]]);
		Neons[0][PlayerInfo[playerid][pCarID][idcar]] = 0;
		Neons[1][PlayerInfo[playerid][pCarID][idcar]] = 0;
	}
	return true;
}

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Sau, cred ca de aici este problema? scz pt x2, dar nu puteam sa dau edit.

 

		case DIALOG_NEONS: {
	    	if(!response) return 1;
	    	switch(listitem) {
			  	case 0: {
			  		new idcar = SelectedCar[playerid];
			  		if(PlayerInfo[playerid][pCarNeon][idcar] != 0) return SCM(playerid, -1, "You already have a neon on this car.");
			   	    if(PlayerInfo[playerid][pNeonR] == 0) return  SCM(playerid, -1, "You don't have a red neon.");
			   	    PlayerInfo[playerid][pNeonR]--;
			   	    pUpdateInt(playerid, "NeonR", PlayerInfo[playerid][pNeonR]);
			       	PlayerInfo[playerid][pCarNeon][idcar] = 1;
			      	cUpdate(playerid, idcar, cCarNeonx);
			  		if(PlayerInfo[playerid][pCarID][idcar] != 0) AttachNeon(playerid, idcar);
			      	SCM(playerid, -1, "You attached a red neon on this car.");
			   		//red
			  	}
				  case 1: {
				  	new idcar = SelectedCar[playerid];	
				  	if(PlayerInfo[playerid][pCarNeon][idcar] != 0) return SCM(playerid, -1, "You already have a neon on this car.");
			      	if(PlayerInfo[playerid][pNeonV] == 0) return  SCM(playerid, -1, "You don't have a green neon.");
			 		PlayerInfo[playerid][pNeonV]--;
			      	pUpdateInt(playerid, "NeonV", PlayerInfo[playerid][pNeonV]);
			 	 	PlayerInfo[playerid][pCarNeon][idcar] = 2;
			 	 	cUpdate(playerid, idcar, cCarNeonx);
		      		if(PlayerInfo[playerid][pCarID][idcar] != 0) AttachNeon(playerid, idcar);
			 	 	SCM(playerid, -1, "You attached a green neon on this car.");
					//green
				}
				case 2: {
					new idcar = SelectedCar[playerid];	
					if(PlayerInfo[playerid][pCarNeon][idcar] != 0) return SCM(playerid, -1, "You already have a neon on this car.");
					if(PlayerInfo[playerid][pNeonG] == 0) return  SCM(playerid, -1, "You don't have a yellow neon.");
		    		PlayerInfo[playerid][pNeonG]--;
					pUpdateInt(playerid, "NeonG", PlayerInfo[playerid][pNeonG]);
		    		PlayerInfo[playerid][pCarNeon][idcar] = 3;
	        		cUpdate(playerid, idcar, cCarNeonx);
			    	if(PlayerInfo[playerid][pCarID][idcar] != 0) AttachNeon(playerid, idcar);
					SCM(playerid, -1, "You attached a yellow neon on this car.");
					//yellow 
				}
				case 3: {
					new idcar = SelectedCar[playerid];	
					if(PlayerInfo[playerid][pCarNeon][idcar] != 0) return SCM(playerid, -1, "You already have a neon on this car.");
					if(PlayerInfo[playerid][pNeonRZ] == 0) return  SCM(playerid, -1, "You don't have a pink neon.");
			    	PlayerInfo[playerid][pNeonRZ]--;
			    	pUpdateInt(playerid, "NeonRZ", PlayerInfo[playerid][pNeonRZ]);
		 	    	PlayerInfo[playerid][pCarNeon][idcar] = 4;
			    	cUpdate(playerid, idcar, cCarNeonx);
			    	if(PlayerInfo[playerid][pCarID][idcar] != 0) AttachNeon(playerid, idcar);
			    	SCM(playerid, -1, "You attached a pink neon on this car.");
					//pink 
				}
				case 4: {
					// blue
					new idcar = SelectedCar[playerid];	
					if(PlayerInfo[playerid][pCarNeon][idcar] != 0) return SCM(playerid, -1, "You already have a neon on this car.");
			    	if(PlayerInfo[playerid][pNeonA] == 0) return  SCM(playerid, -1, "You don't have a blue neon.");
			    	PlayerInfo[playerid][pNeonA]--;
			    	pUpdateInt(playerid, "NeonA", PlayerInfo[playerid][pNeonA]);
			    	PlayerInfo[playerid][pCarNeon][idcar] = 5;
		 	     	cUpdate(playerid, idcar, cCarNeonx);
			    	if(PlayerInfo[playerid][pCarID][idcar] != 0) AttachNeon(playerid, idcar);
			    	SCM(playerid, -1, "You attached a blue neon on this car.");
				}
				case 5: {
					new idcar = SelectedCar[playerid];
					if(PlayerInfo[playerid][pCarNeon][idcar] == 0) return SCM(playerid, -1, "You don't have a neon on this car.");
					PlayerInfo[playerid][pCarNeon][idcar] = 0;
					cUpdate(playerid, idcar, cCarNeonx);
					if(PlayerInfo[playerid][pCarID][idcar] != 0) AttachNeon(playerid, idcar);
					SCM(playerid, -1, "You removed the neon from this car.");
				}
			}
		}

 

Link to comment
Share on other sites

  • 0
AttachObjectToVehicle(Neons[0][PlayerInfo[playerid][pCarID][idcar]], PlayerInfo[playerid][pCarID][idcar],-0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(Neons[1][PlayerInfo[playerid][pCarID][idcar]], PlayerInfo[playerid][pCarID][idcar],0.8, 0.0, -0.70, 0.0, 0.0, 0.0);

 

  • Thanks 1
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.

×
×
  • 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.