stock AntiHPhackCheck( ) { new Thehealth[10] GetPlayerHealth(playerid,Thehealth); if Thehealth >100 { BanEx(playerid,Health Hacking); } return 1; }
COMMAND:chh(playerid, params[])
{
new targetid = strval(params);
if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /chh [ID]");
else if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000AA, "Player not found!");
{
new Float:Health;
GetPlayerHealth(targetid, Health);
if(Health > 100.0)
{
BanEx(strval(params), "Health Hacks");
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/CMD HERE", cmdtext, true, 10) == 0) //do sumthin here
COMMAND:CheckHH(playerid, params[]) { new targetid = strval(params); if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /CheckHH [ID]"); else if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000AA, "Bad Player ID"); { new Float:playerHealth; GetPlayerHealth(targetid, playerHealth); if(Health > 100.0) { BanEx(strval(params), "Health Hacks"); } else if(Health < 101.0) return SendClientMessage(playerid,0x01FF0A, "Player doesnt HP hax(or does he?)"; } return 1; }
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/Restartserver", cmdtext, true, 10) == 0) if(IsPlayerAdmin(playerid)) SendRconCommand("gmx"); else if (strcmp("/Checkhh", cmdtext, true, 10) == 0) { new params; new targetid = strval(params); if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /CheckHH [ID]"); else if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000AA, "Bad Player ID"); { new Float:playerHealth; GetPlayerHealth(targetid, playerHealth); if(Health > 100.0) { BanEx(strval(params), "Health Hacks"); } else if(Health < 101.0) return SendClientMessage(playerid,0x01FF0A, "Player doesnt HP hax(or does he?)"; } }
CMD:checkhh(playerid, params[])
{
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;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Restartserver", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
SendRconCommand("gmx");
return 1;
}
}
pawn Код:
|
CMD:restartserver(playerid,params[])
{
if(IsPlayerAdmin(playerid)) SendRconCommand("gmx");
return 1;
}
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;
}