03.11.2018, 21:36
I Writen this code, to choose weapons in the game (with text draws), there's a function to show and hide every TXD that are contained in "if", there's a button to go and back, (MN_BotaoIR[playerid], MN_BotaoVIR[playerid]), but when i start the server, and click in the button, he doesn't work, somebody know why?
pawn Code:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if((playertextid == MN_BotaoIR[playerid]) && (Check == 0))
{
FecharCruzelion(playerid);
MostrarPioneer(playerid);
Check = 1;
}
if((playertextid == MN_BotaoVIR[playerid]) && (Check == 0))
{
FecharCruzelion(playerid);
MostrarColt(playerid);
Check = 6;
}
if((playertextid == MN_BotaoIR[playerid]) && (Check == 1))
{
FecharPioneer(playerid);
MostrarHeckler(playerid);
Check = 2;
}
if((playertextid == MN_BotaoVIR[playerid]) && (Check == 1))
{
FecharPioneer(playerid);
MostrarCruzelion(playerid);
Check = 0;
}
if((playertextid == MN_BotaoIR[playerid]) && (Check == 2))
{
FecharHeckler(playerid);
MostrarSten(playerid);
Check = 3;
}
if((playertextid == MN_BotaoVIR[playerid]) && (Check == 2))
{
FecharHeckler(playerid);
MostrarPioneer(playerid);
Check = 1;
}
if((playertextid == MN_BotaoIR[playerid]) && (Check == 3))
{
FecharSten(playerid);
MostrarAccuracy(playerid);
Check = 4;
}
if((playertextid == MN_BotaoVIR[playerid]) && (Check == 3))
{
FecharSten(playerid);
MostrarHeckler(playerid);
Check = 2;
}
if((playertextid == MN_BotaoIR[playerid]) && (Check == 4))
{
FecharAccuracy(playerid);
MostrarColete(playerid);
Check = 5;
}
if((playertextid == MN_BotaoVIR[playerid]) && (Check == 4))
{
FecharAccuracy(playerid);
MostrarSten(playerid);
Check = 3;
}
if((playertextid == MN_BotaoIR[playerid]) && (Check == 5))
{
FecharColete(playerid);
MostrarColt(playerid);
Check = 6;
}
if((playertextid == MN_BotaoVIR[playerid]) && (Check == 5))
{
FecharColete(playerid);
MostrarAccuracy(playerid);
Check = 4;
}
if((playertextid == MN_BotaoIR[playerid]) && (Check == 6))
{
FecharColt(playerid);
MostrarCruzelion(playerid);
Check = 1;
}
if((playertextid == MN_BotaoVIR[playerid]) && (Check == 6))
{
FecharColt(playerid);
MostrarColete(playerid);
Check = 5;
}
if(playertextid == MN_BotaoSAIR[playerid])
{
FecharMN_Tudo(playerid);
CancelSelectTextDraw(playerid);
}
return 1;
}