[Ajuda] Como passo esse dialog para um comando ?
#11

Quote:
Originally Posted by FerrariL
View Post
O que seria esse
pawn Code:
Selected[playerid][2]
nгo sei, ta abaixo dos textdraw do inventбrio

Code:
	PlayerTextDrawShow(playerid, moMsg[playerid]);
	PlayerTextDrawSetPreviewModel(playerid, moEquipPrev[playerid], 5699);
	PlayerTextDrawShow(playerid, moEquipPrev[playerid]);
	PlayerTextDrawShow(playerid, moArma[playerid]);
	PlayerTextDrawShow(playerid, moBalas[playerid]);
	PlayerTextDrawShow(playerid, moUse[playerid]);
	PlayerTextDrawShow(playerid, moUse1[playerid]);
	PlayerTextDrawShow(playerid, moUse2[playerid]);
	PlayerTextDrawShow(playerid, moUse3[playerid]);
	//PlayerTextDrawShow(playerid, moUseBox[playerid]);
	PlayerTextDrawShow(playerid, moExit[playerid]);
	//PlayerTextDrawShow(playerid, moExit1[playerid]);
	//PlayerTextDrawShow(playerid, moInfo[playerid]);
	//PlayerTextDrawShow(playerid, moInfoBox[playerid]);
	PlayerTextDrawShow(playerid, moHelp[playerid]);
	PlayerTextDrawShow(playerid, moCr[playerid]);

 	Selected[playerid][0] = 0;
 	Selected[playerid][1] = 0;
 	Selected[playerid][2] = 0;

    setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);

    SelectTextDraw(playerid, 0xAAAAAAFF);

	SetPVarInt(playerid, "vMochila", 1);
}
Aqui

Code:
ublic OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) {
	if(GetPVarInt(playerid, "vMochila")){

	    for(new x = 1; x <= 12; x++){

	        if(playertextid == moPrev[playerid][x]) {
			    if(Inventario[playerid] == 2) x = x+12;
			    if(Inventario[playerid] == 3) x = x+24;
			    if(Inventario[playerid] == 4) x = x+36;
				if(x != MAX_ITEMS) {
					if(ArmasGuardadas[playerid][x] < 1 && ItemID[playerid][x] == 0){
					    //dialogGuardar(playerid);
					   	Selected[playerid][0] = 0;
		                Selected[playerid][1] = 0;
		                Selected[playerid][2] = x;

		                setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
					    ///SendClientMessage(playerid, COLOR_LIGHTRED, "* Nгo tem uma arma nesse slot!");
	                    PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
						return 1;
					}
Code:
					else {
					    PlayerTextDrawSetPreviewRot(playerid, moEquipPrev[playerid], 180.000000, 160.000000, 360.000000, 2.099999);
			            PlayerTextDrawSetPreviewModel(playerid, moEquipPrev[playerid], getidxModelSlot(playerid, x));
		                PlayerTextDrawShow(playerid, moEquipPrev[playerid]);
		                Selected[playerid][0] = ArmasGuardadas[playerid][x];
						if(IsAItem(playerid,Selected[playerid][0],0)) {
			                Selected[playerid][0] = ArmasGuardadas[playerid][x];
			                Selected[playerid][1] = BalasGuardadas[playerid][x];
			                Selected[playerid][2] = x;
						}

		                setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);

		                PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
		                return 1;
					}
				}
	        }
	    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 9 Guest(s)