[Ajuda] Setagem
#3

Quote:
Originally Posted by johntrybescripter
Посмотреть сообщение
pawn Код:
dcmd_setmototaxi(playerid,params[])
{
    if(Player[playerid][pAdmin] < 4 && Player[playerid][pMotoTaxi] < 3)
        return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo!");

    new tmp[256],Index;
    tmp = strtok(params,Index);
    new id;
    new tmp2[256]; tmp2 = strtok(params,Index);

    if(!strlen(tmp)||!strlen(tmp2)||!IsNumeric(tmp2)||!(strval(tmp2) >= 0 && strval(tmp2) <= 3))
        return SendClientMessage(playerid,AzulEscuro,"ERRO: /SetMotoTaxi |ID| |1 - 3|");

    if(!IsNumeric(tmp))
        id = ReturnPlayerID(tmp);
    else
    id = strval(tmp);

    if(!IsPlayerConnected(id))
    {
        new file[256];
        format(file,256,CONTAS,tmp);
        if(DOF2_FileExists(file))
        {
            DOF2_SetInt(file,"MotoTaxi", strval(tmp2));

            new string[128];

            if(strval(tmp2) == 1) {
                format(string, sizeof(string), "{6495ED}ADMCmd: Vocк setou a conta de %s para Moto Taxi.", tmp);
                SendClientMessage(playerid, COR_PRINCIPAL,string);

                format(string, 128,"{6495ED}ADMCmd: O %s %s setou %s de Moto Taxi.", AccountName(playerid), getPName(playerid), tmp);
                SendMessageToAdminsEx(string);

                format(string, sizeof(string), "%s setou %s de Moto Taxi.", getPName(playerid), tmp);
                WriteLog("setMotoTaxi", string);
            }
            else {
                format(string, sizeof(string), "{6495ED}ADMCmd: Vocк retirou o Moto Taxi da conta %s.", tmp);
                SendClientMessage(playerid, COR_PRINCIPAL,string);

                format(string, 128,"{6495ED}ADMCmd: O %s %s retirou o Moto Taxi de %s.", AccountName(playerid), getPName(playerid), tmp);
                SendMessageToAdminsEx(string);

                format(string, sizeof(string), "%s retirou o Moto Taxi de %s.", getPName(playerid), tmp);
                WriteLog("setMotoTaxi", string);
            }
            return 1;
        }
        else
        return SendClientMessage(playerid,COR_ERRO,"ERRO: Jogador nгo encontrado!");
    }
    else
    {
        if(Player[id][pLogged] == false)
            return SendClientMessage(playerid,COR_ERRO,"ERRO: O jogador selecionado nгo estб logado.");

        new string[128];
        Player[id][pMotoTaxi] = strval(tmp2);
     
        if(strval(tmp2) > 3 || strval(tmp2) < 0) return SendClientMessage(playerid, -1, "Niveis de 0 ate 3");  
        if(strval(tmp2) == 1) {
              format(string, 128,"INFO» O %s %s Mudou seu level de  Moto-Taxi para 1.",getPName(playerid));
            SendClientMessage(id,COR_VERDECLARO,string);
            format(string, 128,"LOG» Vocк setou %s (id: %d) deMoto-Taxi Level 1.",getPName(id), id);
            SendClientMessage(playerid,COR_PRINCIPAL,string);
            format(string, 128,"{00688B}LOG» O %s %s setou %s de Moto-Taxi Level 1.", getPName(playerid), getPName(id));
            SendMessageToAdminsEx(string);
            format(string, sizeof(string), "{00688B}%s setou %s de Moto-Taxi.", getPName(playerid), getPName(id));
            WriteLog("setMotoTaxi", string);
        }
        if(strval(tmp2) == 2) {
              format(string, 128,"INFO» O %s %s Mudou seu level de  Moto-Taxi para 2.",getPName(playerid));
            SendClientMessage(id,COR_VERDECLARO,string);
            format(string, 128,"LOG» Vocк setou %s (id: %d) deMoto-Taxi Level 2.",getPName(id), id);
            SendClientMessage(playerid,COR_PRINCIPAL,string);
            format(string, 128,"{00688B}LOG» O %s %s setou %s de Moto-Taxi Level 2.", getPName(playerid), getPName(id));
            SendMessageToAdminsEx(string);
            format(string, sizeof(string), "{00688B}%s setou %s de Moto-Taxi.", getPName(playerid), getPName(id));
            WriteLog("setMotoTaxi", string);
        }
        if(strval(tmp2) == 3) {
              format(string, 128,"INFO» O %s %s Mudou seu level de  Moto-Taxi para 3.",getPName(playerid));
            SendClientMessage(id,COR_VERDECLARO,string);
            format(string, 128,"LOG» Vocк setou %s (id: %d) deMoto-Taxi Level 3.",getPName(id), id);
            SendClientMessage(playerid,COR_PRINCIPAL,string);
            format(string, 128,"{00688B}LOG» O %s %s setou %s de Moto-Taxi Level 3.", getPName(playerid), getPName(id));
            SendMessageToAdminsEx(string);
            format(string, sizeof(string), "{00688B}%s setou %s de Moto-Taxi.", getPName(playerid), getPName(id));
            WriteLog("setMotoTaxi", string);
        }
       if(strval(tmp2) == 0)  
              format(string, 128,"INFO» O %s %s Mudou seu level de  Moto-Taxi para 0.",getPName(playerid));
            SendClientMessage(id,COR_VERDECLARO,string);
            format(string, 128,"LOG» Vocк retirou %s (id: %d) deMoto-Taxi Level 0.",getPName(id), id);
            SendClientMessage(playerid,COR_PRINCIPAL,string);
            format(string, 128,"{00688B}LOG» O %s %s retirou %s de Moto-Taxi Level 0.", getPName(playerid), getPName(id));
            SendMessageToAdminsEx(string);
            format(string, sizeof(string), "{00688B}%s retirou o %s de Moto-Taxi.", getPName(playerid), getPName(id));
            WriteLog("setMotoTaxi", string);
        }
   

        SalvarPlayer(id);

    }
    return 1;
}
tenta assim
Quote:

C:\Users\Gean Analuiza Miguel\Desktop\World Of Facзoes - RJ\gamemodes\FR.pwn(24437) : warning 217: loose indentation
C:\Users\Gean Analuiza Miguel\Desktop\World Of Facзoes - RJ\gamemodes\FR.pwn(24447) : warning 217: loose indentation
C:\Users\Gean Analuiza Miguel\Desktop\World Of Facзoes - RJ\gamemodes\FR.pwn(24457) : warning 217: loose indentation
C:\Users\Gean Analuiza Miguel\Desktop\World Of Facзoes - RJ\gamemodes\FR.pwn(24465) : warning 217: loose indentation
C:\Users\Gean Analuiza Miguel\Desktop\World Of Facзoes - RJ\gamemodes\FR.pwn(24467) : warning 217: loose indentation
C:\Users\Gean Analuiza Miguel\Desktop\World Of Facзoes - RJ\gamemodes\FR.pwn(24477) : warning 217: loose indentation
C:\Users\Gean Analuiza Miguel\Desktop\World Of Facзoes - RJ\gamemodes\FR.pwn(24479) : warning 209: function "dcmd_setmototaxi" should return a value
C:\Users\Gean Analuiza Miguel\Desktop\World Of Facзoes - RJ\gamemodes\FR.pwn(24480) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Pow botei mas deu esse erro ai.
Reply


Messages In This Thread
COMANDO BUGADO. - by henriqueTL - 03.03.2017, 20:13
Re: Setagem - by johntrybescripter - 03.03.2017, 20:50
Re: Setagem - by henriqueTL - 04.03.2017, 14:47
Re: Setagem - by JhefTFJ - 04.03.2017, 16:04
Re: Setagem - by henriqueTL - 04.03.2017, 16:11

Forum Jump:


Users browsing this thread: 3 Guest(s)