pawn Код:
if(strcmp(cmd, "/akill", true) == 0) {
if(PlayerInfo[playerid][Level] >= 1) {
new player1, tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, red, "USAGE: /akill [playerid]");
return 1; }
player1 = strval(tmp);
if(IsPlayerConnected(player1)) {
CMDMessageToAdmins(playerid,"AKILL");
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
format(string,256,"Administrator %s has killed you",adminname); SendClientMessage(player1,blue,string);
format(string,256,"You have killed %s",playername); SendClientMessage(playerid,blue,string);
SetPlayerHealth(player1,0.0);
return 1;
} else {
SendClientMessage(playerid, red, "Player is not connected");
return 1; }
} else {
SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); }
return 1; }
maybe u search his ?? o_0
here is the mute command:
pawn Код:
if(strcmp(cmd, "/mute", true) == 0) {
if(PlayerInfo[playerid][Level] >= 2) {
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, red, "USAGE: /mute [playerid] [reason]");
return 1; }
new player1;
player1 = strval(tmp);
if(!IsPlayerConnected(player1) || player1 == INVALID_PLAYER_ID || (PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel])) {
SendClientMessage(playerid,red,"ERROR: Player is not connected or is yourself");
return 1; }
tmp = strtok(cmdtext, idx);
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
CMDMessageToAdmins(playerid,"MUTE");
PlayerPlaySound(player1,1057,0.0,0.0,0.0); PlayerInfo[player1][Muted] = 1; PlayerInfo[player1][MuteWarnings] = 0;
format(string,256,"You have been muted by Administrator %s [reason: %s] ",adminname,cmdtext[8]); SendClientMessage(player1,red,string);
format(string,256,"You have muted %s [reason: %s] ",playername,cmdtext[8]); SendClientMessage(playerid,blue,string);
} else {
SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); }
return 1; }
and here is the unmute command:
pawn Код:
if(strcmp(cmd, "/unmute", true) == 0) {
if(PlayerInfo[playerid][Level] >= 2) {
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, red, "USAGE: /unmute [playerid] [reason]");
return 1; }
new player1;
player1 = strval(tmp);
if(!IsPlayerConnected(player1) || player1 == INVALID_PLAYER_ID ) {
SendClientMessage(playerid,red,"ERROR: Player is not connected or is yourself");
return 1; }
tmp = strtok(cmdtext, idx);
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
CMDMessageToAdmins(playerid,"UNMUTE");
PlayerPlaySound(player1,1057,0.0,0.0,0.0); PlayerInfo[player1][Muted] = 0; PlayerInfo[player1][MuteWarnings] = 0;
format(string,256,"You have been unmuted by Administrator %s",adminname); SendClientMessage(player1,red,string);
format(string,256,"You have unmuted %s",playername); SendClientMessage(playerid,blue,string);
} else {
SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); }
return 1; }
and here is the /warn command:
pawn Код:
if(strcmp(cmd, "/warn", true) == 0) {
if(PlayerInfo[playerid][Level] >= 2) {
new tmp[256]; new str[256]; new pname[256]; new aname[256]; new tmp2[256];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, red, "USAGE: /warn [PlayerID] [Reason]");
return 1; }
new warned;
warned = strval(tmp);
if(!IsPlayerConnected(warned) || warned == INVALID_PLAYER_ID || (PlayerInfo[warned][Level] == ServerInfo[MaxAdminLevel]) || (warned == playerid)) {
SendClientMessage(playerid,red,"ERROR: Player is not connected or is yourself");
return 1; }
tmp = strtok(cmdtext, idx);
CMDMessageToAdmins(playerid,"WARN");
if(PlayerInfo[warned][Warnings] == 0) {
PlayerInfo[warned][Warnings]+=1;
GetPlayerName(warned, pname, sizeof (str)); GetPlayerName(playerid, aname, sizeof (str));
format(str, sizeof (str), "***Administrator %s has given %s a warning [Reason: %s] [1/3 Warnings]***", aname, pname, cmdtext[8]);
SendClientMessageToAll(yellow, str);
return 1; }
else if(PlayerInfo[warned][Warnings] == 1) {
GetPlayerName(warned, pname, sizeof (str)); GetPlayerName(playerid, aname, sizeof (str));
format(str, sizeof (str), "***Administrator %s has given %s a warning [Reason: %s] [2/3 Warnings]***", aname, pname, cmdtext[8]);
SendClientMessageToAll(yellow, str);
PlayerInfo[warned][Warnings]+=1;
return 1; }
else if(PlayerInfo[warned][Warnings] == 2) {
GetPlayerName(warned, pname, sizeof (str)); GetPlayerName(playerid, aname, sizeof (str));
format(str, sizeof (str), "***Administrator %s has Kicked %s [Reason: %s] [3/3 Warnings]***", aname, pname, cmdtext[8]);
SendClientMessageToAll(grey, str);
SaveToFile("KickLog",str); Kick(warned);
return 1; }
} else {
SendClientMessage(playerid,red,"ERROR: You need to be level 2 to use this command"); }
return 1; }
there u are fell free to change the words if u want and if u need help more just send me PM am alwaus happly to help some one !
Good LUCK !