[Ajuda] Comando nao existe
#1

[I]Tenho um comando aqui que ele chama policia e tals , mas quando eu digito ele , ele da como comando inexistente , acho q deve ser problema de return mas , eai alguem me ajuda?

pawn Код:
COMMAND:190(playerid, params[])
{
    // Setup local variables
    new bool:CopOnline = false, Msg[128], Name[24], Fine;

    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/190", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerClass] == ClassPolice)
        {
            if (GetPlayerWantedLevel(playerid) >= 3)
            {
                // Get the player's name
                GetPlayerName(playerid, Name, sizeof(Name));
                // Preset the message that needs to be sent to cops
                format(Msg, 128, "{0000FF}Jogador {FFFFFF}%s{0000FF} estб precisando de algum policial!", Name);

                // Check if there is at least one cop online
                for (new i; i < MAX_PLAYERS; i++)
                {
                    // Check if this player is connected
                    if (IsPlayerConnected(i))
                    {
                        // Check if this player is cops
                        if (APlayerData[i][PlayerClass] == ClassPolice)
                        {
                            // Set the flag to indicate that at least one cop is online
                            CopOnline = true;
                            // Send the cop a message to inform him who needs fine
                            SendClientMessage(i, 0xFFFFFFFF, Msg);
                        }
                    }
                }

                // Check if there is at least one cop online
                if (CopOnline == true)
                {
                    // Let the player know that atleast one cop is online who can fine him
                    SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Existe policiais online, aguarde...");
                }
                else // No cop is online
                {

                    // Calculate the fine
                    Fine = GetPlayerWantedLevel(playerid) * DefaultFinePerStar;
                    // Let the wanted player pay the fine
                    RewardPlayer(playerid, -Fine, 0);

                    // Remove wanted level
                    SetPlayerWantedLevel(playerid, 0);

                    // Let the player know that he has been auto-fined
                    format(Msg, sizeof(Msg), "{0000FF}Sua ficha foi limpa no valor de {00FF00}R${FFFFFF}%i {0000FF}pelo motivo de nгo existir policial online", Fine);
                    SendClientMessage(playerid, 0xFFFFFFFF, Msg);
                }
            }
            else
                SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar /190 quando nгo estб sendo procurado!");
        }
        else
            return 0;
    }
    else
        return 0;

    // Let the server know that this was a valid command
    return 1;
} [/i]
Reply


Messages In This Thread
Comando nao existe - by Luucass - 15.04.2014, 21:39
Re: Comando nao existe - by Krisky_ - 15.04.2014, 21:46
Re: Comando nao existe - by Luucass - 15.04.2014, 23:11
Re: Comando nao existe - by Luucass - 16.04.2014, 12:13
Re: Comando nao existe - by Locky_ - 16.04.2014, 13:12
Re: Comando nao existe - by Luucass - 16.04.2014, 13:13
Re: Comando nao existe - by Locky_ - 16.04.2014, 13:46
Re: Comando nao existe - by Luucass - 16.04.2014, 13:49

Forum Jump:


Users browsing this thread: 1 Guest(s)