[AVISO]OLHEM!!
#7

pawn Код:
if(strcmp(cmd, "/particular", true) == 0 || strcmp(cmd, "/par", true) == 0)
{
    if(gPlayerLogged[playerid] == 0)
        return SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo estб Logado!");

    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
        return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ID/Nome] [texto]");

    giveplayerid = ReturnUser(tmp);
    if (IsPlayerConnected(giveplayerid))
    {
        if (HidePM[giveplayerid] == 1)
            return SendClientMessage(playerid, COLOR_GRAD1, "Este jogador tem as particulares bloqueadas !");

        if(giveplayerid != INVALID_PLAYER_ID)
        {
            if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 0)
            {
                if(PlayerInfo[giveplayerid][pAdmin] == 0 && PlayerInfo[giveplayerid][pHelper] == 1)
                    return SendClientMessage(playerid, COLOR_GRAD1, "Vocк apenas pode mandar /par para um Administrador ou Helper!");
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
                idx++;

            new offset = idx;
            new result[256];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
                return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ID/Nome] [texto]");

            if(PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0)
            {
                format(string, sizeof(string), "Jogador: %s (ID:%d) Enviou: %s", sendername, playerid, (result));
                SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                format(string, sizeof(string), "Particular Enviada para %s(ID:%d).",giveplayer,giveplayerid);
                SendClientMessage(playerid, COLOR_YELLOW, string);
                printf("Particular de %s para %s: %s", sendername,giveplayer,(result));
                return 1;
            }
            if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pHelper] <= 0)
            {
                format(string, sizeof(string), "Admin: %s (ID:%d) Enviou: %s", sendername, playerid, (result));
                SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                format(string, sizeof(string), "Particular Enviada para %s(ID:%d).",giveplayer,giveplayerid);
                SendClientMessage(playerid, COLOR_GREEN, string);
                printf("Particular de %s para %s: %s", sendername,giveplayer,(result));
                return 1;
            }
            if(PlayerInfo[playerid][pHelper] >= 1)
            {
                format(string, sizeof(string), "Helper: %s (ID:%d) Enviou: %s", sendername, playerid, (result));
                SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                format(string, sizeof(string), "Particular Enviada para %s(ID:%d).",giveplayer,giveplayerid);
                SendClientMessage(playerid, COLOR_GREEN, string);
                printf("Particular de %s para %s: %s", sendername,giveplayer,(result));
                return 1;
            }
        }
    }
    else
    {
        format(string, sizeof(string), "   %d nгo й um jogador ativo.", giveplayerid);
        SendClientMessage(playerid, COLOR_GRAD1, string);
    }
    return 1;
}
Reply


Messages In This Thread
[AVISO]OLHEM!! - by Fire_Hell - 15.10.2011, 02:40
Re: [ERRO]OLHEM!! - by DrTHE - 15.10.2011, 02:43
Re: [ERRO]OLHEM!! - by Fire_Hell - 15.10.2011, 02:43
Re: [AVISO]OLHEM!! - by rene20 - 15.10.2011, 02:45
Re: [AVISO]OLHEM!! - by Shelby - 15.10.2011, 02:49
Re: [AVISO]OLHEM!! - by Fire_Hell - 15.10.2011, 03:04
Re: [AVISO]OLHEM!! - by ViniBorn - 15.10.2011, 03:04

Forum Jump:


Users browsing this thread: 2 Guest(s)