[Ajuda] /policia /190
#1

Ola estou procurado um sistema de quando nгo tem policia on os player podem digitar /190 ou /policia sera que alguem daki pode me ajuda ? com o comando ?
Reply
#2

ta aiii...

coloca esse comando na include PPC_PlayerCommands.inc

pawn Код:
COMMAND:190(playerid, params[])
{
    new bool:CopOnline = false, Msg[128], Name[24], Fine;
    SendAdminText(playerid, "/190", params);
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerClass] != ClassPolice) {
            if (GetPlayerWantedLevel(playerid) >= 1) {
                GetPlayerName(playerid, Name, sizeof(Name));
                format(Msg, 128, "{00FF00}Jogador {FFFF00}%s{00FF00} estб precisando da policia!.", Name);

                for (new i; i < MAX_PLAYERS; i++)
                {
                    if (IsPlayerConnected(i))
                    {
                        if (APlayerData[i][PlayerClass] == ClassPolice)
                        {
                            CopOnline = true;
                            SendClientMessage(i, 0xFFFFFFFF, Msg);
                        }
                    }
                }
                if (CopOnline == true)
                {
                    SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Existe policial online, aguarde...");
                }
                else
                {
                    Fine = GetPlayerWantedLevel(playerid) * DefaultFinePerStar;
                    RewardPlayer(playerid, -Fine, 0);
                    SetPlayerWantedLevel(playerid, 0);
                    format(Msg, sizeof(Msg), "{FF0000}Sua ficha foi limpa no valor de {FFFF00}$%i {FF0000}pelo motivo de nгo existe policial online!", Fine);
                    SendClientMessage(playerid, 0xFFFFFFFF, Msg);
                }
            }
            else
                SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usa /190 quando nгo estб sendo procurado!");
        }
        else
            return 0;
    }
    else
        return 0;

    return 1;
}
Reply
#3

yoki caso nao de o comando do comanfiss poste que nao deu ai te passo outro cmd aqui de 190
Reply
#4

ANNIHILATION me ajuda a mudar a camera de entrada la .....
Reply
#5

Quote:
Originally Posted by comanfiss
Посмотреть сообщение
ta aiii...

coloca esse comando na include PPC_PlayerCommands.inc

pawn Код:
COMMAND:190(playerid, params[])
{
    new bool:CopOnline = false, Msg[128], Name[24], Fine;
    SendAdminText(playerid, "/190", params);
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerClass] != ClassPolice) {
            if (GetPlayerWantedLevel(playerid) >= 1) {
                GetPlayerName(playerid, Name, sizeof(Name));
                format(Msg, 128, "{00FF00}Jogador {FFFF00}%s{00FF00} estб precisando da policia!.", Name);

                for (new i; i < MAX_PLAYERS; i++)
                {
                    if (IsPlayerConnected(i))
                    {
                        if (APlayerData[i][PlayerClass] == ClassPolice)
                        {
                            CopOnline = true;
                            SendClientMessage(i, 0xFFFFFFFF, Msg);
                        }
                    }
                }
                if (CopOnline == true)
                {
                    SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Existe policial online, aguarde...");
                }
                else
                {
                    Fine = GetPlayerWantedLevel(playerid) * DefaultFinePerStar;
                    RewardPlayer(playerid, -Fine, 0);
                    SetPlayerWantedLevel(playerid, 0);
                    format(Msg, sizeof(Msg), "{FF0000}Sua ficha foi limpa no valor de {FFFF00}$%i {FF0000}pelo motivo de nгo existe policial online!", Fine);
                    SendClientMessage(playerid, 0xFFFFFFFF, Msg);
                }
            }
            else
                SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usa /190 quando nгo estб sendo procurado!");
        }
        else
            return 0;
    }
    else
        return 0;

    return 1;
}
esse comando so vai fucionar se o player for policial e estiver como procurado '-' o correto seria:

pawn Код:
COMMAND:190(playerid, params[])
{
    new bool:CopOnline = false, Msg[128], Name[24], Fine;
    SendAdminText(playerid, "/190", params);
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (GetPlayerWantedLevel(playerid) >= 1)
        {
            GetPlayerName(playerid, Name, sizeof(Name));
            format(Msg, 128, "{00FF00}Jogador {FFFF00}%s{00FF00} estб precisando da policia!.", Name);
            for (new i; i < MAX_PLAYERS; i++)
            {
                if (IsPlayerConnected(i))
                {
                    if (APlayerData[i][PlayerClass] == ClassPolice)
                    {
                        CopOnline = true;
                        SendClientMessage(i, 0xFFFFFFFF, Msg);
                    }
                }
                if (CopOnline == true)
                {
                    SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Existe policial online, aguarde...");
                }
                else
                {
                    Fine = GetPlayerWantedLevel(playerid) * DefaultFinePerStar;
                    RewardPlayer(playerid, -Fine, 0);
                    SetPlayerWantedLevel(playerid, 0);
                    format(Msg, sizeof(Msg), "{FF0000}Sua ficha foi limpa no valor de {FFFF00}$%i {FF0000}pelo motivo de nгo existe policial online!", Fine);
                    SendClientMessage(playerid, 0xFFFFFFFF, Msg);
                }
            }
            else
                SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usa /190 quando nгo estб sendo procurado!");
        }
        else
            return 0;
    }
    else
        return 0;

    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)