Jump to content
  • 0

Chestiune de /kicik,/fakeban,/ban


Question

Posted

Nu stiu cum sa fac ca atunci cand cineva vrea sai dea kick/ban unui admin mai mare sa nu-l lase,nush cumsa fac.

[pawn]if(strcmp(cmd, "/kick", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "UTILIZEAZA: /kick [iDJucator/PARTEdinNUME] [motiv]");

return 1;

}

giveplayerid = ReturnUser(tmp);

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

{

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[900];

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, "UTILIZEAZA: /kick [iDJucator/PARTEdinNUME] [motiv]");

return 1;

}

new year, month,day;

getdate(year, month, day);

format(string, sizeof(string), "AdmCmd: %s a primit kick de la %s, Motiv: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);

KickLog(string);

format(string, sizeof(string), "AdmCmd: %s a primit kick de la %s, Motiv: %s", giveplayer, sendername, (result));

SendClientMessageToAll(COLOR_LIGHTRED, string);

Kick(giveplayerid);

return 1;

}

}

}

else

{

format(string, sizeof(string), "  %d nu este un jucator activ.", giveplayerid);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

3 answers to this question

Recommended Posts

Posted
if (PlayerInfo[playerid][pAdmin]  < PlayerInfo[giveplayerid][pAdmin])
{
        SendClientMessage(playerid, COLOR_GRAD2, "   Nu poti da kick unui admin mai mare!");
	return 1;
}

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.