28.06.2016, 07:32
tell me how admins cannot attack admins with admin powers? let me show you an admin command
PHP код:
COMMAND:hog(playerid, params[])
{
new TargetID, string[256];
if (PlayerInfo[playerid][pAdminlevel] > 0)
{
if(sscanf(params, "u", TargetID))
{
SendClientMessage(playerid, COLOR_ERROR, "USAGE: /hog (Name/ID)");
return 1;
}
if(!IsPlayerConnected(TargetID) || TargetID == INVALID_PLAYER_ID)
{
SendClientMessage(playerid, COLOR_ERROR, "That Player Is Not Connected.");
return 1;
}
if(IsPlayerNPC(TargetID))
{
SendClientMessage(playerid,COLOR_ERROR,"You Cannot Kill a BOT With Hand Of God.");
return 1;
}
if(PlayerInfo[TargetID][pSpawned] == 0)
{
SendClientMessage(playerid,COLOR_ERROR,"Player Is Not Spawned");
return 1;
}
PlayerInfo[TargetID][pCustomDeath] = WEAPON_GOD;
SetPlayerHealth(TargetID, 0);
SetPlayerScore(playerid,GetPlayerScore(playerid) - 1);
SendDeathMessage(INVALID_PLAYER_ID, TargetID, 40);
format(string, sizeof(string), "%s (%i) Died By The Hand Of God.",PlayerInfo[TargetID][pName],TargetID);
SendClientMessageToAll(COLOR_DEATH, string);
SendGameText(TargetID,"~r~Struck Down By The Hand Of God");
new Float:x, Float:y, Float:z;
GetPlayerPos(TargetID, x, y, z);
PlayerPlaySound(TargetID, 1159, x, y, z);
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
}
return 1;
}