dcmd_warn(playerid, params[])
{
new targetid, pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME], reason[64], string[144];
if(IsPlayerAdmin(playerid)||PlayerInfo[playerid][Level]>=2)
{
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "{00FF00}[USAGE] {FFFFFF}/warn [PlayerID] [Reason]");
GetPlayerName(playerid, aName, sizeof(aName));
GetPlayerName(targetid, pName, sizeof(pName));
if(IsPlayerConnected(targetid))
{
++PlayerInfo[targetid][Wanted];
format(string, sizeof(string), "{B0B0B0}[SERVER]{FFFFFF} Administrator {F52887}%s{FFFFFF} has warned {DFDFDF}%s{FFFFFF} Reason: {DFDFDF}%s", aName, pName, reason, PlayerInfo[targetid][Warned]);
SendClientMessageToAll(COLOR_WHITE, string);
format(string, sizeof(string), "{FFFF00}Warnings{FFFFFF}: {DFDFDF}%i{FFFFFF}/{FF0000}3", PlayerInfo[targetid][Warned]);
SendClientMessageToAll(COLOR_WHITE, string);
}
if(PlayerInfo[targetid][Warned]==3)
{
Kick(targetid);
}
}
else return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[ERROR] {FFFFFF}You don't have the appropried administration level to use this command !");
return 1;
}
dcmd_warn(playerid, params[])
{
new targetid, pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME], reason[64], string[144];
if(IsPlayerAdmin(playerid)||PlayerInfo[playerid][Level]>=2)
{
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "{00FF00}[USAGE] {FFFFFF}/warn [PlayerID] [Reason]");
GetPlayerName(playerid, aName, sizeof(aName));
GetPlayerName(targetid, pName, sizeof(pName));
if(IsPlayerConnected(targetid)) || if(PlayerInfo[targetid][Warned] ==> 0)
{
++PlayerInfo[targetid][Wanted];
format(string, sizeof(string), "{B0B0B0}[SERVER]{FFFFFF} Administrator {F52887}%s{FFFFFF} has warned {DFDFDF}%s{FFFFFF} Reason: {DFDFDF}%s", aName, pName, reason, PlayerInfo[targetid][Warned]);
SendClientMessageToAll(COLOR_WHITE, string);
format(string, sizeof(string), "{FFFF00}Warnings{FFFFFF}: {DFDFDF}%i{FFFFFF}/{FF0000}3", PlayerInfo[targetid][Warned]);
SendClientMessageToAll(COLOR_WHITE, string);
}
if(PlayerInfo[targetid][Warned] ==> 3)
{
Kick(targetid);
}
}
else return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[ERROR] {FFFFFF}You don't have the appropried administration level to use this command !");
return 1;
}
++PlayerInfo[targetid][Wanted]; |
format(string, sizeof(string), "{FFFF00}Warnings{FFFFFF}: {DFDFDF}%i{FFFFFF}/{FF0000}3", PlayerInfo[targetid][Warned]); |
dcmd_warn(playerid, params[])
{
new targetid, pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME], reason[64], string[144];
if(IsPlayerAdmin(playerid)||PlayerInfo[playerid][Level]>=2)
{
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "{00FF00}[USAGE] {FFFFFF}/warn [PlayerID] [Reason]");
GetPlayerName(playerid, aName, sizeof(aName));
GetPlayerName(targetid, pName, sizeof(pName));
if(IsPlayerConnected(targetid))|| if(PlayerInfo[targetid][Warned]==0)
{
++PlayerInfo[targetid][Warned];
format(string, sizeof(string), "{B0B0B0}[SERVER]{FFFFFF} Administrator {F52887}%s{FFFFFF} has warned {DFDFDF}%s{FFFFFF} Reason: {DFDFDF}%s", aName, pName, reason, PlayerInfo[targetid][Warned]);
SendClientMessageToAll(COLOR_WHITE, string);
format(string, sizeof(string), "{FFFF00}Warnings{FFFFFF}: {DFDFDF}%i{FFFFFF}/{FF0000}3", PlayerInfo[targetid][Warned]);
SendClientMessageToAll(COLOR_WHITE, string);
}
if(PlayerInfo[targetid][Warned]==3)
{
Kick(targetid);
}
}
else return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[ERROR] {FFFFFF}You don't have the appropried administration level to use this command !");
return 1;
}