[Ajuda]Me ajuda criar um GMX eu procurei mais nenhum funfou
#9

Quote:
Originally Posted by Pedro_Miranda
Посмотреть сообщение
pawn Код:
// Topo
new gmxTick;

// Comando
if(!strcmp("/gmx", cmd, true))
{
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, -1, "Use /gmx <segundos>"); // Contagem
   
    gmxTick = strval(tmp) + 1;
    SetTimer("restartServer", 1000, 1);
    return 1;
}

// Fim do script
forward restartServer();
public restartServer()
{
    -- gmxTick;
    new str[32];
    format(str, sizeof(str), "GMX: ~r~%d", gmxTick);
    GameTextForAll(str, 1000, 5);
    if(gmxTick == 1)
        SendRconCommand("gmx");
       
    return 1;
}
Poderia fazer direto neh:
pawn Код:
SetTimer("restartServer", strval(tmp)*1000, 0);
Simples:
pawn Код:
SendRconCommand("gmx");

//ou

OnGameModeExit();
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)