dcmd_kick(playerid,params[]) { new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,GREY,"USAGE: /kick <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,GREY,"Invalid ID"); format(str,sizeof(str),"%s has kicked %s",n,on); SendClientMessageToAll(LIGHTBLUE,str); Kick(id); return 1; }
dcmd_mute(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_SYN, "[Syntax:]{FFFFFF} /mute [playerid]");
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid == playerid)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You can not use this command on yourself!");
return 1;
}
if(PlayerInfo[giveplayerid][pMuted] == 0)
{
if(PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin])
{
format(string, sizeof(string), "%s just tried to /mute you.",GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_YELLOW, string);
SendClientMessageEx(playerid, COLOR_WHITE, "You can't perform this action on an equal or higher level administrator.");
return 1;
}
PlayerInfo[giveplayerid][pMuted] = 1;
format(string, sizeof(string), "AdmCmd: %s was silenced by %s.",GetPlayerNameEx(giveplayerid),GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED,string,2);
}
else
{
PlayerInfo[giveplayerid][pMuted] = 0;
format(string, sizeof(string), "AdmCmd: %s was unsilenced by %s.",GetPlayerNameEx(giveplayerid),GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED,string,2);
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}
dcmd_slap(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >=2)
{
new string[128], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_SYN, "[Syntax:]{FFFFFF} /slap [playerid]");
new Float:shealth;
new Float:slx, Float:sly, Float:slz;
if(IsPlayerConnected(giveplayerid))
{
GetPlayerHealth(giveplayerid, shealth);
SetPlayerHealth(giveplayerid, shealth-5);
GetPlayerPos(giveplayerid, slx, sly, slz);
SetPlayerPos(giveplayerid, slx, sly, slz+5);
PlayerPlaySound(giveplayerid, 1130, slx, sly, slz+5);
format(string, sizeof(string), "AdmCmd: %s was slapped by %s",GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED,string,2);
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}
C:\DOCUME~1\mrich\Bureau\tyr\ZOMBIE~1\FILTER~1\admin.pwn(287) : warning 203: symbol is never used: "dcmd_mute" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
i tested Mute CMD there are 1 Warning:
Код:
C:\DOCUME~1\mrich\Bureau\tyr\ZOMBIE~1\FILTER~1\admin.pwn(287) : warning 203: symbol is never used: "dcmd_mute" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. |