27.05.2015, 21:30
Eu quero bloquear essa textdraw para quem jб й registrado, alguem pode me ajudar?
PHP код:
new PlayerText: gui_login_botao[3];
stock CriarPlayerTextdraws(playerid)
{
gui_login_botao[2] = CreatePlayerTextDraw(playerid, 319.000000, 224.000000, "Sair");
PlayerTextDrawAlignment(playerid, gui_login_botao[2], 2);
PlayerTextDrawBackgroundColor(playerid, gui_login_botao[2], 255);
PlayerTextDrawFont(playerid, gui_login_botao[2], 2);
PlayerTextDrawLetterSize(playerid, gui_login_botao[2], 0.340000, 1.399999);
PlayerTextDrawColor(playerid, gui_login_botao[2], -1);
PlayerTextDrawSetOutline(playerid, gui_login_botao[2], 1);
PlayerTextDrawSetProportional(playerid, gui_login_botao[2], 1);
PlayerTextDrawUseBox(playerid, gui_login_botao[2], 1);
PlayerTextDrawBoxColor(playerid, gui_login_botao[2], 0);
PlayerTextDrawTextSize(playerid, gui_login_botao[2], 25.000000, 44.000000);
PlayerTextDrawSetSelectable(playerid, gui_login_botao[2], 1);
}
public OnPlayerConnect(playerid)
{
CriarPlayerTextdraws(playerid);
ShowTextDrawsLogin(playerid);
return 1;
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText: playertextid)
{
if(playertextid == gui_login_botao[2])
return Kick(playerid);
return 1;
}
stock ShowTextDrawsLogin(playerid)
{
for(new i = 0; i < sizeof(gui_login); i++) PlayerTextDrawShow(playerid, gui_login[i]);
for(new i = 0; i < sizeof(gui_login_botao); i++) PlayerTextDrawShow(playerid, gui_login_botao[i]);
}
stock ClosedTextDrawsLogin(playerid)
{
for(new i = 0; i < sizeof(gui_login); i++) PlayerTextDrawHide(playerid, gui_login[i]);
for(new i = 0; i < sizeof(gui_login_botao); i++) PlayerTextDrawHide(playerid, gui_login_botao[i]);
}