12.08.2011, 19:27
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[64], params[128];
sscanf(cmdtext, "s[64]s[128]", cmd, params);
if (strcmp("/Restartserver", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
SendRconCommand("gmx");
return 1;
}
}
if (strcmp("/checkhh", cmd, true) == 0)
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /CheckHH [ID]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000FF, "Bad Player ID");
new Float:playerHealth;
GetPlayerHealth(targetid, playerHealth);
if(playerHealth > 100.0)
{
BanEx(targetid, "Health Hacks");
}
else
{
SendClientMessage(playerid,0x01FF0AFF, "Player doesnt HP hax(or does he?)";
}
return 1;
}