[AJUDA]-PLAYER MANDAR /PAR PRA ADMIN!!!
#1

Aqui, esse /par sу admins pode usar, alguem tem um que players pode usar mas sу pra admins?

Admins pra player
Player pra admin

e player pra player NAO!

pawn Код:
if(strcmp(cmd, "/particular", true) == 0 || strcmp(cmd, "/par", true) == 0)
    {
     if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "Voce nгo e admin!");
                return 1;
            }
            if(admtrampando[playerid] < 1)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ id ] [texto]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if(HidePM[giveplayerid] > 0)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "O jogador bloqueou PMs!");
                        return 1;
                    }
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    if(giveplayerid == playerid)
                    {
                        format(string, sizeof(string), "* %s mutters somthing.", sendername);
                        ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    }
                    new length = strlen(cmdtext);
                    while ((idx < length) && (cmdtext[idx] <= ' '))
                    {
                        idx++;
                    }
                    new offset = idx;
                    new result[64];
                    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                    {
                        result[idx - offset] = cmdtext[idx];
                        idx++;
                    }
                    result[idx - offset] = EOS;
                    if(!strlen(result))
                    {
                        SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ id ] [whisper text]");
                        return 1;
                    }
                    format(string, sizeof(string), "%s(ID: %d) particular: %s", sendername, playerid, (result));
                    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                    format(string, sizeof(string), "PM enviada para %s(ID: %d).", giveplayer, giveplayerid);
                    SendClientMessage(playerid,  COLOR_YELLOW, string);
                    SBizzInfo[2][sbTill] += txtcost / 2;
                    ExtortionSBiz(2, txtcost / 2);
                    return 1;
                }
            }
            else
            {
                    format(string, sizeof(string), "   %d estб off-line.", giveplayerid);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
     return 1;
    }
VLWZAO!
Reply
#2

Eu tinha o code mas acho que excluir! =X
Reply
#3

Uma parte de vocкs sгo tensos, acham que todo mundo programa nesse gamemode prostituido e quer que a gente poste aqui cуdigos dele.
Se parassem pra estudar fariam coisa muito melhor que o God Father.
Querem moleza sentem na gelatina.
Reply
#4

pawn Код:
if(strcmp(cmd, "/particular", true) == 0 || strcmp(cmd, "/par", true) == 0)
    {
     if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[giveplayerid][pAdmin] < 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "Voce sу pode mandar /par pra um administrador");
                return 1;
            }
            if(admtrampando[playerid] < 1)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ id ] [texto]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if(HidePM[giveplayerid] > 0)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "O jogador bloqueou PMs!");
                        return 1;
                    }
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    if(giveplayerid == playerid)
                    {
                        format(string, sizeof(string), "* %s mutters somthing.", sendername);
                        ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    }
                    new length = strlen(cmdtext);
                    while ((idx < length) && (cmdtext[idx] <= ' '))
                    {
                        idx++;
                    }
                    new offset = idx;
                    new result[64];
                    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                    {
                        result[idx - offset] = cmdtext[idx];
                        idx++;
                    }
                    result[idx - offset] = EOS;
                    if(!strlen(result))
                    {
                        SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ id ] [whisper text]");
                        return 1;
                    }
                    format(string, sizeof(string), "%s(ID: %d) particular: %s", sendername, playerid, (result));
                    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                    format(string, sizeof(string), "PM enviada para %s(ID: %d).", giveplayer, giveplayerid);
                    SendClientMessage(playerid,  COLOR_YELLOW, string);
                    SBizzInfo[2][sbTill] += txtcost / 2;
                    ExtortionSBiz(2, txtcost / 2);
                    return 1;
                }
            }
            else
            {
                    format(string, sizeof(string), "   %d estб off-line.", giveplayerid);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
     return 1;
    }
Tenta ai, ja vou logo avisando, fiz com pressa e nгo testei...
Reply
#5

Mas esse os players podem mandar sу pra admins?
Reply
#6

Quote:
Originally Posted by cynic
Посмотреть сообщение
Uma parte de vocкs sгo tensos, acham que todo mundo programa nesse gamemode prostituido e quer que a gente poste aqui cуdigos dele.
Se parassem pra estudar fariam coisa muito melhor que o God Father.
Querem moleza sentem na gelatina.
Exatamente o que eu Ia Falar

Larguem de GF
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)