16.04.2013, 15:08
As TextDraw's selecionбveis estгo sumindo..
Cуdigo:
Estб bugando eu digito /Armas
Beleza,
Mais ae sу aparece a TextDraw0, a TextDraw1, e ae TextDraw17.
As que eu coloquei PREVIEW MODEL estгo bugando.....
Da uma ajuda ae !!
Cуdigo:
pawn Код:
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6;
new Text:Textdraw7;
new Text:Textdraw8;
new Text:Textdraw9;
new Text:Textdraw10;
new Text:Textdraw11;
new Text:Textdraw12;
new Text:Textdraw13;
new Text:Textdraw14;
new Text:Textdraw15;
new Text:Textdraw16;
new Text:Textdraw17;
///
Textdraw0 = TextDrawCreate(199.000000, 54.000000, "~r~Lista de Armas");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 0);
TextDrawLetterSize(Textdraw0, 1.270000, 6.099999);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawSetSelectable(Textdraw0, 0);
Textdraw1 = TextDrawCreate(115.000000, 90.000000, "_");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 33.900005);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 838860900);
TextDrawTextSize(Textdraw1, 521.000000, 0.000000);
TextDrawSetSelectable(Textdraw1, 0);
Textdraw2 = TextDrawCreate(142.000000, 153.000000, "ARMA");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw2, 0.500000, 5.999997);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, 25650);
TextDrawTextSize(Textdraw2, 201.000000, 0.000000);
TextDrawSetSelectable(Textdraw2, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw3 = TextDrawCreate(142.000000, 217.000000, "ARMA");
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw3, 0.500000, 5.999997);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);
TextDrawUseBox(Textdraw3, 1);
TextDrawBoxColor(Textdraw3, 25650);
TextDrawTextSize(Textdraw3, 201.000000, 0.000000);
TextDrawSetSelectable(Textdraw3, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw4 = TextDrawCreate(142.000000, 282.000000, "ARMA");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw4, 0.500000, 5.999997);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 0);
TextDrawSetProportional(Textdraw4, 1);
TextDrawSetShadow(Textdraw4, 1);
TextDrawUseBox(Textdraw4, 1);
TextDrawBoxColor(Textdraw4, 25650);
TextDrawTextSize(Textdraw4, 201.000000, 0.000000);
TextDrawSetSelectable(Textdraw4, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw5 = TextDrawCreate(212.000000, 282.000000, "ARMA");
TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw5, 0.500000, 5.999997);
TextDrawColor(Textdraw5, -1);
TextDrawSetOutline(Textdraw5, 0);
TextDrawSetProportional(Textdraw5, 1);
TextDrawSetShadow(Textdraw5, 1);
TextDrawUseBox(Textdraw5, 1);
TextDrawBoxColor(Textdraw5, 25650);
TextDrawTextSize(Textdraw5, 275.000000, 0.000000);
TextDrawSetSelectable(Textdraw5, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw6 = TextDrawCreate(212.000000, 217.000000, "ARMA");
TextDrawBackgroundColor(Textdraw6, 255);
TextDrawFont(Textdraw6, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw6, 0.500000, 5.999997);
TextDrawColor(Textdraw6, -1);
TextDrawSetOutline(Textdraw6, 0);
TextDrawSetProportional(Textdraw6, 1);
TextDrawSetShadow(Textdraw6, 1);
TextDrawUseBox(Textdraw6, 1);
TextDrawBoxColor(Textdraw6, 25650);
TextDrawTextSize(Textdraw6, 275.000000, 0.000000);
TextDrawSetSelectable(Textdraw6, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw7 = TextDrawCreate(212.000000, 153.000000, "ARMA");
TextDrawBackgroundColor(Textdraw7, 255);
TextDrawFont(Textdraw7, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw7, 0.500000, 5.999997);
TextDrawColor(Textdraw7, -1);
TextDrawSetOutline(Textdraw7, 0);
TextDrawSetProportional(Textdraw7, 1);
TextDrawSetShadow(Textdraw7, 1);
TextDrawUseBox(Textdraw7, 1);
TextDrawBoxColor(Textdraw7, 25650);
TextDrawTextSize(Textdraw7, 275.000000, 0.000000);
TextDrawSetSelectable(Textdraw7, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw8 = TextDrawCreate(286.000000, 153.000000, "ARMA");
TextDrawBackgroundColor(Textdraw8, 255);
TextDrawFont(Textdraw8, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw8, 0.500000, 5.999997);
TextDrawColor(Textdraw8, -1);
TextDrawSetOutline(Textdraw8, 0);
TextDrawSetProportional(Textdraw8, 1);
TextDrawSetShadow(Textdraw8, 1);
TextDrawUseBox(Textdraw8, 1);
TextDrawBoxColor(Textdraw8, 25650);
TextDrawTextSize(Textdraw8, 347.000000, 0.000000);
TextDrawSetSelectable(Textdraw8, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw9 = TextDrawCreate(286.000000, 217.000000, "ARMA");
TextDrawBackgroundColor(Textdraw9, 255);
TextDrawFont(Textdraw9, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw9, 0.500000, 5.999997);
TextDrawColor(Textdraw9, -1);
TextDrawSetOutline(Textdraw9, 0);
TextDrawSetProportional(Textdraw9, 1);
TextDrawSetShadow(Textdraw9, 1);
TextDrawUseBox(Textdraw9, 1);
TextDrawBoxColor(Textdraw9, 25650);
TextDrawTextSize(Textdraw9, 347.000000, 0.000000);
TextDrawSetSelectable(Textdraw9, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw10 = TextDrawCreate(286.000000, 282.000000, "ARMA");
TextDrawBackgroundColor(Textdraw10, 255);
TextDrawFont(Textdraw10, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw10, 0.500000, 5.999997);
TextDrawColor(Textdraw10, -1);
TextDrawSetOutline(Textdraw10, 0);
TextDrawSetProportional(Textdraw10, 1);
TextDrawSetShadow(Textdraw10, 1);
TextDrawUseBox(Textdraw10, 1);
TextDrawBoxColor(Textdraw10, 25650);
TextDrawTextSize(Textdraw10, 347.000000, 0.000000);
TextDrawSetSelectable(Textdraw10, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw11 = TextDrawCreate(358.000000, 282.000000, "ARMA");
TextDrawBackgroundColor(Textdraw11, 255);
TextDrawFont(Textdraw11, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw11, 0.500000, 5.999997);
TextDrawColor(Textdraw11, -1);
TextDrawSetOutline(Textdraw11, 0);
TextDrawSetProportional(Textdraw11, 1);
TextDrawSetShadow(Textdraw11, 1);
TextDrawUseBox(Textdraw11, 1);
TextDrawBoxColor(Textdraw11, 25650);
TextDrawTextSize(Textdraw11, 420.000000, 0.000000);
TextDrawSetSelectable(Textdraw11, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw12 = TextDrawCreate(358.000000, 218.000000, "ARMA");
TextDrawBackgroundColor(Textdraw12, 255);
TextDrawFont(Textdraw12, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw12, 0.500000, 5.999997);
TextDrawColor(Textdraw12, -1);
TextDrawSetOutline(Textdraw12, 0);
TextDrawSetProportional(Textdraw12, 1);
TextDrawSetShadow(Textdraw12, 1);
TextDrawUseBox(Textdraw12, 1);
TextDrawBoxColor(Textdraw12, 25650);
TextDrawTextSize(Textdraw12, 420.000000, 0.000000);
TextDrawSetSelectable(Textdraw12, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw13 = TextDrawCreate(358.000000, 154.000000, "ARMA");
TextDrawBackgroundColor(Textdraw13, 255);
TextDrawFont(Textdraw13, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw13, 0.500000, 5.999997);
TextDrawColor(Textdraw13, -1);
TextDrawSetOutline(Textdraw13, 0);
TextDrawSetProportional(Textdraw13, 1);
TextDrawSetShadow(Textdraw13, 1);
TextDrawUseBox(Textdraw13, 1);
TextDrawBoxColor(Textdraw13, 25650);
TextDrawTextSize(Textdraw13, 420.000000, 0.000000);
TextDrawSetSelectable(Textdraw13, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw14 = TextDrawCreate(431.000000, 154.000000, "ARMA");
TextDrawBackgroundColor(Textdraw14, 255);
TextDrawFont(Textdraw14, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw14, 0.500000, 5.999997);
TextDrawColor(Textdraw14, -1);
TextDrawSetOutline(Textdraw14, 0);
TextDrawSetProportional(Textdraw14, 1);
TextDrawSetShadow(Textdraw14, 1);
TextDrawUseBox(Textdraw14, 1);
TextDrawBoxColor(Textdraw14, 25650);
TextDrawTextSize(Textdraw14, 494.000000, 0.000000);
TextDrawSetSelectable(Textdraw14, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw15 = TextDrawCreate(431.000000, 218.000000, "ARMA");
TextDrawBackgroundColor(Textdraw15, 255);
TextDrawFont(Textdraw15, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw15, 0.500000, 5.999997);
TextDrawColor(Textdraw15, -1);
TextDrawSetOutline(Textdraw15, 0);
TextDrawSetProportional(Textdraw15, 1);
TextDrawSetShadow(Textdraw15, 1);
TextDrawUseBox(Textdraw15, 1);
TextDrawBoxColor(Textdraw15, 25650);
TextDrawTextSize(Textdraw15, 494.000000, 0.000000);
TextDrawSetSelectable(Textdraw15, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw16 = TextDrawCreate(431.000000, 282.000000, "ARMA");
TextDrawBackgroundColor(Textdraw16, 255);
TextDrawFont(Textdraw16, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(Textdraw2, 411);
TextDrawLetterSize(Textdraw16, 0.500000, 5.999997);
TextDrawColor(Textdraw16, -1);
TextDrawSetOutline(Textdraw16, 0);
TextDrawSetProportional(Textdraw16, 1);
TextDrawSetShadow(Textdraw16, 1);
TextDrawUseBox(Textdraw16, 1);
TextDrawBoxColor(Textdraw16, 25650);
TextDrawTextSize(Textdraw16, 494.000000, 0.000000);
TextDrawSetSelectable(Textdraw16, 1);
TextDrawSetPreviewRot(Textdraw3, -15.0, 5.0, -20.0, 0.7);
Textdraw17 = TextDrawCreate(432.000000, 380.000000, "CANCELAR");
TextDrawBackgroundColor(Textdraw17, 255);
TextDrawFont(Textdraw17, 2);
TextDrawLetterSize(Textdraw17, 0.370000, 1.000000);
TextDrawColor(Textdraw17, -1);
TextDrawSetOutline(Textdraw17, 0);
TextDrawSetProportional(Textdraw17, 1);
TextDrawSetShadow(Textdraw17, 1);
TextDrawUseBox(Textdraw17, 1);
TextDrawBoxColor(Textdraw17, -939524046);
TextDrawTextSize(Textdraw17, 513.000000, 0.000000);
TextDrawSetSelectable(Textdraw17, 1);
///Comando
CMD:armaslist(playerid)
{
if (GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, erro, "[ERRO]: Vocк nгo tem grana suficiente!"),PlayerPlaySound(playerid, 1053, 0.0, 0.0, 0.0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawShowForPlayer(playerid, Textdraw8);
TextDrawShowForPlayer(playerid, Textdraw9);
TextDrawShowForPlayer(playerid, Textdraw10);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw12);
TextDrawShowForPlayer(playerid, Textdraw13);
TextDrawShowForPlayer(playerid, Textdraw14);
TextDrawShowForPlayer(playerid, Textdraw15);
//TextDrawShowForPlayer(playerid, Textdraw16);
TextDrawShowForPlayer(playerid, Textdraw17);
SelectTextDraw(playerid, 0xFFFFFFAA); // 0xC0C0C0AA Й a cor que aparece quando passamos o mouse por cima dela
// SelectTextDraw й a funзгo para o mouse ficar livre para selecionar a textdraw :D
return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == Textdraw2)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw3)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 9, 1);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw4)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 22, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw5)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 23, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw6)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw7)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw8)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 26, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw9)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 27, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw10)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 28, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw11)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw12)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 30, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw13)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
GivePlayerWeapon(playerid, 31, 500);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(clickedid == Textdraw14)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
return 1;
}
if(clickedid == Textdraw15)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
return 1;
}
if(clickedid == Textdraw16)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
return 1;
}
if(clickedid == Textdraw17)
{
SendClientMessage(playerid, verde, "[INFO]: Vocк comprou uma arma ! O preзo de cada arma й 1000$.");
EsconderTexts(playerid);
return 1;
}
return 1;
}
///
stock EsconderTexts(playerid)
{
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw8);
TextDrawHideForPlayer(playerid, Textdraw9);
TextDrawHideForPlayer(playerid, Textdraw10);
TextDrawHideForPlayer(playerid, Textdraw11);
TextDrawHideForPlayer(playerid, Textdraw12);
TextDrawHideForPlayer(playerid, Textdraw13);
TextDrawHideForPlayer(playerid, Textdraw14);
TextDrawHideForPlayer(playerid, Textdraw15);
TextDrawHideForPlayer(playerid, Textdraw16);
TextDrawHideForPlayer(playerid, Textdraw17);
CancelSelectTextDraw(playerid); // Funзгo para voltar o mouse ao normal
return 1;
}
Beleza,
Mais ae sу aparece a TextDraw0, a TextDraw1, e ae TextDraw17.
As que eu coloquei PREVIEW MODEL estгo bugando.....
Da uma ajuda ae !!