[Ajuda] /procurar bugado
#5

ussa assim
pawn Код:
if(strcmp(cmd, "/procurar", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
   
    format(file, sizeof(file), "scriptfiles/Contas/%s.ini", playerid);
    if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Recruta || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Rotam || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "pAdm01") == 1)
    {

        new tmp[256];
        tmp = strtok(cmdtext, idx);

        new plid;
        plid = strval(tmp);

        if(!strlen(tmp))
        {
            SendClientMessage(playerid, 0xFFD39BAA, "Use: /procurar [id] [motivo] ou /su [id] [motivo]");
            return 1;
        }
        if(IsPlayerConnected(plid))
        {
            new str[128];
            new giveplayer[MAX_PLAYER_NAME];
            new sendername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            GetPlayerName(plid, giveplayer, sizeof(giveplayer));

            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[100];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;

            format(str, sizeof(str), "{0099FF}[x]{CCCCFF} Vocк foi colocado na lista de procurados pelo Policial %s || Motivo: %s", sendername, (result));
            SendClientMessage(plid, 0xFFD39BAA, str);
            format(str, sizeof(str), "{0099FF}[x]{CCCCFF} O Jogador %s,  colocou %s na lista de procurados pelo motivo: %s!", playerid, giveplayer, (result));
            SendClientMessageToAll(0xFFD39BAA, str);

            new antes;
            antes=dini_Int(file, "Procurado");
            dini_IntSet(file, "Procurado", antes+1);
            SetPlayerWantedLevel(plid, GetPlayerWantedLevel(plid)+1);
            Procurados[plid]++;
            return 1;
        } else SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado no momento!");
    } else SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Vocк nгo pode usar esse comando!");
    return true;
}
Reply


Messages In This Thread
/procurar bugado - by Arthenry - 14.07.2012, 20:12
Re: /procurar bugado - by steeldark - 14.07.2012, 20:28
Re: /procurar bugado - by Miqueias Barros - 14.07.2012, 20:33
Re: /procurar bugado - by Arthenry - 14.07.2012, 20:51
Re: /procurar bugado - by Don_Speed - 14.07.2012, 20:58
Re: /procurar bugado - by steeldark - 14.07.2012, 21:31
Re: /procurar bugado - by Arthenry - 14.07.2012, 21:48
Re: /procurar bugado - by steeldark - 14.07.2012, 22:06
Re: /procurar bugado - by Arthenry - 14.07.2012, 22:12
Re: /procurar bugado - by steeldark - 14.07.2012, 22:24

Forum Jump:


Users browsing this thread: 1 Guest(s)