12.04.2013, 15:02
pawn Код:
CMD:ban(playerid, params[])
{
new targetid, reason[64], string[128], string3[128], string2[MAX_PLAYER_NAME];
if(pInfo[playerid][pAdmin] == 0) return SCM(playerid, COLOR_RED, "You are not admin or you're not authorized.");
if(sscanf(params, "us[64]", targetid, reason)) return SCM(playerid, -1, "{32CD32}Use:{FFFFFF} /ban (playerid) (reason).");
if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_RED, "Player is not connected.");
format(string3, sizeof(string3), "{FF8C00}Admin {DC143C}%s (%d) {FF8C00}has banned {DC143C}%s (%d) {FF8C00}(reason: {DC143C}%s{FF8C00}).", GetName(playerid), playerid, GetName(params[0]), targetid, reason);
SCMToAll(-1, string3);
BanEx(targetid);
return 1;
}
CMD:kick(playerid, params[])
{
new targetid, reason[64], string[128];
if(pInfo[playerid][pAdmin] == 0) return SCM(playerid, COLOR_RED, "You are not admin or you're not authorized.");
if(sscanf(params, "us[64]", targetid, reason)) return SCM(playerid, -1, "{32CD32}Use:{FFFFFF} /kick (playerid) (reason).");
if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_RED, "Player is not connected.");
format(string, sizeof(string), "{FF8C00}Admin {DC143C}%s (%d) {FF8C00}has kicked {DC143C}%s (%d) {FF8C00}(reason: {DC143C}%s{FF8C00}).", GetName(playerid), playerid, GetName(targetid), targetid, reason);
SCMToAll(-1, string);
KickEx(targetid);
return 1;
}
їCуmo lo arreglo? D: