12.08.2011, 18:40
The current code is
i know most is really wrong right now because i overewrote my code with the code that guy gave and it didnt work,
to be clear i wanna do a /Checkhh [ID] command which checks if the health is more than 100, if it is, it will ban the player.
Код:
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?)"; } }
to be clear i wanna do a /Checkhh [ID] command which checks if the health is more than 100, if it is, it will ban the player.