17.01.2016, 01:49
Eu sempre tenho um sйrio problema com TextDraws. A Bola da Vez й essa tela
Bom As Textdraws foram Criadas no TDEditor
Os Botхes que deveriam ser clicбveis, nгo aceitam cliques,
O que me faz ficar preso na Tela
O Codigo:
Ajuda como resolver?
Bom As Textdraws foram Criadas no TDEditor
Os Botхes que deveriam ser clicбveis, nгo aceitam cliques,
O que me faz ficar preso na Tela
O Codigo:
PHP код:
// Topo do GM
new Text:FCNewLogin[18];
//TextDraws
FCNewLogin[0] = TextDrawCreate(2.800031, 1.839995, "box");
TextDrawLetterSize(FCNewLogin[0], 0.000000, 13.119996);
TextDrawTextSize(FCNewLogin[0], 638.000000, 0.000000);
TextDrawAlignment(FCNewLogin[0], 1);
TextDrawColor(FCNewLogin[0], -1);
TextDrawUseBox(FCNewLogin[0], 1);
TextDrawBoxColor(FCNewLogin[0], 255);
TextDrawSetShadow(FCNewLogin[0], 0);
TextDrawSetOutline(FCNewLogin[0], 0);
TextDrawBackgroundColor(FCNewLogin[0], 255);
TextDrawFont(FCNewLogin[0], 1);
TextDrawSetProportional(FCNewLogin[0], 1);
TextDrawSetShadow(FCNewLogin[0], 0);
FCNewLogin[1] = TextDrawCreate(313.199981, 75.759994, "Seja_bem_vindo_ao_nosso_servidor~n~evite_ser_Punido,_leia_as_regras");
TextDrawLetterSize(FCNewLogin[1], 0.400000, 1.600000);
TextDrawAlignment(FCNewLogin[1], 2);
TextDrawColor(FCNewLogin[1], -1);
TextDrawSetShadow(FCNewLogin[1], 0);
TextDrawSetOutline(FCNewLogin[1], 1);
TextDrawBackgroundColor(FCNewLogin[1], 255);
TextDrawFont(FCNewLogin[1], 2);
TextDrawSetProportional(FCNewLogin[1], 1);
TextDrawSetShadow(FCNewLogin[1], 0);
FCNewLogin[2] = TextDrawCreate(310.000061, 21.253282, "Faccoes_City");
TextDrawLetterSize(FCNewLogin[2], 1.650400, 4.713600);
TextDrawAlignment(FCNewLogin[2], 2);
TextDrawColor(FCNewLogin[2], -16776961);
TextDrawSetShadow(FCNewLogin[2], 2);
TextDrawSetOutline(FCNewLogin[2], 0);
TextDrawBackgroundColor(FCNewLogin[2], -1);
TextDrawFont(FCNewLogin[2], 0);
TextDrawSetProportional(FCNewLogin[2], 1);
TextDrawSetShadow(FCNewLogin[2], 2);
FCNewLogin[3] = TextDrawCreate(392.701965, 122.639961, "loadsc2:loadsc2");
TextDrawLetterSize(FCNewLogin[3], 0.000000, 0.000000);
TextDrawTextSize(FCNewLogin[3], 283.000000, 159.000000);
TextDrawAlignment(FCNewLogin[3], 1);
TextDrawColor(FCNewLogin[3], -1);
TextDrawSetShadow(FCNewLogin[3], 0);
TextDrawSetOutline(FCNewLogin[3], 0);
TextDrawBackgroundColor(FCNewLogin[3], 255);
TextDrawFont(FCNewLogin[3], 4);
TextDrawSetProportional(FCNewLogin[3], 0);
TextDrawSetShadow(FCNewLogin[3], 0);
FCNewLogin[4] = TextDrawCreate(227.399963, 122.846611, "loadsc1:loadsc1");
TextDrawLetterSize(FCNewLogin[4], 0.000000, 0.000000);
TextDrawTextSize(FCNewLogin[4], 283.000000, 159.000000);
TextDrawAlignment(FCNewLogin[4], 1);
TextDrawColor(FCNewLogin[4], -1);
TextDrawSetShadow(FCNewLogin[4], 0);
TextDrawSetOutline(FCNewLogin[4], 0);
TextDrawBackgroundColor(FCNewLogin[4], 255);
TextDrawFont(FCNewLogin[4], 4);
TextDrawSetProportional(FCNewLogin[4], 0);
TextDrawSetShadow(FCNewLogin[4], 0);
FCNewLogin[5] = TextDrawCreate(52.999828, 123.073303, "loadsc7:loadsc7");
TextDrawLetterSize(FCNewLogin[5], 0.000000, 0.000000);
TextDrawTextSize(FCNewLogin[5], 283.000000, 159.000000);
TextDrawAlignment(FCNewLogin[5], 1);
TextDrawColor(FCNewLogin[5], -1);
TextDrawSetShadow(FCNewLogin[5], 0);
TextDrawSetOutline(FCNewLogin[5], 0);
TextDrawBackgroundColor(FCNewLogin[5], 255);
TextDrawFont(FCNewLogin[5], 4);
TextDrawSetProportional(FCNewLogin[5], 0);
TextDrawSetShadow(FCNewLogin[5], 0);
FCNewLogin[6] = TextDrawCreate(-126.200096, 123.126533, "loadsc8:loadsc8");
TextDrawLetterSize(FCNewLogin[6], 0.000000, 0.000000);
TextDrawTextSize(FCNewLogin[6], 283.000000, 159.000000);
TextDrawAlignment(FCNewLogin[6], 1);
TextDrawColor(FCNewLogin[6], -1);
TextDrawSetShadow(FCNewLogin[6], 0);
TextDrawSetOutline(FCNewLogin[6], 0);
TextDrawBackgroundColor(FCNewLogin[6], 255);
TextDrawFont(FCNewLogin[6], 4);
TextDrawSetProportional(FCNewLogin[6], 0);
TextDrawSetShadow(FCNewLogin[6], 0);
FCNewLogin[7] = TextDrawCreate(336.500885, 123.179756, "box");
TextDrawLetterSize(FCNewLogin[7], 0.000000, 17.279994);
TextDrawTextSize(FCNewLogin[7], 333.700286, 0.000000);
TextDrawAlignment(FCNewLogin[7], 1);
TextDrawColor(FCNewLogin[7], -1);
TextDrawUseBox(FCNewLogin[7], 1);
TextDrawBoxColor(FCNewLogin[7], 255);
TextDrawSetShadow(FCNewLogin[7], 0);
TextDrawSetOutline(FCNewLogin[7], 0);
TextDrawBackgroundColor(FCNewLogin[7], 255);
TextDrawFont(FCNewLogin[7], 1);
TextDrawSetProportional(FCNewLogin[7], 1);
TextDrawSetShadow(FCNewLogin[7], 0);
FCNewLogin[8] = TextDrawCreate(158.100860, 123.499710, "box");
TextDrawLetterSize(FCNewLogin[8], 0.000000, 17.279994);
TextDrawTextSize(FCNewLogin[8], 155.000000, 0.000000);
TextDrawAlignment(FCNewLogin[8], 1);
TextDrawColor(FCNewLogin[8], -1);
TextDrawUseBox(FCNewLogin[8], 1);
TextDrawBoxColor(FCNewLogin[8], 255);
TextDrawSetShadow(FCNewLogin[8], 0);
TextDrawSetOutline(FCNewLogin[8], 0);
TextDrawBackgroundColor(FCNewLogin[8], 255);
TextDrawFont(FCNewLogin[8], 1);
TextDrawSetProportional(FCNewLogin[8], 1);
TextDrawSetShadow(FCNewLogin[8], 0);
FCNewLogin[9] = TextDrawCreate(512.101013, 122.485931, "box");
TextDrawLetterSize(FCNewLogin[9], 0.000000, 17.359994);
TextDrawTextSize(FCNewLogin[9], 510.400024, 0.000000);
TextDrawAlignment(FCNewLogin[9], 1);
TextDrawColor(FCNewLogin[9], -1);
TextDrawUseBox(FCNewLogin[9], 1);
TextDrawBoxColor(FCNewLogin[9], 255);
TextDrawSetShadow(FCNewLogin[9], 0);
TextDrawSetOutline(FCNewLogin[9], 0);
TextDrawBackgroundColor(FCNewLogin[9], 255);
TextDrawFont(FCNewLogin[9], 1);
TextDrawSetProportional(FCNewLogin[9], 1);
TextDrawSetShadow(FCNewLogin[9], 0);
FCNewLogin[10] = TextDrawCreate(3.000027, 284.773254, "box");
TextDrawLetterSize(FCNewLogin[10], 0.000000, 17.519990);
TextDrawTextSize(FCNewLogin[10], 638.000000, 0.000000);
TextDrawAlignment(FCNewLogin[10], 1);
TextDrawColor(FCNewLogin[10], -1);
TextDrawUseBox(FCNewLogin[10], 1);
TextDrawBoxColor(FCNewLogin[10], 255);
TextDrawSetShadow(FCNewLogin[10], 0);
TextDrawSetOutline(FCNewLogin[10], 1);
TextDrawBackgroundColor(FCNewLogin[10], 255);
TextDrawFont(FCNewLogin[10], 1);
TextDrawSetProportional(FCNewLogin[10], 1);
TextDrawSetShadow(FCNewLogin[10], 0);
FCNewLogin[11] = TextDrawCreate(316.300170, 281.093444, "2015-2016__-__Versao_9.7.1");
TextDrawLetterSize(FCNewLogin[11], 0.400000, 1.600000);
TextDrawAlignment(FCNewLogin[11], 2);
TextDrawColor(FCNewLogin[11], -1);
TextDrawSetShadow(FCNewLogin[11], 0);
TextDrawSetOutline(FCNewLogin[11], 0);
TextDrawBackgroundColor(FCNewLogin[11], 255);
TextDrawFont(FCNewLogin[11], 2);
TextDrawSetProportional(FCNewLogin[11], 1);
TextDrawSetShadow(FCNewLogin[11], 0);
FCNewLogin[12] = TextDrawCreate(307.600830, 295.427246, "-");
TextDrawLetterSize(FCNewLogin[12], 30.127574, 0.338134);
TextDrawAlignment(FCNewLogin[12], 2);
TextDrawColor(FCNewLogin[12], -1);
TextDrawSetShadow(FCNewLogin[12], 0);
TextDrawSetOutline(FCNewLogin[12], 0);
TextDrawBackgroundColor(FCNewLogin[12], 255);
TextDrawFont(FCNewLogin[12], 2);
TextDrawSetProportional(FCNewLogin[12], 1);
TextDrawSetShadow(FCNewLogin[12], 0);
FCNewLogin[13] = TextDrawCreate(221.599594, 313.946594, "LOGAR");
TextDrawLetterSize(FCNewLogin[13], 0.297600, 1.271466);
TextDrawTextSize(FCNewLogin[13], 0.000000, 61.000000);
TextDrawAlignment(FCNewLogin[13], 2);
TextDrawColor(FCNewLogin[13], -1);
TextDrawUseBox(FCNewLogin[13], 1);
TextDrawBoxColor(FCNewLogin[13], -1061109690);
TextDrawSetShadow(FCNewLogin[13], 0);
TextDrawSetOutline(FCNewLogin[13], 0);
TextDrawBackgroundColor(FCNewLogin[13], -2139062017);
TextDrawFont(FCNewLogin[13], 2);
TextDrawSetProportional(FCNewLogin[13], 1);
TextDrawSetShadow(FCNewLogin[13], 0);
TextDrawSetSelectable(FCNewLogin[13], true);
FCNewLogin[14] = TextDrawCreate(318.102478, 313.946594, "REGISTRAR");
TextDrawLetterSize(FCNewLogin[14], 0.297600, 1.271466);
TextDrawTextSize(FCNewLogin[14], 0.000000, 68.000000);
TextDrawAlignment(FCNewLogin[14], 2);
TextDrawColor(FCNewLogin[14], -1);
TextDrawUseBox(FCNewLogin[14], 1);
TextDrawBoxColor(FCNewLogin[14], -1061109690);
TextDrawSetShadow(FCNewLogin[14], 0);
TextDrawSetOutline(FCNewLogin[14], 0);
TextDrawBackgroundColor(FCNewLogin[14], -2139062017);
TextDrawFont(FCNewLogin[14], 2);
TextDrawSetProportional(FCNewLogin[14], 1);
TextDrawSetShadow(FCNewLogin[14], 0);
TextDrawSetSelectable(FCNewLogin[14], true);
FCNewLogin[15] = TextDrawCreate(318.102478, 354.349060, "ESQUECI MINHA SENHA");
TextDrawLetterSize(FCNewLogin[15], 0.297600, 1.271466);
TextDrawTextSize(FCNewLogin[15], 0.000000, 138.000000);
TextDrawAlignment(FCNewLogin[15], 2);
TextDrawColor(FCNewLogin[15], -1);
TextDrawUseBox(FCNewLogin[15], 1);
TextDrawBoxColor(FCNewLogin[15], -1061109690);
TextDrawSetShadow(FCNewLogin[15], 0);
TextDrawSetOutline(FCNewLogin[15], 0);
TextDrawBackgroundColor(FCNewLogin[15], -2139062017);
TextDrawFont(FCNewLogin[15], 2);
TextDrawSetProportional(FCNewLogin[15], 1);
TextDrawSetShadow(FCNewLogin[15], 0);
TextDrawSetSelectable(FCNewLogin[15], true);
FCNewLogin[16] = TextDrawCreate(420.808746, 313.946594, "SAIR");
TextDrawLetterSize(FCNewLogin[16], 0.297600, 1.271466);
TextDrawTextSize(FCNewLogin[16], 0.000000, 68.000000);
TextDrawAlignment(FCNewLogin[16], 2);
TextDrawColor(FCNewLogin[16], -1);
TextDrawUseBox(FCNewLogin[16], 1);
TextDrawBoxColor(FCNewLogin[16], -1061109690);
TextDrawSetShadow(FCNewLogin[16], 0);
TextDrawSetOutline(FCNewLogin[16], 0);
TextDrawBackgroundColor(FCNewLogin[16], -2139062017);
TextDrawFont(FCNewLogin[16], 2);
TextDrawSetProportional(FCNewLogin[16], 1);
TextDrawSetShadow(FCNewLogin[16], 0);
TextDrawSetSelectable(FCNewLogin[16], true);
FCNewLogin[17] = TextDrawCreate(330.799804, 394.586700, "O_OBJETIVO_DESTE_JOGO_E_PROVER_APENAS_DIVERSAO~n~NAO_FAZEMOS_QUALQUER_TIPO_DE_APOLOGIA~n~JOGO_NAO_RECOMENDADO_PARA_MENORES_DE_18_ANOS~n~NAO_NOS_RESPONSABILIZAMOS_POR_SKINS_E_MODS_CRIADOS_POR_TERCEIROS");
TextDrawLetterSize(FCNewLogin[17], 0.263199, 0.927999);
TextDrawAlignment(FCNewLogin[17], 2);
TextDrawColor(FCNewLogin[17], -1);
TextDrawSetShadow(FCNewLogin[17], 0);
TextDrawSetOutline(FCNewLogin[17], 0);
TextDrawBackgroundColor(FCNewLogin[17], 255);
TextDrawFont(FCNewLogin[17], 2);
TextDrawSetProportional(FCNewLogin[17], 1);
TextDrawSetShadow(FCNewLogin[17], 0);
//OnPlayerConnect
if(Player[playerid][pLogged] == false)
{
MostrarLogin(playerid);
}
//OnPlayerSpawn
if(Player[playerid][pLogged] == true)
{
EsconderLogin(playerid);
}
//Stocks
stock MostrarLogin(playerid)
{
TextDrawShowForPlayer(playerid, FCNewLogin[0]);
TextDrawShowForPlayer(playerid, FCNewLogin[1]);
TextDrawShowForPlayer(playerid, FCNewLogin[2]);
TextDrawShowForPlayer(playerid, FCNewLogin[3]);
TextDrawShowForPlayer(playerid, FCNewLogin[4]);
TextDrawShowForPlayer(playerid, FCNewLogin[5]);
TextDrawShowForPlayer(playerid, FCNewLogin[6]);
TextDrawShowForPlayer(playerid, FCNewLogin[7]);
TextDrawShowForPlayer(playerid, FCNewLogin[8]);
TextDrawShowForPlayer(playerid, FCNewLogin[9]);
TextDrawShowForPlayer(playerid, FCNewLogin[10]);
TextDrawShowForPlayer(playerid, FCNewLogin[11]);
TextDrawShowForPlayer(playerid, FCNewLogin[12]);
TextDrawShowForPlayer(playerid, FCNewLogin[17]);
TextDrawShowForPlayer(playerid, FCNewLogin[13]);
TextDrawShowForPlayer(playerid, FCNewLogin[14]);
TextDrawShowForPlayer(playerid, FCNewLogin[15]);
TextDrawShowForPlayer(playerid, FCNewLogin[16]);
SelectTextDraw(playerid, COR_CV);
}
stock EsconderLogin(playerid)
{
TextDrawHideForPlayer(playerid, FCNewLogin[0]);
TextDrawHideForPlayer(playerid, FCNewLogin[1]);
TextDrawHideForPlayer(playerid, FCNewLogin[2]);
TextDrawHideForPlayer(playerid, FCNewLogin[3]);
TextDrawHideForPlayer(playerid, FCNewLogin[4]);
TextDrawHideForPlayer(playerid, FCNewLogin[5]);
TextDrawHideForPlayer(playerid, FCNewLogin[6]);
TextDrawHideForPlayer(playerid, FCNewLogin[7]);
TextDrawHideForPlayer(playerid, FCNewLogin[8]);
TextDrawHideForPlayer(playerid, FCNewLogin[9]);
TextDrawHideForPlayer(playerid, FCNewLogin[10]);
TextDrawHideForPlayer(playerid, FCNewLogin[11]);
TextDrawHideForPlayer(playerid, FCNewLogin[12]);
TextDrawHideForPlayer(playerid, FCNewLogin[13]);
TextDrawHideForPlayer(playerid, FCNewLogin[14]);
TextDrawHideForPlayer(playerid, FCNewLogin[15]);
TextDrawHideForPlayer(playerid, FCNewLogin[16]);
TextDrawHideForPlayer(playerid, FCNewLogin[17]);
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == FCNewLogin[13]) //Logar
{
if(Player[playerid][Registrado] == false)
{
SendClientMessage(playerid, COR_ERRO, "Vocк ainda nгo tem Conta, se registre primeiro.");
return 1;
}
new String[256];
format(String, sizeof(String), CONTAS, getPName(playerid));
if(!DOF2_FileExists(String))
{
SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб bugado, por favor entre novamente.");
Kick(playerid);
return 1;
}
new str[256];
format(str, sizeof(str), "{FFFFFF}Seja bem vindo a {FF0000}Faccoes City - OFICIAL.\n{FF0000}Status: {00FF00}Registrado.\n{FF0000}Nick:{00FF00}%s\n{FFFFFF}Digite uma senha para logar no servidor.", getPName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF0000}» {FFFFFF}LOGIN Faccoes City {FF0000}«", str, "Logar", #);
}
if(clickedid == FCNewLogin[14]) //registrar
{
if(Player[playerid][Registrado] == true)
{
SendClientMessage(playerid, COR_ERRO, "Vocк ja tem uma conta, use o botгo 'Logar'.");
return 1;
}
new String[256];
format(String, sizeof(String), CONTAS, getPName(playerid));
if(DOF2_FileExists(String))
{
SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб bugado, por favor entre novamente.");
Kick(playerid);
return 1;
}
new str[512];
format(str, sizeof(str), "{FFFFFF}Seja bem vindo a {FF0000}Faccoes City - OFICIAL.\n{FFFFFF}Status: {FF0000}Nгo registrado.\n{FF0000}Nick:{00FF00}%s\n{FFFFFF}Digite uma senha para se registrar.", getPName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Registro", str, "Registrar", #);
}
if(clickedid == FCNewLogin[15]) //Esqueci minha Senha
{
new string[256];
format(string, sizeof(string), CONTAS, getPName(playerid));
if(Player[playerid][Registrado] == false)
{
SendClientMessage(playerid, COR_ERRO, "Vocк ainda nгo tem Conta, se registre primeiro.");
return 1;
}
if(DOF2_GetInt(string, "TemPergunta") == 0)
{
SendClientMessage(playerid, COR_ERRO, "Sua conta nгo tem uma pergunta secreta definida");
SendClientMessage(playerid, COR_ERRO, "Visite o forum www.equipefc.forumeiros.com e crie um ticket de ajuda");
Kick(playerid);
return 1;
}
format(string, 128, "{FFFFFF}Insira a resposta da pergunta abaixo para recuperar sua senha:\n{ccff00}%s?", DOF2_GetString(string, "Pergunta"));
ShowPlayerDialog(playerid, DIALOG_NEWLOGIN+1, DIALOG_STYLE_INPUT, "Recuperar Senha", string, "Enviar", "Voltar");
}
if(clickedid == FCNewLogin[16]) //Sair
{
Kick(playerid);
}
CancelSelectTextDraw(playerid);
}
return 1;
}