dcmd_warn(playerid, params[]) { new warnID; if(PlayerInfo[playerid][AdminLevel] < 1) if(sscanf(params, "u", warnID))return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /warn [playerid]"); else { new String[22]; SetPVarInt(warnID, "Warned", GetPVarInt(playerid, "Warned")+1); format(String, sizeof(String), "ADMIN WARNING! [%i/5]", GetPVarInt(playerid, "Warned")); SendClientMessage(warnID, COLOR_RED, String); if(GetPVarInt(playerid, "Warned")>=5)Kick(warnID); } return 1; }
if(PlayerInfo[playerid][AdminLevel] < 1) return false
dcmd_warn(playerid, params[])
{
new warnID;
if(PlayerInfo[playerid][AdminLevel] > 1)
if(sscanf(params, "u", warnID))return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /warn [playerid]");
else
{
new String[22];
SetPVarInt(warnID, "Warned", GetPVarInt(playerid, "Warned")+1);
format(String, sizeof(String), "ADMIN WARNING! [%i/5]", GetPVarInt(playerid, "Warned"));
SendClientMessage(warnID, COLOR_RED, String);
if(GetPVarInt(playerid, "Warned")>=5)Kick(warnID);
}
return 1;
}
pawn Код:
|
dcmd_warn(playerid, params[])
{
new warnID;
if(PlayerInfo[playerid][AdminLevel] < 1) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
if(sscanf(params, "u", warnID))return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /warn [playerid]");
else
{
new String[22];
SetPVarInt(warnID, "Warned", GetPVarInt(playerid, "Warned")+1);
format(String, sizeof(String), "ADMIN WARNING! [%i/5]", GetPVarInt(playerid, "Warned"));
SendClientMessage(warnID, COLOR_RED, String);
if(GetPVarInt(playerid, "Warned")>=5) return Kick(warnID);
}
return 1;
}
pawn Код:
|
pawn Код:
|
if(PlayerInfo[playerid][AdminLevel] < 1) return 0