[Ajuda] Problema em TextDrawShowForPlayer
#1

Bom galera, eu tava criando umas textdraw's e elas sгo realmente boas (teleportes a base de textdraw selecionбvel) elas funcionam e talz, as respectivas TextDraw's criadas em TeleMenu_p1 funcionam certinho, porйm quando clico em Proximo aparece apenas "Proximo Menu..." mas nгo aparece a TextDraw TeleMenu_p2 (page 2), nгo sei se empreguei muito bem essa TextDraw e por isso peзo ajuda!

PHP код:
#include <a_samp>
#pragma dynamic 16384
new Text:TeleMenu_p1[7];
new 
Text:TeleMenu_p2[7];
public 
OnFilterScriptInit()
{
        print(
"\n--------------------------------------");
        print(
" Textdraw teleporting - tut for showing\n  how textdraw selecting works");
        print(
"--------------------------------------\n");
//--------------------------------TeleMenu_p1------------------------------------
TeleMenu_p1[0] = TextDrawCreate(100.929275136.916687"_");
TextDrawLetterSize(TeleMenu_p1[0], 0.53835213.243331);
TextDrawTextSize(TeleMenu_p1[0], -1709.6003410.000000);
TextDrawAlignment(TeleMenu_p1[0], 3);
TextDrawColor(TeleMenu_p1[0], 151);
TextDrawUseBox(TeleMenu_p1[0], 1);
TextDrawBoxColor(TeleMenu_p1[0], -16777142);
TextDrawSetShadow(TeleMenu_p1[0], 0);
TextDrawSetOutline(TeleMenu_p1[0], 0);
TextDrawBackgroundColor(TeleMenu_p1[0], -16776961);
TextDrawFont(TeleMenu_p1[0], 1);
TextDrawSetProportional(TeleMenu_p1[0], 1);
TextDrawSetShadow(TeleMenu_p1[0], 0);
TeleMenu_p1[1] = TextDrawCreate(96.782493137.066543"TELEPORT");
TextDrawLetterSize(TeleMenu_p1[1], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p1[1], 3);
TextDrawColor(TeleMenu_p1[1], -1);
TextDrawSetShadow(TeleMenu_p1[1], 0);
TextDrawSetOutline(TeleMenu_p1[1], 3);
TextDrawBackgroundColor(TeleMenu_p1[1], 255);
TextDrawFont(TeleMenu_p1[1], 2);
TextDrawSetProportional(TeleMenu_p1[1], 1);
TextDrawSetShadow(TeleMenu_p1[1], 0);
TeleMenu_p1[2] = TextDrawCreate(50.864700160.433456"Tele_1");
TextDrawLetterSize(TeleMenu_p1[2], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p1[2], 3);
TextDrawColor(TeleMenu_p1[2], 16777215);
TextDrawSetShadow(TeleMenu_p1[2], 0);
TextDrawSetOutline(TeleMenu_p1[2], 0);
TextDrawBackgroundColor(TeleMenu_p1[2], 255);
TextDrawFont(TeleMenu_p1[2], 3);
TextDrawSetProportional(TeleMenu_p1[2], 1);
TextDrawSetShadow(TeleMenu_p1[2], 0);
TextDrawSetSelectable(TeleMenu_p1[2], true);
TeleMenu_p1[3] = TextDrawCreate(50.864700178.433334"Tele_2");
TextDrawLetterSize(TeleMenu_p1[3], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p1[3], 3);
TextDrawColor(TeleMenu_p1[3], 16777215);
TextDrawSetShadow(TeleMenu_p1[3], 0);
TextDrawSetOutline(TeleMenu_p1[3], 0);
TextDrawBackgroundColor(TeleMenu_p1[3], 255);
TextDrawFont(TeleMenu_p1[3], 3);
TextDrawSetProportional(TeleMenu_p1[3], 1);
TextDrawSetShadow(TeleMenu_p1[3], 0);
TextDrawSetSelectable(TeleMenu_p1[3], true);
TeleMenu_p1[4] = TextDrawCreate(50.864700197.333206"Tele_3");
TextDrawLetterSize(TeleMenu_p1[4], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p1[4], 3);
TextDrawColor(TeleMenu_p1[4], 16777215);
TextDrawSetShadow(TeleMenu_p1[4], 0);
TextDrawSetOutline(TeleMenu_p1[4], 0);
TextDrawBackgroundColor(TeleMenu_p1[4], 255);
TextDrawFont(TeleMenu_p1[4], 3);
TextDrawSetProportional(TeleMenu_p1[4], 1);
TextDrawSetShadow(TeleMenu_p1[4], 0);
TextDrawSetSelectable(TeleMenu_p1[4], true);
TeleMenu_p1[5] = TextDrawCreate(26.700004240.750015"Proximo");
TextDrawLetterSize(TeleMenu_p1[5], 0.3063521.529999);
TextDrawAlignment(TeleMenu_p1[5], 2);
TextDrawColor(TeleMenu_p1[5], -1);
TextDrawSetShadow(TeleMenu_p1[5], 0);
TextDrawSetOutline(TeleMenu_p1[5], 0);
TextDrawBackgroundColor(TeleMenu_p1[5], 255);
TextDrawFont(TeleMenu_p1[5], 1);
TextDrawSetProportional(TeleMenu_p1[5], 1);
TextDrawSetShadow(TeleMenu_p1[5], 0);
TextDrawSetSelectable(TeleMenu_p1[5], true);
TeleMenu_p1[6] = TextDrawCreate(69.900062240.750015"Sair");
TextDrawLetterSize(TeleMenu_p1[6], 0.3063521.529999);
TextDrawAlignment(TeleMenu_p1[6], 1);
TextDrawColor(TeleMenu_p1[6], -1);
TextDrawSetShadow(TeleMenu_p1[6], 0);
TextDrawSetOutline(TeleMenu_p1[6], 0);
TextDrawBackgroundColor(TeleMenu_p1[6], 255);
TextDrawFont(TeleMenu_p1[6], 1);
TextDrawSetProportional(TeleMenu_p1[6], 1);
TextDrawSetShadow(TeleMenu_p1[6], 0);
TextDrawSetSelectable(TeleMenu_p1[6], true);
//------------------------------TeleMenu_p2--------------------------------------
TeleMenu_p2[0] = TextDrawCreate(100.929275136.916687"_");
TextDrawLetterSize(TeleMenu_p2[0], 0.53835213.243330);
TextDrawTextSize(TeleMenu_p2[0], -1709.6003410.000000);
TextDrawAlignment(TeleMenu_p2[0], 3);
TextDrawColor(TeleMenu_p2[0], 151);
TextDrawUseBox(TeleMenu_p2[0], 1);
TextDrawBoxColor(TeleMenu_p2[0], -16777142);
TextDrawSetShadow(TeleMenu_p2[0], 0);
TextDrawSetOutline(TeleMenu_p2[0], 0);
TextDrawBackgroundColor(TeleMenu_p2[0], -16776961);
TextDrawFont(TeleMenu_p2[0], 1);
TextDrawSetProportional(TeleMenu_p2[0], 1);
TextDrawSetShadow(TeleMenu_p2[0], 0);
TeleMenu_p2[1] = TextDrawCreate(96.782493137.066543"TELEPORT");
TextDrawLetterSize(TeleMenu_p2[1], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p2[1], 3);
TextDrawColor(TeleMenu_p2[1], -1);
TextDrawSetShadow(TeleMenu_p2[1], 0);
TextDrawSetOutline(TeleMenu_p2[1], 3);
TextDrawBackgroundColor(TeleMenu_p2[1], 255);
TextDrawFont(TeleMenu_p2[1], 2);
TextDrawSetProportional(TeleMenu_p2[1], 1);
TextDrawSetShadow(TeleMenu_p2[1], 0);
TeleMenu_p2[2] = TextDrawCreate(50.864700160.433456"Tele_4");
TextDrawLetterSize(TeleMenu_p2[2], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p2[2], 3);
TextDrawColor(TeleMenu_p2[2], 16777215);
TextDrawSetShadow(TeleMenu_p2[2], 0);
TextDrawSetOutline(TeleMenu_p2[2], 0);
TextDrawBackgroundColor(TeleMenu_p2[2], 255);
TextDrawFont(TeleMenu_p2[2], 3);
TextDrawSetProportional(TeleMenu_p2[2], 1);
TextDrawSetShadow(TeleMenu_p2[2], 0);
TextDrawSetSelectable(TeleMenu_p2[2], true);
TeleMenu_p2[3] = TextDrawCreate(50.864700178.433334"Tele_5");
TextDrawLetterSize(TeleMenu_p2[3], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p2[3], 3);
TextDrawColor(TeleMenu_p2[3], 16777215);
TextDrawSetShadow(TeleMenu_p2[3], 0);
TextDrawSetOutline(TeleMenu_p2[3], 0);
TextDrawBackgroundColor(TeleMenu_p2[3], 255);
TextDrawFont(TeleMenu_p2[3], 3);
TextDrawSetProportional(TeleMenu_p2[3], 1);
TextDrawSetShadow(TeleMenu_p2[3], 0);
TextDrawSetSelectable(TeleMenu_p2[3], true);
TeleMenu_p2[4] = TextDrawCreate(50.864700197.333206"Tele_6");
TextDrawLetterSize(TeleMenu_p2[4], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p2[4], 3);
TextDrawColor(TeleMenu_p2[4], 16777215);
TextDrawSetShadow(TeleMenu_p2[4], 0);
TextDrawSetOutline(TeleMenu_p2[4], 0);
TextDrawBackgroundColor(TeleMenu_p2[4], 255);
TextDrawFont(TeleMenu_p2[4], 3);
TextDrawSetProportional(TeleMenu_p2[4], 1);
TextDrawSetShadow(TeleMenu_p2[4], 0);
TextDrawSetSelectable(TeleMenu_p2[4], true);
TeleMenu_p2[5] = TextDrawCreate(26.700004240.750015"Voltar");
TextDrawLetterSize(TeleMenu_p2[5], 0.3063511.529999);
TextDrawAlignment(TeleMenu_p2[5], 2);
TextDrawColor(TeleMenu_p2[5], -1);
TextDrawSetShadow(TeleMenu_p2[5], 0);
TextDrawSetOutline(TeleMenu_p2[5], 0);
TextDrawBackgroundColor(TeleMenu_p2[5], 255);
TextDrawFont(TeleMenu_p2[5], 1);
TextDrawSetProportional(TeleMenu_p2[5], 1);
TextDrawSetShadow(TeleMenu_p2[5], 0);
TextDrawSetSelectable(TeleMenu_p2[5], true);
TeleMenu_p2[6] = TextDrawCreate(74.776435241.199981"Sair");
TextDrawLetterSize(TeleMenu_p2[6], 0.3063511.529999);
TextDrawAlignment(TeleMenu_p2[6], 1);
TextDrawColor(TeleMenu_p2[6], -1);
TextDrawSetShadow(TeleMenu_p2[6], 0);
TextDrawSetOutline(TeleMenu_p2[6], 0);
TextDrawBackgroundColor(TeleMenu_p2[6], 255);
TextDrawFont(TeleMenu_p2[6], 1);
TextDrawSetProportional(TeleMenu_p2[6], 1);
TextDrawSetShadow(TeleMenu_p2[6], 0);
TextDrawSetSelectable(TeleMenu_p2[6], true);
        return 
1;
}
 
public 
OnFilterScriptExit()
{
    
// PAGE 1
    
TextDrawDestroy(TeleMenu_p1[0]);
    
TextDrawDestroy(TeleMenu_p1[1]);
    
TextDrawDestroy(TeleMenu_p1[2]);
    
TextDrawDestroy(TeleMenu_p1[3]);
    
TextDrawDestroy(TeleMenu_p1[4]);
    
TextDrawDestroy(TeleMenu_p1[5]);
    
TextDrawDestroy(TeleMenu_p1[6]);
    
    
// PAGE 2
    
TextDrawDestroy(TeleMenu_p2[0]);
    
TextDrawDestroy(TeleMenu_p2[1]);
    
TextDrawDestroy(TeleMenu_p2[2]);
    
TextDrawDestroy(TeleMenu_p2[3]);
    
TextDrawDestroy(TeleMenu_p2[4]);
    
TextDrawDestroy(TeleMenu_p2[5]);
    
TextDrawDestroy(TeleMenu_p2[6]);
    return 
1;
}
 
public 
OnPlayerCommandText(playeridcmdtext[])
{
        if (!
strcmp("/teleport"cmdtexttrue))
        {
            
TextDrawShowForPlayer(playeridTeleMenu_p1[0]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[1]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[2]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[3]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[4]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[5]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[6]);
            
SelectTextDraw(playerid0xA3B4C5FF);
            return 
1;
        }
        return 
0;
}
 
public 
OnPlayerClickTextDraw(playeridText:clickedid)
{
        if(
_:clickedid != 65535)
        {
                
//------------------------------TeleMenu_p1--------------------------------------
                
if(clickedid == TeleMenu_p1[2])
                {
                        
SetPlayerPos(playerid1688.79901500.775310.7675);
                        
SetPlayerFacingAngle(playerid267.3902);
                        
SendClientMessage(playerid, -1"Tele 1");
                }
                else if(
clickedid == TeleMenu_p1[3])
                {
                        
SetPlayerPos(playerid1630.2030,-2328.9673,13.5469);
                        
SetPlayerFacingAngle(playerid0.9392);
                        
SendClientMessage(playerid, -1"Tele 2");
                }
                else if(
clickedid == TeleMenu_p1[4])
                {
                        
SetPlayerPos(playerid, -1424.6083, -290.962214.1484);
                        
SetPlayerFacingAngle(playerid134.9570);
                        
SendClientMessage(playerid, -1"Tele 3");
                }
                else if(
clickedid == TeleMenu_p1[5])
                {
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[0]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[1]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[2]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[3]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[4]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[5]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[6]);
                        
SelectTextDraw(playerid0xA3B4C5FF);
                        
SendClientMessage(playerid, -1"Proximo MENU");
                }
                else if(
clickedid == TeleMenu_p1[6])
                {
                        
SendClientMessage(playerid, -1"Saiu do MENU");
                }
                
//------------------------------TeleMenu_p2--------------------------------------
                
if(clickedid == TeleMenu_p2[2])
                {
                        
SetPlayerPos(playerid1688.79901500.775310.7675);
                        
SetPlayerFacingAngle(playerid267.3902);
                        
SendClientMessage(playerid, -1"Tele 1");
                }
                else if(
clickedid == TeleMenu_p2[3])
                {
                        
SetPlayerPos(playerid1630.2030,-2328.9673,13.5469);
                        
SetPlayerFacingAngle(playerid0.9392);
                        
SendClientMessage(playerid, -1"Tele 2");
                }
                else if(
clickedid == TeleMenu_p2[4])
                {
                        
SetPlayerPos(playerid, -1424.6083, -290.962214.1484);
                        
SetPlayerFacingAngle(playerid134.9570);
                        
SendClientMessage(playerid, -1"Tele 3");
                }
                else if(
clickedid == TeleMenu_p2[5])
                {
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[0]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[1]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[2]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[3]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[4]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[5]);
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[6]);
                        
SelectTextDraw(playerid0xA3B4C5FF);
                        
SendClientMessage(playerid, -1"Voltou ao MENU");
                }
                else if(
clickedid == TeleMenu_p2[6])
                {
                        
SendClientMessage(playerid, -1"Saiu do MENU");
                }
 
                
//-------------------PAGE 1
                
TextDrawHideForPlayer(playeridTeleMenu_p1[0]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[1]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[2]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[3]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[4]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[5]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[6]);
                
CancelSelectTextDraw(playerid);
                
                
//-------------------PAGE 2
                
TextDrawHideForPlayer(playeridTeleMenu_p2[0]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[1]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[2]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[3]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[4]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[5]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[6]);
        }
        return 
1;

Reply
#2

Talvez vocк precise destruir as textdraws TeleMenu_p1 quando clicar em Prуximo, a p2 pode estar sendo criada abaixo da p1, jб olhou isso?
Reply
#3

PHP код:
else if(clickedid == TeleMenu_p1[5]) 
                { 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[0]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[1]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[2]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[3]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[4]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[5]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[6]); 
                        
SelectTextDraw(playerid0xA3B4C5FF); 
                        
SendClientMessage(playerid, -1"Proximo MENU"); 
                        return 
1;
                } 
PHP код:
else if(clickedid == TeleMenu_p2[5]) 
                { 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[0]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[1]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[2]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[3]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[4]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[5]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[6]); 
                        
SelectTextDraw(playerid0xA3B4C5FF); 
                        
SendClientMessage(playerid, -1"Voltou ao MENU"); 
                        return 
1;
                } 
Reply
#4

Quote:
Originally Posted by Galhardo
Посмотреть сообщение
PHP код:
else if(clickedid == TeleMenu_p1[5]) 
                { 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[0]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[1]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[2]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[3]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[4]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[5]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[6]); 
                        
SelectTextDraw(playerid0xA3B4C5FF); 
                        
SendClientMessage(playerid, -1"Proximo MENU"); 
                        return 
1;
                } 
PHP код:
else if(clickedid == TeleMenu_p2[5]) 
                { 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[0]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[1]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[2]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[3]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[4]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[5]); 
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[6]); 
                        
SelectTextDraw(playerid0xA3B4C5FF); 
                        
SendClientMessage(playerid, -1"Voltou ao MENU"); 
                        return 
1;
                } 
Obrigado amigo, funcionou, o problema era mesmo que nгo retornava o comando! Olha como ficou:

PHP код:
#include <a_samp>
#pragma dynamic 16384
new Text:TeleMenu_p1[7];
new 
Text:TeleMenu_p2[7];
public 
OnFilterScriptInit()
{
        print(
"\n--------------------------------------");
        print(
" Textdraw teleporting - tut for showing\n  how textdraw selecting works");
        print(
"--------------------------------------\n");
//--------------------------------TeleMenu_p1------------------------------------
TeleMenu_p1[0] = TextDrawCreate(100.929275136.916687"_");
TextDrawLetterSize(TeleMenu_p1[0], 0.53835213.243331);
TextDrawTextSize(TeleMenu_p1[0], -1709.6003410.000000);
TextDrawAlignment(TeleMenu_p1[0], 3);
TextDrawColor(TeleMenu_p1[0], 151);
TextDrawUseBox(TeleMenu_p1[0], 1);
TextDrawBoxColor(TeleMenu_p1[0], -16777142);
TextDrawSetShadow(TeleMenu_p1[0], 0);
TextDrawSetOutline(TeleMenu_p1[0], 0);
TextDrawBackgroundColor(TeleMenu_p1[0], -16776961);
TextDrawFont(TeleMenu_p1[0], 1);
TextDrawSetProportional(TeleMenu_p1[0], 1);
TextDrawSetShadow(TeleMenu_p1[0], 0);
TeleMenu_p1[1] = TextDrawCreate(96.782493137.066543"TELEPORT");
TextDrawLetterSize(TeleMenu_p1[1], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p1[1], 3);
TextDrawColor(TeleMenu_p1[1], -1);
TextDrawSetShadow(TeleMenu_p1[1], 0);
TextDrawSetOutline(TeleMenu_p1[1], 3);
TextDrawBackgroundColor(TeleMenu_p1[1], 255);
TextDrawFont(TeleMenu_p1[1], 2);
TextDrawSetProportional(TeleMenu_p1[1], 1);
TextDrawSetShadow(TeleMenu_p1[1], 0);
TeleMenu_p1[2] = TextDrawCreate(50.864700160.433456"Tele_1");
TextDrawLetterSize(TeleMenu_p1[2], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p1[2], 3);
TextDrawColor(TeleMenu_p1[2], 16777215);
TextDrawSetShadow(TeleMenu_p1[2], 0);
TextDrawSetOutline(TeleMenu_p1[2], 0);
TextDrawBackgroundColor(TeleMenu_p1[2], 255);
TextDrawFont(TeleMenu_p1[2], 3);
TextDrawSetProportional(TeleMenu_p1[2], 1);
TextDrawSetShadow(TeleMenu_p1[2], 0);
TextDrawSetSelectable(TeleMenu_p1[2], true);
TeleMenu_p1[3] = TextDrawCreate(50.864700178.433334"Tele_2");
TextDrawLetterSize(TeleMenu_p1[3], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p1[3], 3);
TextDrawColor(TeleMenu_p1[3], 16777215);
TextDrawSetShadow(TeleMenu_p1[3], 0);
TextDrawSetOutline(TeleMenu_p1[3], 0);
TextDrawBackgroundColor(TeleMenu_p1[3], 255);
TextDrawFont(TeleMenu_p1[3], 3);
TextDrawSetProportional(TeleMenu_p1[3], 1);
TextDrawSetShadow(TeleMenu_p1[3], 0);
TextDrawSetSelectable(TeleMenu_p1[3], true);
TeleMenu_p1[4] = TextDrawCreate(50.864700197.333206"Tele_3");
TextDrawLetterSize(TeleMenu_p1[4], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p1[4], 3);
TextDrawColor(TeleMenu_p1[4], 16777215);
TextDrawSetShadow(TeleMenu_p1[4], 0);
TextDrawSetOutline(TeleMenu_p1[4], 0);
TextDrawBackgroundColor(TeleMenu_p1[4], 255);
TextDrawFont(TeleMenu_p1[4], 3);
TextDrawSetProportional(TeleMenu_p1[4], 1);
TextDrawSetShadow(TeleMenu_p1[4], 0);
TextDrawSetSelectable(TeleMenu_p1[4], true);
TeleMenu_p1[5] = TextDrawCreate(26.700004240.750015"Proximo");
TextDrawLetterSize(TeleMenu_p1[5], 0.3063521.529999);
TextDrawAlignment(TeleMenu_p1[5], 2);
TextDrawColor(TeleMenu_p1[5], -1);
TextDrawSetShadow(TeleMenu_p1[5], 0);
TextDrawSetOutline(TeleMenu_p1[5], 0);
TextDrawBackgroundColor(TeleMenu_p1[5], 255);
TextDrawFont(TeleMenu_p1[5], 1);
TextDrawSetProportional(TeleMenu_p1[5], 1);
TextDrawSetShadow(TeleMenu_p1[5], 0);
TextDrawSetSelectable(TeleMenu_p1[5], true);
TeleMenu_p1[6] = TextDrawCreate(69.900062240.750015"Sair");
TextDrawLetterSize(TeleMenu_p1[6], 0.3063521.529999);
TextDrawAlignment(TeleMenu_p1[6], 1);
TextDrawColor(TeleMenu_p1[6], -1);
TextDrawSetShadow(TeleMenu_p1[6], 0);
TextDrawSetOutline(TeleMenu_p1[6], 0);
TextDrawBackgroundColor(TeleMenu_p1[6], 255);
TextDrawFont(TeleMenu_p1[6], 1);
TextDrawSetProportional(TeleMenu_p1[6], 1);
TextDrawSetShadow(TeleMenu_p1[6], 0);
TextDrawSetSelectable(TeleMenu_p1[6], true);
//------------------------------TeleMenu_p2--------------------------------------
TeleMenu_p2[0] = TextDrawCreate(100.929275136.916687"_");
TextDrawLetterSize(TeleMenu_p2[0], 0.53835213.243330);
TextDrawTextSize(TeleMenu_p2[0], -1709.6003410.000000);
TextDrawAlignment(TeleMenu_p2[0], 3);
TextDrawColor(TeleMenu_p2[0], 151);
TextDrawUseBox(TeleMenu_p2[0], 1);
TextDrawBoxColor(TeleMenu_p2[0], -16777142);
TextDrawSetShadow(TeleMenu_p2[0], 0);
TextDrawSetOutline(TeleMenu_p2[0], 0);
TextDrawBackgroundColor(TeleMenu_p2[0], -16776961);
TextDrawFont(TeleMenu_p2[0], 1);
TextDrawSetProportional(TeleMenu_p2[0], 1);
TextDrawSetShadow(TeleMenu_p2[0], 0);
TeleMenu_p2[1] = TextDrawCreate(96.782493137.066543"TELEPORT");
TextDrawLetterSize(TeleMenu_p2[1], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p2[1], 3);
TextDrawColor(TeleMenu_p2[1], -1);
TextDrawSetShadow(TeleMenu_p2[1], 0);
TextDrawSetOutline(TeleMenu_p2[1], 3);
TextDrawBackgroundColor(TeleMenu_p2[1], 255);
TextDrawFont(TeleMenu_p2[1], 2);
TextDrawSetProportional(TeleMenu_p2[1], 1);
TextDrawSetShadow(TeleMenu_p2[1], 0);
TeleMenu_p2[2] = TextDrawCreate(50.864700160.433456"Tele_4");
TextDrawLetterSize(TeleMenu_p2[2], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p2[2], 3);
TextDrawColor(TeleMenu_p2[2], 16777215);
TextDrawSetShadow(TeleMenu_p2[2], 0);
TextDrawSetOutline(TeleMenu_p2[2], 0);
TextDrawBackgroundColor(TeleMenu_p2[2], 255);
TextDrawFont(TeleMenu_p2[2], 3);
TextDrawSetProportional(TeleMenu_p2[2], 1);
TextDrawSetShadow(TeleMenu_p2[2], 0);
TextDrawSetSelectable(TeleMenu_p2[2], true);
TeleMenu_p2[3] = TextDrawCreate(50.864700178.433334"Tele_5");
TextDrawLetterSize(TeleMenu_p2[3], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p2[3], 3);
TextDrawColor(TeleMenu_p2[3], 16777215);
TextDrawSetShadow(TeleMenu_p2[3], 0);
TextDrawSetOutline(TeleMenu_p2[3], 0);
TextDrawBackgroundColor(TeleMenu_p2[3], 255);
TextDrawFont(TeleMenu_p2[3], 3);
TextDrawSetProportional(TeleMenu_p2[3], 1);
TextDrawSetShadow(TeleMenu_p2[3], 0);
TextDrawSetSelectable(TeleMenu_p2[3], true);
TeleMenu_p2[4] = TextDrawCreate(50.864700197.333206"Tele_6");
TextDrawLetterSize(TeleMenu_p2[4], 0.4000001.600000);
TextDrawAlignment(TeleMenu_p2[4], 3);
TextDrawColor(TeleMenu_p2[4], 16777215);
TextDrawSetShadow(TeleMenu_p2[4], 0);
TextDrawSetOutline(TeleMenu_p2[4], 0);
TextDrawBackgroundColor(TeleMenu_p2[4], 255);
TextDrawFont(TeleMenu_p2[4], 3);
TextDrawSetProportional(TeleMenu_p2[4], 1);
TextDrawSetShadow(TeleMenu_p2[4], 0);
TextDrawSetSelectable(TeleMenu_p2[4], true);
TeleMenu_p2[5] = TextDrawCreate(26.700004240.750015"Voltar");
TextDrawLetterSize(TeleMenu_p2[5], 0.3063511.529999);
TextDrawAlignment(TeleMenu_p2[5], 2);
TextDrawColor(TeleMenu_p2[5], -1);
TextDrawSetShadow(TeleMenu_p2[5], 0);
TextDrawSetOutline(TeleMenu_p2[5], 0);
TextDrawBackgroundColor(TeleMenu_p2[5], 255);
TextDrawFont(TeleMenu_p2[5], 1);
TextDrawSetProportional(TeleMenu_p2[5], 1);
TextDrawSetShadow(TeleMenu_p2[5], 0);
TextDrawSetSelectable(TeleMenu_p2[5], true);
TeleMenu_p2[6] = TextDrawCreate(74.776435241.199981"Sair");
TextDrawLetterSize(TeleMenu_p2[6], 0.3063511.529999);
TextDrawAlignment(TeleMenu_p2[6], 1);
TextDrawColor(TeleMenu_p2[6], -1);
TextDrawSetShadow(TeleMenu_p2[6], 0);
TextDrawSetOutline(TeleMenu_p2[6], 0);
TextDrawBackgroundColor(TeleMenu_p2[6], 255);
TextDrawFont(TeleMenu_p2[6], 1);
TextDrawSetProportional(TeleMenu_p2[6], 1);
TextDrawSetShadow(TeleMenu_p2[6], 0);
TextDrawSetSelectable(TeleMenu_p2[6], true);
        return 
1;
}
 
public 
OnFilterScriptExit()
{
    
// PAGE 1
    
TextDrawDestroy(TeleMenu_p1[0]);
    
TextDrawDestroy(TeleMenu_p1[1]);
    
TextDrawDestroy(TeleMenu_p1[2]);
    
TextDrawDestroy(TeleMenu_p1[3]);
    
TextDrawDestroy(TeleMenu_p1[4]);
    
TextDrawDestroy(TeleMenu_p1[5]);
    
TextDrawDestroy(TeleMenu_p1[6]);
    
    
// PAGE 2
    
TextDrawDestroy(TeleMenu_p2[0]);
    
TextDrawDestroy(TeleMenu_p2[1]);
    
TextDrawDestroy(TeleMenu_p2[2]);
    
TextDrawDestroy(TeleMenu_p2[3]);
    
TextDrawDestroy(TeleMenu_p2[4]);
    
TextDrawDestroy(TeleMenu_p2[5]);
    
TextDrawDestroy(TeleMenu_p2[6]);
    return 
1;
}
 
public 
OnPlayerCommandText(playeridcmdtext[])
{
        if (!
strcmp("/teleport"cmdtexttrue))
        {
            
TextDrawShowForPlayer(playeridTeleMenu_p1[0]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[1]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[2]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[3]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[4]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[5]);
            
TextDrawShowForPlayer(playeridTeleMenu_p1[6]);
            
SelectTextDraw(playerid0xA3B4C5FF);
            return 
1;
        }
        return 
0;
}
 
public 
OnPlayerClickTextDraw(playeridText:clickedid)
{
        if(
_:clickedid != 65535)
        {
                
//------------------------------TeleMenu_p1--------------------------------------
                
if(clickedid == TeleMenu_p1[2])
                {
                        
SetPlayerPos(playerid1688.79901500.775310.7675);
                        
SetPlayerFacingAngle(playerid267.3902);
                        
SendClientMessage(playerid, -1"Tele 1");
                }
                else if(
clickedid == TeleMenu_p1[3])
                {
                        
SetPlayerPos(playerid1630.2030,-2328.9673,13.5469);
                        
SetPlayerFacingAngle(playerid0.9392);
                        
SendClientMessage(playerid, -1"Tele 2");
                }
                else if(
clickedid == TeleMenu_p1[4])
                {
                        
SetPlayerPos(playerid, -1424.6083, -290.962214.1484);
                        
SetPlayerFacingAngle(playerid134.9570);
                        
SendClientMessage(playerid, -1"Tele 3");
                }
                else if(
clickedid == TeleMenu_p1[5])  
                {  
                        
TextDrawHideForPlayer(playeridTeleMenu_p1[0]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p1[1]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p1[2]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p1[3]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p1[4]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p1[5]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p1[6]);
                        
CancelSelectTextDraw(playerid);
                        
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[0]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[1]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[2]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[3]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[4]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[5]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p2[6]);  
                        
SelectTextDraw(playerid0xA3B4C5FF);  
                        
SendClientMessage(playerid, -1"Proximo MENU");  
                        return 
1
                }  
                else if(
clickedid == TeleMenu_p1[6])
                {
                        
SendClientMessage(playerid, -1"Saiu do MENU");
                }
                
//------------------------------TeleMenu_p2--------------------------------------
                
if(clickedid == TeleMenu_p2[2])
                {
                        
SetPlayerPos(playerid1688.79901500.775310.7675);
                        
SetPlayerFacingAngle(playerid267.3902);
                        
SendClientMessage(playerid, -1"Tele 1");
                }
                else if(
clickedid == TeleMenu_p2[3])
                {
                        
SetPlayerPos(playerid1630.2030,-2328.9673,13.5469);
                        
SetPlayerFacingAngle(playerid0.9392);
                        
SendClientMessage(playerid, -1"Tele 2");
                }
                else if(
clickedid == TeleMenu_p2[4])
                {
                        
SetPlayerPos(playerid, -1424.6083, -290.962214.1484);
                        
SetPlayerFacingAngle(playerid134.9570);
                        
SendClientMessage(playerid, -1"Tele 3");
                }
                else if(
clickedid == TeleMenu_p2[5])  
                {  
                        
TextDrawHideForPlayer(playeridTeleMenu_p2[0]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p2[1]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p2[2]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p2[3]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p2[4]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p2[5]);
                        
TextDrawHideForPlayer(playeridTeleMenu_p2[6]);
    
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[0]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[1]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[2]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[3]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[4]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[5]);  
                        
TextDrawShowForPlayer(playeridTeleMenu_p1[6]);  
                        
SelectTextDraw(playerid0xA3B4C5FF);  
                        
SendClientMessage(playerid, -1"Voltou ao MENU");  
                        return 
1
                }  
                else if(
clickedid == TeleMenu_p2[6])
                {
                        
SendClientMessage(playerid, -1"Saiu do MENU");
                }
 
                
//-------------------PAGE 1
                
TextDrawHideForPlayer(playeridTeleMenu_p1[0]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[1]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[2]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[3]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[4]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[5]);
                
TextDrawHideForPlayer(playeridTeleMenu_p1[6]);
                
CancelSelectTextDraw(playerid);
                
                
//-------------------PAGE 2
                
TextDrawHideForPlayer(playeridTeleMenu_p2[0]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[1]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[2]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[3]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[4]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[5]);
                
TextDrawHideForPlayer(playeridTeleMenu_p2[6]);
        }
        return 
1;

Obrigado mais uma vez!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)