[Ajuda] Comando /afk
#2

pawn Код:
if(!strcmp(cmdtext, "/afk", true))
{
    if(AFK[playerid] == 1) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк jб estб no modo afk para poder utilizar esse comando!");
    new length = strlen(cmdtext);
    while((idx < length) && (cmdtext[idx] <= ' ')) {
        idx++;
    }
    new offset = idx; new result[64];
    while((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
        result[idx - offset] = cmdtext[idx];
        idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result)) return SendClientMessage(playerid, Vermelho, "Uso: /afk [motivo]");
    AFK[playerid] = 1;
    SetPlayerVirtualWorld(playerid, 1);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid,0);
    TextDrawShowForPlayer(playerid, AfkText);
    TextDrawShowForPlayer(playerid, AfkBackText);
    GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
    new Str[128]; format(Str, sizeof(Str), "(INFO) O jogador %s ficou ausente do jogo! [Motivo: %s]", playername, result);
    SendClientMessageToAll(0xFF9595AA, string);
    return 1;
}
Tente isso
Reply


Messages In This Thread
Comando /afk - by Equipe - 14.02.2013, 02:08
Re: Comando /afk - by Dwayne-Pheonix - 14.02.2013, 11:14
Re: Comando /afk - by Equipe - 14.02.2013, 14:27
Re: Comando /afk - by Absolution - 15.02.2013, 12:37

Forum Jump:


Users browsing this thread: 1 Guest(s)