SA-MP Forums Archive
[Pedido] Comando GMX com tempo determinado - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Comando GMX com tempo determinado (/showthread.php?tid=377398)



Comando GMX com tempo determinado - Rhayziin - 14.09.2012

Bom, eu tentei fazer um SetTimer, deu erro, tentei tambйm com SetTimerEx, deu erro! lol, vou postar o comando normal...

pawn Code:
CMD:gmx(playerid)
{
    if(Info[playerid][zAdmin] >= 5)
    {
        GetPlayerName(playerid,pNome,MAX_PLAYER_NAME);
        format(String,sizeof(String),"{7FFFD4}O Adminitrador {AFEEEE}%s{7FFFD4} deu GMX no Servidor!",pNome);
        SendClientMessageToAll(SUCESS, String);
        for(new i; i < MAX_PLAYERS; ++i)
        {
            SalvarConta(i);
        }
        SendRconCommand("Gmx");
    }
    else
    {
        SendClientMessage(playerid, FAIL, NAOADM);
    }
    return 1;
}
Alguem ajuda ae o/


Re: Comando GMX com tempo determinado - ViniBorn - 14.09.2012

Tempo = segundos
pawn Code:
SetTimer("Exit",Tempo*1000, false);



Re: Comando GMX com tempo determinado - Rhayziin - 14.09.2012

Quote:
Originally Posted by Viniborn
View Post
Tempo = segundos
pawn Code:
SetTimer("Exit",Tempo*1000, false);
Eu sei mano, mas para isso vou ter que fazer uma public pra colocar isso:
pawn Code:
for(new i; i < MAX_PLAYERS; ++i)
        {
            SalvarConta(i);
        }
        SendRconCommand("Gmx");
e й nessa parte que da erro...


Re: Comando GMX com tempo determinado - zSuYaNw - 14.09.2012

tentas:
pawn Code:
CMD:gmx(playerid)
{
    if(Info[playerid][zAdmin] >= 5)
    {
        GetPlayerName(playerid,pNome,MAX_PLAYER_NAME);
        format(String,sizeof(String),"{7FFFD4}O Adminitrador {AFEEEE}%s{7FFFD4} deu GMX no Servidor!",pNome);
        SendClientMessageToAll(SUCESS, String);
       
        for(new i, e = GetMaxPlayers(); i != e; ++i){
            SalvarConta(i);
        }
       
        SetTimer("Down",  Tempo * 1000, false);
    }
    else
    {
        SendClientMessage(playerid, FAIL, NAOADM);
    }
    return 1;
}

Down(); public Down()
{
    return SendRconCommand("gmx");
}



Re: Comando GMX com tempo determinado - Rhayziin - 14.09.2012

Quote:
Originally Posted by [Full]Garfield[XDB]
View Post
tentas:
pawn Code:
CMD:gmx(playerid)
{
    if(Info[playerid][zAdmin] >= 5)
    {
        GetPlayerName(playerid,pNome,MAX_PLAYER_NAME);
        format(String,sizeof(String),"{7FFFD4}O Adminitrador {AFEEEE}%s{7FFFD4} deu GMX no Servidor!",pNome);
        SendClientMessageToAll(SUCESS, String);
       
        for(new i, e = GetMaxPlayers(); i != e; ++i){
            SalvarConta(i);
        }
       
        SetTimer("Down",  Tempo * 1000, false);
    }
    else
    {
        SendClientMessage(playerid, FAIL, NAOADM);
    }
    return 1;
}

Down(); public Down()
{
    return SendRconCommand("gmx");
}
Vlw gatгo!
PHP Code:
Rep