Pedido]ajuda afk
#1

Tipo eu achei este afk aki elee fs mas tip que queria que ele ficasse com a tela toda preta condo o player ficar em /afk e ser teleportado para um lugar tipo em lv ,e que apreзa na ccabeca dele um textlabel escrito "player afk" e quando player digitar novamente /afk voltar ara sua posicao de oreigem me ajudem ai ficarei muito grato pela ajuada ajudando na reputacion sua

PHP код:
#include a_samp
#define vermelho 0xFF0000FF
#define MAXPLAYERS 50
new
    
Text:afk0,
    
Text:afk1,
    
Text:afk2,
    
Text:afk3,
    
Text:afk4,
    
Text:afk5,
    
bool:afk[MAXPLAYERS]
;
public 
OnFilterScriptInit()
{
    
afk0 TextDrawCreate(37.000000150.000000"~y~Status: ~r~afk");
    
TextDrawBackgroundColor(afk0255);
    
TextDrawFont(afk03);
    
TextDrawLetterSize(afk00.5000003.000000);
    
TextDrawColor(afk0, -1);
    
TextDrawSetOutline(afk02);
    
TextDrawSetProportional(afk01);
    
afk1 TextDrawCreate(10.000000190.000000"digite /afk para sair ou ficar afk.");
    
TextDrawBackgroundColor(afk1255);
    
TextDrawFont(afk13);
    
TextDrawLetterSize(afk10.5000001.000000);
    
TextDrawColor(afk1, -1);
    
TextDrawSetOutline(afk10);
    
TextDrawSetProportional(afk11);
    
TextDrawSetShadow(afk11);
    
TextDrawUseBox(afk11);
    
TextDrawBoxColor(afk1255);
    
TextDrawTextSize(afk1170.00000020.000000);
    
afk2 TextDrawCreate(260.000000120.000000".");
    
TextDrawBackgroundColor(afk2255);
    
TextDrawFont(afk21);
    
TextDrawLetterSize(afk20.70000018.000000);
    
TextDrawColor(afk2255);
    
TextDrawSetOutline(afk20);
    
TextDrawSetProportional(afk21);
    
TextDrawSetShadow(afk21);
    
TextDrawUseBox(afk21);
    
TextDrawBoxColor(afk2255);
    
TextDrawTextSize(afk2470.0000000.000000);
    
afk3 TextDrawCreate(284.000000151.000000"O                 O");
    
TextDrawBackgroundColor(afk3255);
    
TextDrawFont(afk31);
    
TextDrawLetterSize(afk30.5000001.000000);
    
TextDrawColor(afk3, -1);
    
TextDrawSetOutline(afk30);
    
TextDrawSetProportional(afk31);
    
TextDrawSetShadow(afk31);
    
afk4 TextDrawCreate(286.000000217.000000"(~y~------------------)");
    
TextDrawBackgroundColor(afk4255);
    
TextDrawFont(afk41);
    
TextDrawLetterSize(afk40.5000001.000000);
    
TextDrawColor(afk4, -1);
    
TextDrawSetOutline(afk40);
    
TextDrawSetProportional(afk41);
    
TextDrawSetShadow(afk41);
    
afk5 TextDrawCreate(284.000000141.000000"|||              |||");
    
TextDrawBackgroundColor(afk5255);
    
TextDrawFont(afk51);
    
TextDrawLetterSize(afk50.5000001.000000);
    
TextDrawColor(afk5, -65281);
    
TextDrawSetOutline(afk50);
    
TextDrawSetProportional(afk51);
    
TextDrawSetShadow(afk51);
    return 
1;
}
public 
OnFilterScriptExit()
{
    
TextDrawHideForAll(afk0);
    
TextDrawDestroy(afk0);
    
TextDrawHideForAll(afk1);
    
TextDrawDestroy(afk1);
    
TextDrawHideForAll(afk2);
    
TextDrawDestroy(afk2);
    
TextDrawHideForAll(afk3);
    
TextDrawDestroy(afk3);
    
TextDrawHideForAll(afk4);
    
TextDrawDestroy(afk4);
    
TextDrawHideForAll(afk5);
    
TextDrawDestroy(afk5);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext,"/afk",true) == 0)
    {
        
ShowPlayerDialog(playerid,9999,DIALOG_STYLE_LIST,"Afk","Ficar AFK\nSair AFK","ok","sair");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 9999)
    {
        if(
response == 1)
        {
            if(
listitem == 0)
            {
                if(
afk[playerid] == false)
                {
                    new 
ficouafk[30],nome[24];
                    
GetPlayerName(playerid,nome,sizeof(nome));
                    
format(ficouafk,sizeof(ficouafk),"O jogador %s ficou em afk",nome);
                    
afk[playerid] = true;
                    
SendClientMessage(playerid,vermelho,"vocк estб afk.");
                    
TogglePlayerControllable(playerid,0);
                    
SetPlayerVirtualWorld(playerid,playerid+1);
                    
SendClientMessageToAll(vermelho,ficouafk);
                    
TextDrawShowForPlayer(playeridafk0);
                    
TextDrawShowForPlayer(playeridafk1);
                    
TextDrawShowForPlayer(playeridafk2);
                    
TextDrawShowForPlayer(playeridafk3);
                    
TextDrawShowForPlayer(playeridafk4);
                    
TextDrawShowForPlayer(playeridafk5);
                }
                else
                {
                    
SendClientMessage(playerid,vermelho,"ERRO: Vocк jб estб afk.");
                    return 
1;
                }
            }
            if(
listitem == 1)
            {
                if(
afk[playerid] == true)
                {
                    new 
saiuafk[40],nome[24];
                    
GetPlayerName(playerid,nome,sizeof(nome));
                    
format(saiuafk,sizeof(saiuafk),"O jogador %s nгo estб mais em afk.",nome);
                    
SendClientMessage(playerid,vermelho,"Nгo estб mais afk.");
                    
afk[playerid] = false;
                    
TogglePlayerControllable(playerid,1);
                    
SetPlayerVirtualWorld(playerid,1);
                    
SendClientMessageToAll(vermelho,saiuafk);
                    
TextDrawHideForPlayer(playeridafk0);
                    
TextDrawHideForPlayer(playeridafk1);
                    
TextDrawHideForPlayer(playeridafk2);
                    
TextDrawHideForPlayer(playeridafk3);
                    
TextDrawHideForPlayer(playeridafk4);
                    
TextDrawHideForPlayer(playeridafk5);
                }
                else
                {
                    
SendClientMessage(playerid,vermelho,"ERRO: Vocк nгo estб afk.");
                    return 
1;
                }
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Pedido]ajuda afk - by vitorpedro - 19.09.2011, 05:04
Re: Pedido]ajuda afk - by Macintosh - 19.09.2011, 05:24
Re: Pedido]ajuda afk - by vitorpedro - 19.09.2011, 14:55
Re: Pedido]ajuda afk - by Lуs - 19.09.2011, 14:58
Re: Pedido]ajuda afk - by Falcon. - 19.09.2011, 15:00
Re: Pedido]ajuda afk - by vitorpedro - 19.09.2011, 15:54
Re: Pedido]ajuda afk - by vitorpedro - 19.09.2011, 20:21
Re: Pedido]ajuda afk - by Macintosh - 19.09.2011, 20:49

Forum Jump:


Users browsing this thread: 1 Guest(s)