[Ajuda] Textdraw nao quer sair
#1

pawn Код:
new PlayerText:TextAFK;
    TextAFK = CreatePlayerTextDraw(playerid,319.000000, 200.000000, "Estas AFK, usa /sairafk para saires!");
    PlayerTextDrawAlignment(playerid,TextAFK, 2);
    PlayerTextDrawBackgroundColor(playerid,TextAFK, 255);
    PlayerTextDrawFont(playerid,TextAFK, 2);
    PlayerTextDrawLetterSize(playerid,TextAFK, 0.500000, 1.700000);
    PlayerTextDrawColor(playerid,TextAFK, -16776961);
    PlayerTextDrawSetOutline(playerid,TextAFK, 0);
    PlayerTextDrawSetProportional(playerid,TextAFK, 1);
    PlayerTextDrawSetShadow(playerid,TextAFK, 1);
    PlayerTextDrawUseBox(playerid,TextAFK, 1);
    PlayerTextDrawBoxColor(playerid,TextAFK, 255);
    PlayerTextDrawTextSize(playerid,TextAFK, 115.000000, 435.000000);
    PlayerTextDrawSetSelectable(playerid,TextAFK, 1);


if(!strcmp(cmdtext,"/afk",true))
{
    PlayerTextDrawShow(playerid, TextAFK);
    if(AFK[playerid] == 0) return SendClientMessage(playerid,-1,"Tu jб estбs AFK! digita /sairafk!");
    AFK[playerid] = 0;
    TogglePlayerControllable(playerid, 0);
    SendClientMessage(playerid,-1,"Tu estбs AFK agora!");
    return 1;
}

if(!strcmp(cmdtext,"/sairafk",true))
{
    PlayerTextDrawDestroy(playerid, TextAFK);
    if(AFK[playerid] == 1) return SendClientMessage(playerid,-1,"Tu jб nгo estбs AFK");
    AFK[playerid] = 0;
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid,-1,"Tu jб nгo estбs AFK agora!");
    return 1;
}
A textdraw nao que sair
Reply
#2

https://sampwiki.blast.hk/wiki/PlayerTextDrawHide
Reply
#3

eu ja tive ai nao consgeui na mesma...
Reply
#4

alguem ?
Reply
#5

PlayerTextDrawHide(playerid, TextxAFK);
Reply
#6

pawn Код:
if(strcmp(cmdtext, "/afk", true) == 0)
{
if(AFK[playerid]==0)
{
AFK[playerid]=1;
SetPlayerVirtualWorld(playerid, 1);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid,0);

TextDrawShowForPlayer(playerid,AfkText);
TextDrawShowForPlayer(playerid,AfkBackText);

GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "(INFO) O jogador %s ficou ausente do jogo! (/afk)", playername);
SendClientMessageToAll(0xFF9595AA, string);
}else{
SendClientMessage(playerid,Vermelho,"(ERRO) Vocк jб estб no modo Online para poder utilizar esse comando!");
return 1;
}
return 1;
}
pawn Код:
if (strcmp(cmdtext, "/Sairafk", true) == 0)
{
if(AFK[playerid]==1)
{
AFK[playerid]=0;
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);

TextDrawHideForPlayer(playerid,AfkText);
TextDrawHideForPlayer(playerid,AfkBackText);

GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "(ANTI-AFK) %s voltol a jogar! (/on)", playername);
SendClientMessageToAll(0x2BFF95AA, string);
}else{
SendClientMessage(playerid,Vermelho,"(ERRO) Vocк nгo estб AFK!");
return 1;
}
return 1;
}
pawn Код:
AfkText = TextDrawCreate(168.000000,319.000000,"Estas AFK, usa /sairafk para saires");
TextDrawAlignment(AfkText,0);
TextDrawBackgroundColor(AfkText,0x000000ff);
TextDrawFont(AfkText,1);
TextDrawLetterSize(AfkText,1.000000,2.699999);
TextDrawColor(AfkText,0xffffffff);
TextDrawSetOutline(AfkText,1);
TextDrawSetProportional(AfkText,1);
TextDrawSetShadow(AfkText,1);
se nгo for isso avisa
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)