Portal SAMP
[Ajuda] Ajuda - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] Ajuda (/showthread.php?tid=4456)



Ajuda - kakaroto_developer - 24/01/2024

Boa tarde a todos presentes!.. Ja tem alguns dias que eu ando tentando refazer um comando bem util para meu servidor, porem estou com dificuldades para adaptar o seguinte IF de tempo no Comando.. vou deixar o codigo do meu comando a baixo, eu gostaria de adicionar um temporizador cada vez que o player usar o comando /entregarprods ou /entregarprodutos ambos sao os mesmos.. mas ate o momento estou sem sucesso Sad Qnd o player usa o comando citado ele fara a entrega para o local e recebera um valor aleatorio e eu gostaria de deixar o cmd com temporizador podendo usar de tempos em tempos e nao toda hora.. agradeço desde ja Smile
Código:
    CMD:entregarprods(playerid)return ForT:entregarprodutos(playerid);
    CMD:entregarprodutos(playerid)
    {
            new cashmade;
            new tmpcar;
            tmpcar = GetPlayerVehicleID(playerid);
            if(GetVehicleModel(tmpcar) != 514 && GetVehicleModel(tmpcar) != 515 && GetVehicleModel(tmpcar) != 440 && GetVehicleModel(tmpcar) != 456)
            {
                GameTextForPlayer(playerid, "~r~Você não está em um veículo de entrega.", 5000, 1);
                return 1;
            }
            if(GetVehicleTrailer(tmpcar) < 1)
            {
                if(GetVehicleModel(tmpcar) != 440 && GetVehicleModel(tmpcar) != 456)
                {
                     SendClientMessage(playerid, COLOR_GREY, "Você pode entregar produtos apenas se tiver uma carga traseira.");
                     return 1;
                }
            }
            new string[128];
            if(PlayerHaul[tmpcar][pLoad] == 0)
            {
                GameTextForPlayer(playerid, "~r~Caminhao vazio, volte para o estoque.", 5000, 1);
                format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                ShowCami(playerid);
                return 1;
            }
            for(new i = 0; i < sizeof(BizzInfo); i++)
            {
                if (PlayerToPoint(10, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    if(BizzInfo[i][bProductsReq] < 1)
                    {
                        GameTextForPlayer(playerid, "~r~Nao precisamos mais de produtos", 5000, 1);
                        format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                        PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                        PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                        ShowCami(playerid);
                        return 1;
                    }
                    if(PlayerHaul[tmpcar][pLoad]*BizzInfo[i][bPriceProd] > BizzInfo[i][bTill])
                    {
                        GameTextForPlayer(playerid, "~r~Nao podemos pagar pelos produtos", 5000, 1);
                        format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                        PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                        PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                        ShowCami(playerid);
                        return 1;
                    }
                    cashmade = PlayerHaul[tmpcar][pLoad]*BizzInfo[i][bPriceProd];
                    BizzInfo[i][bProducts] += PlayerHaul[tmpcar][pLoad];
                    BizzInfo[i][bProductsReq] -= PlayerHaul[tmpcar][pLoad];
                    PlayerHaul[tmpcar][pLoad] = 0;
                    GiveDinheiro(playerid,cashmade);
                    BizzInfo[i][bTill] -= cashmade;
                    empmoney(playerid, 21, cashmade);
                    GameTextForPlayer(playerid, "~r~Caminhao vazio, volte para o estoque", 5000, 1);
                    format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                    PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                    format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                    PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                    ShowCami(playerid);
                    SalvarEmpresa(i);
                    Atualizar3Dtexts();
                    return 1;
                }
            }
            for(new i = 0; i < sizeof(SBizzInfo); i++)
            {
                if (PlayerToPoint(10, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
                {
                    if(SBizzInfo[i][sbProductsReq] < 1)
                    {
                        GameTextForPlayer(playerid, "~r~Nao precisamos mais de produtos", 5000, 1);
                        format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                        PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                        PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                        ShowCami(playerid);
                        return 1;
                    }

                    cashmade = PlayerHaul[tmpcar][pLoad]*SBizzInfo[i][sbPriceProd];
                    SBizzInfo[i][sbProducts] += PlayerHaul[tmpcar][pLoad];
                    SBizzInfo[i][sbProductsReq] -= PlayerHaul[tmpcar][pLoad];
                    GiveDinheiro(playerid,cashmade);
                    SBizzInfo[i][sbTill] -= cashmade;
                    PlayerHaul[tmpcar][pLoad] = 0;
                    GameTextForPlayer(playerid, "~r~Caminhao vazio, volte para o estoque.", 5000, 1);
                    format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                    PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                    format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                    PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                    ShowCami(playerid);
                    SalvarSEmpresa(i);
                    Atualizar3Dtexts();
                    return 1;
                }
            }
            for(new i = 0; i < sizeof(FBizzInfo); i++)
            {
                if (PlayerToPoint(10, playerid,FBizzInfo[i][fbEntranceX], FBizzInfo[i][fbEntranceY], FBizzInfo[i][fbEntranceZ]))
                    {
                        if(FBizzInfo[i][fbProductsReq] < 1)
                        {
                            GameTextForPlayer(playerid, "~r~Nao precisamos mais de produtos", 5000, 1);
                            format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                            PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                            format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                            PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                            ShowCami(playerid);
                            return 1;
                        }

                        cashmade = PlayerHaul[tmpcar][pLoad]*FBizzInfo[i][fbPriceProd];
                        FBizzInfo[i][fbProducts] += PlayerHaul[tmpcar][pLoad];
                        FBizzInfo[i][fbProductsReq] -= PlayerHaul[tmpcar][pLoad];
                        GiveDinheiro(playerid,cashmade);
                        FBizzInfo[i][fbTill] -= cashmade;
                        PlayerHaul[tmpcar][pLoad] = 0;
                        GameTextForPlayer(playerid, "~r~Caminhao vazio, volte para o estoque.", 5000, 1);
                        format(string, sizeof(string), "Dinheiro adquiridot $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                        PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                        PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                        ShowCami(playerid);
                        SalvarFEmpresa(i);
                        Atualizar3Dtexts();
                        return 1;
                    }
                }
            GameTextForPlayer(playerid, "~r~Esta longe de uma empresa ou fazenda", 5000, 1);
            return 1;
    }



RE: Ajuda - Aranha - 24/01/2024

(24/01/2024 12:20)kakaroto_developer Escreveu: Boa tarde a todos presentes!.. Ja tem alguns dias que eu ando tentando refazer um comando bem util para meu servidor, porem estou com dificuldades para adaptar o seguinte IF de tempo no Comando.. vou deixar o codigo do meu comando a baixo, eu gostaria de adicionar um temporizador cada vez que o player usar o comando /entregarprods ou /entregarprodutos ambos sao os mesmos.. mas ate o momento estou sem sucesso Sad Qnd o player usa o comando citado ele fara a entrega para o local e recebera um valor aleatorio e eu gostaria de deixar o cmd com temporizador podendo usar de tempos em tempos e nao toda hora.. agradeço desde ja Smile
Código:
    CMD:entregarprods(playerid)return ForT:entregarprodutos(playerid);
    CMD:entregarprodutos(playerid)
    {
            new cashmade;
            new tmpcar;
            tmpcar = GetPlayerVehicleID(playerid);
            if(GetVehicleModel(tmpcar) != 514 && GetVehicleModel(tmpcar) != 515 && GetVehicleModel(tmpcar) != 440 && GetVehicleModel(tmpcar) != 456)
            {
                GameTextForPlayer(playerid, "~r~Você não está em um veículo de entrega.", 5000, 1);
                return 1;
            }
            if(GetVehicleTrailer(tmpcar) < 1)
            {
                if(GetVehicleModel(tmpcar) != 440 && GetVehicleModel(tmpcar) != 456)
                {
                     SendClientMessage(playerid, COLOR_GREY, "Você pode entregar produtos apenas se tiver uma carga traseira.");
                     return 1;
                }
            }
            new string[128];
            if(PlayerHaul[tmpcar][pLoad] == 0)
            {
                GameTextForPlayer(playerid, "~r~Caminhao vazio, volte para o estoque.", 5000, 1);
                format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                ShowCami(playerid);
                return 1;
            }
            for(new i = 0; i < sizeof(BizzInfo); i++)
            {
                if (PlayerToPoint(10, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    if(BizzInfo[i][bProductsReq] < 1)
                    {
                        GameTextForPlayer(playerid, "~r~Nao precisamos mais de produtos", 5000, 1);
                        format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                        PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                        PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                        ShowCami(playerid);
                        return 1;
                    }
                    if(PlayerHaul[tmpcar][pLoad]*BizzInfo[i][bPriceProd] > BizzInfo[i][bTill])
                    {
                        GameTextForPlayer(playerid, "~r~Nao podemos pagar pelos produtos", 5000, 1);
                        format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                        PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                        PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                        ShowCami(playerid);
                        return 1;
                    }
                    cashmade = PlayerHaul[tmpcar][pLoad]*BizzInfo[i][bPriceProd];
                    BizzInfo[i][bProducts] += PlayerHaul[tmpcar][pLoad];
                    BizzInfo[i][bProductsReq] -= PlayerHaul[tmpcar][pLoad];
                    PlayerHaul[tmpcar][pLoad] = 0;
                    GiveDinheiro(playerid,cashmade);
                    BizzInfo[i][bTill] -= cashmade;
                    empmoney(playerid, 21, cashmade);
                    GameTextForPlayer(playerid, "~r~Caminhao vazio, volte para o estoque", 5000, 1);
                    format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                    PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                    format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                    PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                    ShowCami(playerid);
                    SalvarEmpresa(i);
                    Atualizar3Dtexts();
                    return 1;
                }
            }
            for(new i = 0; i < sizeof(SBizzInfo); i++)
            {
                if (PlayerToPoint(10, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
                {
                    if(SBizzInfo[i][sbProductsReq] < 1)
                    {
                        GameTextForPlayer(playerid, "~r~Nao precisamos mais de produtos", 5000, 1);
                        format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                        PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                        PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                        ShowCami(playerid);
                        return 1;
                    }

                    cashmade = PlayerHaul[tmpcar][pLoad]*SBizzInfo[i][sbPriceProd];
                    SBizzInfo[i][sbProducts] += PlayerHaul[tmpcar][pLoad];
                    SBizzInfo[i][sbProductsReq] -= PlayerHaul[tmpcar][pLoad];
                    GiveDinheiro(playerid,cashmade);
                    SBizzInfo[i][sbTill] -= cashmade;
                    PlayerHaul[tmpcar][pLoad] = 0;
                    GameTextForPlayer(playerid, "~r~Caminhao vazio, volte para o estoque.", 5000, 1);
                    format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                    PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                    format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                    PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                    ShowCami(playerid);
                    SalvarSEmpresa(i);
                    Atualizar3Dtexts();
                    return 1;
                }
            }
            for(new i = 0; i < sizeof(FBizzInfo); i++)
            {
                if (PlayerToPoint(10, playerid,FBizzInfo[i][fbEntranceX], FBizzInfo[i][fbEntranceY], FBizzInfo[i][fbEntranceZ]))
                    {
                        if(FBizzInfo[i][fbProductsReq] < 1)
                        {
                            GameTextForPlayer(playerid, "~r~Nao precisamos mais de produtos", 5000, 1);
                            format(string, sizeof(string), "Dinheiro adquirido $%d.", cashmade);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                            PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                            format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                            PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                            ShowCami(playerid);
                            return 1;
                        }

                        cashmade = PlayerHaul[tmpcar][pLoad]*FBizzInfo[i][fbPriceProd];
                        FBizzInfo[i][fbProducts] += PlayerHaul[tmpcar][pLoad];
                        FBizzInfo[i][fbProductsReq] -= PlayerHaul[tmpcar][pLoad];
                        GiveDinheiro(playerid,cashmade);
                        FBizzInfo[i][fbTill] -= cashmade;
                        PlayerHaul[tmpcar][pLoad] = 0;
                        GameTextForPlayer(playerid, "~r~Caminhao vazio, volte para o estoque.", 5000, 1);
                        format(string, sizeof(string), "Dinheiro adquiridot $%d.", cashmade);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        format(string, sizeof(string), "Produtos: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pLoad]);
                        PlayerTextDrawSetString(playerid,Produtosnb[playerid], string);
                        format(string, sizeof(string), "%d",PlayerHaul[tmpcar][pCapasity]);
                        PlayerTextDrawSetString(playerid,MaxProdutosnb[playerid], string);
                        ShowCami(playerid);
                        SalvarFEmpresa(i);
                        Atualizar3Dtexts();
                        return 1;
                    }
                }
            GameTextForPlayer(playerid, "~r~Esta longe de uma empresa ou fazenda", 5000, 1);
            return 1;
    }
Código:
new TimerDescarregar[MAX_PLAYERS];



if((gettime() - TimerDescarregar[playerid]) >= 300)
{






    //Codigo
    TimerDescarregar[playerid] = gettime();
}
else
{






    return SendClientMessage(playerid, -1, "| ERRO | Seu comando esta bloqueado, aguarde alguns segundos");
}



RE: Ajuda - xbruno1000x - 24/01/2024

Na documentação tem o código pronto:
https://www.open.mp/pt-BR/docs/scripting/functions/GetTickCount