How to make command like /Command ID
#6

The current code is

Код:
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?)";
	}
		}
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.
Reply


Messages In This Thread
How to make command like /Command ID - by henry jiggy - 12.08.2011, 00:37
Re: How to make command like /Command ID - by Laronic - 12.08.2011, 00:49
[No subject] - by henry jiggy - 12.08.2011, 00:53
Re: How to make command like /Command ID - by =WoR=Varth - 12.08.2011, 02:45
Re: How to make command like /Command ID - by Kingunit - 12.08.2011, 03:17
Re: How to make command like /Command ID - by henry jiggy - 12.08.2011, 18:40
Re: How to make command like /Command ID - by MadeMan - 12.08.2011, 18:50
Re: How to make command like /Command ID - by henry jiggy - 12.08.2011, 18:53
Re: How to make command like /Command ID - by Michael@Belgium - 12.08.2011, 19:23
Re: How to make command like /Command ID - by MadeMan - 12.08.2011, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)