stock ShowAmmu(playerid)
{
Eagle = TextDrawCreate(196.000000, 169.000000, "desert eagle ~g~(R$1000)");
TextDrawBackgroundColor(Eagle, 255);
TextDrawFont(Eagle, 2);
TextDrawLetterSize(Eagle, 0.370000, 1.200000);
TextDrawColor(Eagle, -1);
TextDrawSetOutline(Eagle, 0);
TextDrawSetProportional(Eagle, 1);
TextDrawSetShadow(Eagle, 1);
TextDrawUseBox(Eagle, 1);
TextDrawBoxColor(Eagle, -224);
TextDrawTextSize(Eagle, 440.000000, -43.000000);
M4 = TextDrawCreate(196.000000, 190.000000, "M4 ~g~(R$2000)");
TextDrawBackgroundColor(M4, 255);
TextDrawFont(M4, 2);
TextDrawLetterSize(M4, 0.370000, 1.200000);
TextDrawColor(M4, -1);
TextDrawSetOutline(M4, 0);
TextDrawSetProportional(M4, 1);
TextDrawSetShadow(M4, 1);
TextDrawUseBox(M4, 1);
TextDrawBoxColor(M4, -224);
TextDrawTextSize(M4, 440.000000, -43.000000);
MP5 = TextDrawCreate(196.000000, 211.000000, "mp5 ~g~(r$1500)");
TextDrawBackgroundColor(MP5, 255);
TextDrawFont(MP5, 2);
TextDrawLetterSize(MP5, 0.370000, 1.200000);
TextDrawColor(MP5, -1);
TextDrawSetOutline(MP5, 0);
TextDrawSetProportional(MP5, 1);
TextDrawSetShadow(MP5, 1);
TextDrawUseBox(MP5, 1);
TextDrawBoxColor(MP5, -224);
TextDrawTextSize(MP5, 440.000000, -43.000000);
Granadas = TextDrawCreate(196.000000, 232.000000, "granadas ~g~(r$3000)");
TextDrawBackgroundColor(Granadas, 255);
TextDrawFont(Granadas, 2);
TextDrawLetterSize(Granadas, 0.370000, 1.200000);
TextDrawColor(Granadas, -1);
TextDrawSetOutline(Granadas, 0);
TextDrawSetProportional(Granadas, 1);
TextDrawSetShadow(Granadas, 1);
TextDrawUseBox(Granadas, 1);
TextDrawBoxColor(Granadas, -224);
TextDrawTextSize(Granadas, 440.000000, -43.000000);
Spas = TextDrawCreate(196.000000, 253.000000, "spas(12) ~g~(R$3500)");
TextDrawBackgroundColor(Spas, 255);
TextDrawFont(Spas, 2);
TextDrawLetterSize(Spas, 0.370000, 1.200000);
TextDrawColor(Spas, -1);
TextDrawSetOutline(Spas, 0);
TextDrawSetProportional(Spas, 1);
TextDrawSetShadow(Spas, 1);
TextDrawUseBox(Spas, 1);
TextDrawBoxColor(Spas, -224);
TextDrawTextSize(Spas, 440.000000, -43.000000);
Fechar = TextDrawCreate(379.000000, 301.000000, "fechar");
TextDrawBackgroundColor(Fechar, 255);
TextDrawFont(Fechar, 2);
TextDrawLetterSize(Fechar, 0.370000, 1.200000);
TextDrawColor(Fechar, -1);
TextDrawSetOutline(Fechar, 0);
TextDrawSetProportional(Fechar, 1);
TextDrawSetShadow(Fechar, 1);
TextDrawUseBox(Fechar, 1);
TextDrawBoxColor(Fechar, -224);
TextDrawTextSize(Fechar, 440.000000, -43.000000);
Katana = TextDrawCreate(196.000000, 274.000000, "katana ~g~(r$500)");
TextDrawBackgroundColor(Katana, 255);
TextDrawFont(Katana, 2);
TextDrawLetterSize(Katana, 0.370000, 1.200000);
TextDrawColor(Katana, -1);
TextDrawSetOutline(Katana, 0);
TextDrawSetProportional(Katana, 1);
TextDrawSetShadow(Katana, 1);
TextDrawUseBox(Katana, 1);
TextDrawBoxColor(Katana, -224);
TextDrawTextSize(Katana, 440.000000, -43.000000);
TextDrawSetSelectable(Eagle, true);
TextDrawSetSelectable(MP5, true);
TextDrawSetSelectable(Katana, true);
TextDrawSetSelectable(Fechar, true);
TextDrawSetSelectable(Spas, true);
TextDrawSetSelectable(M4, true);
TextDrawSetSelectable(Granadas, true);
SelectTextDraw(playerid, 0x2C9C40FF);
TextDrawShowForPlayer(playerid,Eagle);
TextDrawShowForPlayer(playerid,MP5);
TextDrawShowForPlayer(playerid,Katana);
TextDrawShowForPlayer(playerid,Fechar);
TextDrawShowForPlayer(playerid,Spas);
TextDrawShowForPlayer(playerid,M4);
TextDrawShowForPlayer(playerid,Granadas);
TextDrawShowForPlayer(playerid,Ammu[0]);
TextDrawShowForPlayer(playerid,Ammu[1]);
}
if(clickedid == M4)
{
if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,erro,"ERRO:{DADADA} quantia de dinheiro insuficiente.");
GivePlayerWeapon(playerid,31,500);
GivePlayerMoney(playerid,-2000);
SendClientMessage(playerid,cor_aztecas,"[INFO]{DADADA} Vocк comprou uma M4 por R$2000.");
return 1;
}
Q eu saiba precisa disso nгo, pq a callback й sу pra quando clickar '-'
Vo colocar sу uma '-' pawn Код:
|
kkk
a funзao da callbacl OnPlayerClickTexdraw ja e pra iso '-' pra quando vc dar o comando abrir a texdraw ja chama a callback pra vc poder clicar na funзao ._. |
Velho, o codigo estб ali vocк й cego?
if(clickedid == M4) { if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,erro,"ERRO:{DADADA} quantia de dinheiro insuficiente."); GivePlayerWeapon(playerid,31,500); GivePlayerMoney(playerid,-2000); SendClientMessage(playerid,cor_aztecas,"[INFO]{DADADA} Vocк comprou uma M4 por R$2000."); return 1; } Se vocк nгo sabe, a callback OnPlayerClickTextDraw й pra quando um player clicar em cima de uma textdraw... #Edit: Recomendo fazer com DIALOGS! Mais pratico, mas se vocк realmente quiser com os TXD A opзгo й sua, nunca utilizei essa callback mais pelo que eu vi tб certinho. |