SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 27/03/2017, 05:22 PM   #1
Arthur5Revolution
Little Clucker
 
Join Date: Mar 2015
Posts: 6
Reputation: 0
Exclamation Menu /Carrocasa

Por favor Me Ajudem quando um player da /carrocasa ele trava e n abre o menu eu revisei esse comando varias vezes e n acho meu erro pf sou novato em script
Code:
	CMD:carrocasa(playerid, params[])
	{
		new House = PlayerInfo[playerid][pPHousekey];
		GetPlayerName(playerid, playername, sizeof(playername));
		if (House != 500 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
		{
		    if(IsPlayerInRangeOfPoint(playerid, 100.0, HouseInfo[House][hExitx], HouseInfo[House][hExity], HouseInfo[House][hExitz]))
		    {
				Controle(playerid, 0);
				ShowModelSelectionMenu(playerid, CarrosCasaList, "Escolha seu carro", 50, 0x000000AA);
           		SendClientMessage(playerid, COLOR_YELLOW2, "Escolha o novo carro da sua casa!");
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GRAD2, "Você está longe do interior da sua casa!");
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD2, "Você não têm uma Casa!");
		}
		return true;
	}
Code:
	else if(listid == CarrosCasaList)
	{
	    if(response)
	    {
	        new str[74];
	        new House = PlayerInfo[playerid][pPHousekey];
		    new carid = PlayerInfo[playerid][pPHouseCarKey];

			format(string, sizeof string, "Atualização: Você trocou o carro da sua casa para %s", veehName[modelid-400]);
			if(VehicleInfo[carid][SoundCar] == 1086) RemoveSound(carid);
            SendClientMessage(playerid, COLOR_NEWS, string);
			SendClientMessage(playerid, COLOR_NEWS, "Para trocar a Cor do seu carro USE: /corcarrocasa");
			HouseInfo[House][hVec] = modelid;
			DestroyVehicle(carid);
			HouseInfo[House][hIdCarro] = CreateVehicle(HouseInfo[House][hVec], HouseInfo[House][hCarrox], HouseInfo[House][hCarroy], HouseInfo[House][hCarroz], HouseInfo[House][hCarroa], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], -1);
            PlayerInfo[playerid][pPHouseCarKey] = HouseInfo[House][hIdCarro];
      		format(str, sizeof str, "{000000}BSL-%04d", carid);
	    	SetVehicleNumberPlate(carid, str);
	    	SetVehicleToRespawn(carid);

			SendClientMessage(playerid, COLOR_NEWS, "Você pagou R$50.000, ele já está na sua casa!");
			SaveCasa(House);
			GiveDinheiro(playerid,-50000);
			SBizzInfo[5][sbTill] += 1000;
			ExtortionSBiz(5,  500);
			format(string, sizeof(string), "• {FFFFFF}Empresa que recebeu os lucros da compra: {7CFC00}%s", SBizzInfo[5][sbMessage]);
            SendClientMessage(playerid, 0x7CFC00AA, string);
			PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);

			ShowPlayerDialog(playerid,8903, DIALOG_STYLE_LIST, "cor do carro","Vermelho\nAzul\nBranco\nPreto\nRosa\nCinza\nVinho\nAmarelo\nVerde\nAzulClaro\nRoxo\nPrata\nMarrom","Selecionar","Cancelar");

			SetPlayerInterior(playerid,HouseInfo[House][hInt]);
			SetPlayerVirtualWorld(playerid,HouseInfo[House][hWorld]);
			SetPlayerPos(playerid,HouseInfo[House][hExitx],HouseInfo[House][hExity],HouseInfo[House][hExitz]);
			SetCameraBehindPlayer(playerid);
			Controle(playerid, 1);
		}
Arthur5Revolution is offline   Reply With Quote
Old 27/03/2017, 05:44 PM   #2
vPunisheR
Big Clucker
 
Join Date: Jan 2017
Posts: 97
Reputation: 0
Default Re: Menu /Carrocasa

Tenta
Code:
else if(listid == CarrosCasaList)
	{
	    if(response)
	    {
	        new str[74];
	        new House = PlayerInfo[playerid][pPHousekey];
		    new carid = PlayerInfo[playerid][pPHouseCarKey];

			format(string, sizeof string, "Atualização: Você trocou o carro da sua casa para %s", veehName[modelid-400]);
			if(VehicleInfo[carid][SoundCar] == 1086) RemoveSound(carid);
            SendClientMessage(playerid, COLOR_NEWS, string);
			SendClientMessage(playerid, COLOR_NEWS, "Para trocar a Cor do seu carro USE: /corcarrocasa");
			HouseInfo[House][hVec] = modelid;
			DestroyVehicle(carid);
			HouseInfo[House][hIdCarro] = CreateVehicle(HouseInfo[House][hVec], HouseInfo[House][hCarrox], HouseInfo[House][hCarroy], HouseInfo[House][hCarroz], HouseInfo[House][hCarroa], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], -1);
            PlayerInfo[playerid][pPHouseCarKey] = HouseInfo[House][hIdCarro];
      		format(str, sizeof str, "{000000}BSL-%04d", carid);
	    	SetVehicleNumberPlate(carid, str);
	    	SetVehicleToRespawn(carid);

			SendClientMessage(playerid, COLOR_NEWS, "Você pagou R$50.000, ele já está na sua casa!");
			SaveCasa(House);
			GiveDinheiro(playerid,-50000);
			SBizzInfo[5][sbTill] += 1000;
			ExtortionSBiz(5,  500);
			format(string, sizeof(string), "• {FFFFFF}Empresa que recebeu os lucros da compra: {7CFC00}%s", SBizzInfo[5][sbMessage]);
            SendClientMessage(playerid, 0x7CFC00AA, string);
			PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);

			ShowPlayerDialog(playerid,8903, DIALOG_STYLE_LIST, "cor do carro","Vermelho\nAzul\nBranco\nPreto\nRosa\nCinza\nVinho\nAmarelo\nVerde\nAzulClaro\nRoxo\nPrata\nMarrom","Selecionar","Cancelar");

			SetPlayerInterior(playerid,HouseInfo[House][hInt]);
			SetPlayerVirtualWorld(playerid,HouseInfo[House][hWorld]);
			SetPlayerPos(playerid,HouseInfo[House][hExitx],HouseInfo[House][hExity],HouseInfo[House][hExitz]);
			SetCameraBehindPlayer(playerid);
			Controle(playerid, 1);
		}
	}
vPunisheR is offline   Reply With Quote
Old 27/03/2017, 06:04 PM   #3
Arthur5Revolution
Little Clucker
 
Join Date: Mar 2015
Posts: 6
Reputation: 0
Default Re: Menu /Carrocasa

Quote:
Originally Posted by vPunisheR View Post
Tenta
Code:
else if(listid == CarrosCasaList)
	{
	    if(response)
	    {
	        new str[74];
	        new House = PlayerInfo[playerid][pPHousekey];
		    new carid = PlayerInfo[playerid][pPHouseCarKey];

			format(string, sizeof string, "Atualização: Você trocou o carro da sua casa para %s", veehName[modelid-400]);
			if(VehicleInfo[carid][SoundCar] == 1086) RemoveSound(carid);
            SendClientMessage(playerid, COLOR_NEWS, string);
			SendClientMessage(playerid, COLOR_NEWS, "Para trocar a Cor do seu carro USE: /corcarrocasa");
			HouseInfo[House][hVec] = modelid;
			DestroyVehicle(carid);
			HouseInfo[House][hIdCarro] = CreateVehicle(HouseInfo[House][hVec], HouseInfo[House][hCarrox], HouseInfo[House][hCarroy], HouseInfo[House][hCarroz], HouseInfo[House][hCarroa], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], -1);
            PlayerInfo[playerid][pPHouseCarKey] = HouseInfo[House][hIdCarro];
      		format(str, sizeof str, "{000000}BSL-%04d", carid);
	    	SetVehicleNumberPlate(carid, str);
	    	SetVehicleToRespawn(carid);

			SendClientMessage(playerid, COLOR_NEWS, "Você pagou R$50.000, ele já está na sua casa!");
			SaveCasa(House);
			GiveDinheiro(playerid,-50000);
			SBizzInfo[5][sbTill] += 1000;
			ExtortionSBiz(5,  500);
			format(string, sizeof(string), "• {FFFFFF}Empresa que recebeu os lucros da compra: {7CFC00}%s", SBizzInfo[5][sbMessage]);
            SendClientMessage(playerid, 0x7CFC00AA, string);
			PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);

			ShowPlayerDialog(playerid,8903, DIALOG_STYLE_LIST, "cor do carro","Vermelho\nAzul\nBranco\nPreto\nRosa\nCinza\nVinho\nAmarelo\nVerde\nAzulClaro\nRoxo\nPrata\nMarrom","Selecionar","Cancelar");

			SetPlayerInterior(playerid,HouseInfo[House][hInt]);
			SetPlayerVirtualWorld(playerid,HouseInfo[House][hWorld]);
			SetPlayerPos(playerid,HouseInfo[House][hExitx],HouseInfo[House][hExity],HouseInfo[House][hExitz]);
			SetCameraBehindPlayer(playerid);
			Controle(playerid, 1);
		}
	}
Ae Mano Vlw Pode Me Fala Qual Linha Q Tava Quebrada ? Quero Aprende Com Os Erros
Arthur5Revolution is offline   Reply With Quote
Old 27/03/2017, 10:08 PM   #4
vPunisheR
Big Clucker
 
Join Date: Jan 2017
Posts: 97
Reputation: 0
Default Re: Menu /Carrocasa

Quote:
Originally Posted by Arthur5Revolution View Post
Ae Mano Vlw Pode Me Fala Qual Linha Q Tava Quebrada ? Quero Aprende Com Os Erros
Estava faltando uma chave no final, era só isso
vPunisheR is offline   Reply With Quote
Old 19/05/2017, 08:04 PM   #5
Abne
Little Clucker
 
Abne's Avatar
 
Join Date: May 2017
Posts: 6
Reputation: 0
Default Re: Menu /Carrocasa

onde eu encontro uma explicação bem detalhada sobre isso ? |me ajudem por favor|
Abne is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] /trancar e /carrocasa - Ambos Bugados Up Português/Portuguese 0 14/03/2015 06:19 PM
[FilterScript] [FS]Weapon Menu + Player Menu + Vehicle Menu! [Good For Stunt Server] AlexHitman Filterscripts 4 27/07/2014 08:34 PM
[Include] ***New*** [INC] tAxI's Vehicle Shop/Menu with XVM Menu and Modsaving cptnsausage Includes 57 06/06/2012 06:40 AM
How to make a menu? THE NEW TYPE OF MENU, NOT OLD ONE -FIXED- Typical_Cat Help Archive 5 25/04/2010 11:26 PM
Menu trouble: Can't Enter Vehicle After Closing Menu Badger(new) Help Archive 4 17/05/2009 01:26 AM


All times are GMT. The time now is 11:17 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.