Jump to content

Question

Posted

Salut inca odata pe toti , as vrea sa stiu daca se poate sa setez ca adminii de grad 1, 2,3si 4 sa le pun accesul la ban + kick , momentan nu merge decat la owner si la 1337 !

Si la fel la helper 3-4 sa poata da kick nu doar ban !

Multam !!

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

3 answers to this question

Recommended Posts

Posted

Cauti comanda si modifici if( PlayerData [ playerid ] [ pAdmin ] < 1337 ) sau cum ai tu acolo. In loc de 1337 pui ce vrei tu :P

communitylogosml.png

94.23.120.101:7778

Posted

PawnFox" post="131924" timestamp="1360101234"]

Cauti comanda si modifici if( PlayerData [ playerid ] [ pAdmin ] < 1337 ) sau cum ai tu acolo. In loc de 1337 pui ce vrei tu :P

Deci asta e comanda mea de ban : [pawn]if(strcmp(cmd, "/ban", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{B580FE}Foloseste: {FFFFFF} /ban [playerid/PartOfName] [reason]");

return 1;

}

giveplayerid = ReturnUser(tmp);

            if(PlayerBanned[playerid] == -1)//report timer

            {

            SendClientMessage(playerid,COLOR_WHITE,"Poti da /ban doar o data la 5 minute!");

            return 1;

            }

            PlayerBanned[playerid] = -1;

            SetTimerEx("ResetBan", 300000, 0, "d", playerid);

if (PlayerInfo[playerid][pAdmin] >= 1337)

{

    if(IsPlayerConnected(giveplayerid))

    {

        if(giveplayerid != INVALID_PLAYER_ID)

        {

    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

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, "{B580FE}Foloseste: {FFFFFF} /ban [playerid/PartOfName] [reason]");

return 1;

}

if(PlayerInfo[giveplayerid][pAdmin] >= 1338)

                        {

                SendClientMessage(playerid,COLOR_GREY,"That player can not be banned");

                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

                            GetPlayerName(playerid, sendername, sizeof(sendername));

                  format(string, 128, "AdmWarning: %s incearca comanda /ban pe un admin", sendername);

                  ABroadCast(COLOR_YELLOW,string,1);

                  return 1;

            }

new year, month,day;

getdate(year, month, day);

format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);

BanLog(string);

format(string, sizeof(string), "[ban]: %s was banned by %s, reason: %s", giveplayer, sendername, (result));

SendClientMessageToAll(COLOR_LIGHTRED, string);

PlayerInfo[giveplayerid][pLocked] = 1;

new plrIP[16];

GetPlayerIp(giveplayerid,plrIP, sizeof(plrIP));

    SendClientMessage(giveplayerid,COLOR_DBLUE,"|___________[bAN INFO]___________|");

            format(string, sizeof(string), "Numele tau este: %s.",giveplayer);

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        format(string, sizeof(string), "IP-ul tau este: %s.",plrIP);

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        format(string, sizeof(string), "Ai fost banat de: %s.",sendername);

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        format(string, sizeof(string), "Ai fost banat pentru urmatorul motiv: %s.",(result));

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        format(string, sizeof(string), "Ai fost banat pe data de: %d/%d/%d (Ziua-Luna-Anul)",day,month,year);

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        SendClientMessage(giveplayerid,COLOR_DBLUE,"|___________[bAN INFO]___________|");

                        SendClientMessage(giveplayerid,COLOR_LIGHTRED,"[bAN INFO]: Poti face o cerere de unban pe forumul nostru.Forumul este www.PlayINFERNO.net .Succes !");

                        SendClientMessage(giveplayerid,COLOR_WHITE,"[HINT]: Te sfatuim sa faci o poza la aceste informatii,si sa o postezi cand faci cerere unban.Apasa F8 pentru a face poza !");

Ban(giveplayerid);

return 1;

}

}//not connected

}

else

{

format(string, sizeof(string), "  %d is not an active player.", giveplayerid);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}

[/pawn]

sa adaug asa ? [pawn]if (PlayerInfo[playerid][pAdmin] >= 4)[/pawn]

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Posted

uite aici trebuie sa modifici

[pawn]

if(strcmp(cmd, "/ban", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{B580FE}Foloseste: {FFFFFF} /ban [playerid/PartOfName] [reason]");

return 1;

}

giveplayerid = ReturnUser(tmp);

            if(PlayerBanned[playerid] == -1)//report timer

            {

            SendClientMessage(playerid,COLOR_WHITE,"Poti da /ban doar o data la 5 minute!");

            return 1;

            }

            PlayerBanned[playerid] = -1;

            SetTimerEx("ResetBan", 300000, 0, "d", playerid);

if (PlayerInfo[playerid][pAdmin] >= 1337)

{

    if(IsPlayerConnected(giveplayerid))

    {

        if(giveplayerid != INVALID_PLAYER_ID)

        {

    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

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, "{B580FE}Foloseste: {FFFFFF} /ban [playerid/PartOfName] [reason]");

return 1;

}

-----------------------------------------> if(PlayerInfo[giveplayerid][pAdmin] >= 1338)

                        {

                SendClientMessage(playerid,COLOR_GREY,"That player can not be banned");

                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

                            GetPlayerName(playerid, sendername, sizeof(sendername));

                  format(string, 128, "AdmWarning: %s incearca comanda /ban pe un admin", sendername);

                  ABroadCast(COLOR_YELLOW,string,1);

                  return 1;

            }

new year, month,day;

getdate(year, month, day);

format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);

BanLog(string);

format(string, sizeof(string), "[ban]: %s was banned by %s, reason: %s", giveplayer, sendername, (result));

SendClientMessageToAll(COLOR_LIGHTRED, string);

PlayerInfo[giveplayerid][pLocked] = 1;

new plrIP[16];

GetPlayerIp(giveplayerid,plrIP, sizeof(plrIP));

    SendClientMessage(giveplayerid,COLOR_DBLUE,"|___________[bAN INFO]___________|");

            format(string, sizeof(string), "Numele tau este: %s.",giveplayer);

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        format(string, sizeof(string), "IP-ul tau este: %s.",plrIP);

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        format(string, sizeof(string), "Ai fost banat de: %s.",sendername);

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        format(string, sizeof(string), "Ai fost banat pentru urmatorul motiv: %s.",(result));

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        format(string, sizeof(string), "Ai fost banat pe data de: %d/%d/%d (Ziua-Luna-Anul)",day,month,year);

                        SendClientMessage(giveplayerid, COLOR_WHITE, string);

                        SendClientMessage(giveplayerid,COLOR_DBLUE,"|___________[bAN INFO]___________|");

                        SendClientMessage(giveplayerid,COLOR_LIGHTRED,"[bAN INFO]: Poti face o cerere de unban pe forumul nostru.Forumul este www.PlayINFERNO.net .Succes !");

                        SendClientMessage(giveplayerid,COLOR_WHITE,"[HINT]: Te sfatuim sa faci o poza la aceste informatii,si sa o postezi cand faci cerere unban.Apasa F8 pentru a face poza !");

Ban(giveplayerid);

return 1;

}

}//not connected

}

else

{

format(string, sizeof(string), "  %d is not an active player.", giveplayerid);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}

[/pawn]

in loc de 1338 pui ce admin vrei tu 1, 2 sau 3

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.