[Ajuda] 3 Duvidas @EDIT
#1

Bom Dia, galera do Fуrum SA-MP, tф aqui com 2 dъvida, simples atй, mais que eu nгo sei (avб й mesmo?), gostaria de um cуdigo para que um veiculo que eu spawne, fique trocando de cor simultaneamente, tipo, do rosa, ao azul, do azul ao verde, e bem rapidamente! Vi isso em um servidor, e sei que й possivel! A segunda dъvida й como criar um comando "equipar" decente pois o meu ele diz que o servidor nгo estб reconhecendo, e eu tenho 6 ORGs, e sei lugares diferentes para equipar, entгo peзo este comando a vocкs! Obrigado

@EDIT:

E tambйm queria saber como criar um "/prisaoadm" para RCON
Reply
#2

pawn Код:
CMD:equipar(playerid, params[])
{
    GivePlayerWeapon(playerid, 24, 100);
    GivePlayerWeapon(playerid, 23, 100);
    GivePlayerWeapon(playerid, 4, 1);
    GivePlayerWeapon(playerid, 28, 100);
    GivePlayerWeapon(playerid, 33, 100);
    GivePlayerWeapon(playerid, 38, 100);
return true;
}
e o de mudar os carros chama Crazy Car que vocк quer basta olhar no search '-'
Reply
#3

seria isso ? [FilterScript] Carro Louco
Reply
#4

focaximubh, Obrigado pelo CMD, e JeeanK2 pelo FS que me passou REP+ aos dois, mas podem ler o EDIT, pf
Reply
#5

Se eu fosse vocк nгo ficava pedindo cуdigos prontos, iria estudar a linguagem para obter seus prуprios conhecimentos.
Reply
#6

Quote:
Originally Posted by DannielCooper
Посмотреть сообщение
Se eu fosse vocк nгo ficava pedindo cуdigos prontos, iria estudar a linguagem para obter seus prуprios conhecimentos.
І , e os comandos sгo uns dos mais bбsicos de se aprender !
Reply
#7

Eu nгo deveria fazer pra vocк, para vocк comeзar a estudar, mais fiz. Tб aqui.

pawn Код:
public OnRconCommand(cmd[])
{
    if(strcmp(cmd, "/cadeia", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [ID/Nome] [Tempo(Minutos)] [Motivo]");
                return 1;
            }
            new playa;
            new money;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            money = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 3000)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                    return 1;
                }
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        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))
                        {
                            SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo(Minutos)] [motivo]");
                            return 1;
                        }
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "* Vocк prendeu %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTRED, string);
                        format(string, sizeof(string), "* Vocк foi preso pelo Admin %s    Motivo: %s.", sendername,result);
                        GameTextForPlayer(playa, "~b~Bem Vindo a ~n~~r~Cadeia Admin", 5000, 3);
                        ResetPlayerWeapons(playa);
                        WantedPoints[playa] = 0;
                        SetPlayerWantedLevel(playa, 0);
                        PlayerInfo[playa][pJailed] = 2;
                        PlayerInfo[playa][pJailTime] = money * 60;
                        SetPlayerPos(playa, 346.5848, 306.1026, 999.1484);
                        SetPlayerInterior(playa,6);
                        format(string, sizeof(string), "Vocк foi preso por %d minutos.", money);
                        SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "AdmCmd: Admin %s prendeu %s por {80E3FF}%d {E84F33}Minutos, Motivo: {80E3FF}%s.",sendername,giveplayer,money,result);
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        printf("%s", string);
                        ProcuradoPlayer(playa);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo tem permissao para usar esse comando!");
            }
        }
        return 1;
    }
    return 0;
}
Reply
#8

vlw -.- REP+
Reply
#9

Quote:
Originally Posted by DannielCooper
Посмотреть сообщение
Eu nгo deveria fazer pra vocк, para vocк comeзar a estudar, mais fiz. Tб aqui.

pawn Код:
public OnRconCommand(cmd[])
{
    if(strcmp(cmd, "/cadeia", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [ID/Nome] [Tempo(Minutos)] [Motivo]");
                return 1;
            }
            new playa;
            new money;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            money = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 3000)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                    return 1;
                }
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        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))
                        {
                            SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo(Minutos)] [motivo]");
                            return 1;
                        }
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "* Vocк prendeu %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTRED, string);
                        format(string, sizeof(string), "* Vocк foi preso pelo Admin %s    Motivo: %s.", sendername,result);
                        GameTextForPlayer(playa, "~b~Bem Vindo a ~n~~r~Cadeia Admin", 5000, 3);
                        ResetPlayerWeapons(playa);
                        WantedPoints[playa] = 0;
                        SetPlayerWantedLevel(playa, 0);
                        PlayerInfo[playa][pJailed] = 2;
                        PlayerInfo[playa][pJailTime] = money * 60;
                        SetPlayerPos(playa, 346.5848, 306.1026, 999.1484);
                        SetPlayerInterior(playa,6);
                        format(string, sizeof(string), "Vocк foi preso por %d minutos.", money);
                        SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "AdmCmd: Admin %s prendeu %s por {80E3FF}%d {E84F33}Minutos, Motivo: {80E3FF}%s.",sendername,giveplayer,money,result);
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        printf("%s", string);
                        ProcuradoPlayer(playa);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo tem permissao para usar esse comando!");
            }
        }
        return 1;
    }
    return 0;
}

Usaria "/rcon /cadeia [id] [tempo]" ? << Lol meio complicado kkkk

Retire da OnRconCommand e coloque em OnPlayerCommandText.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)