Can somebody help me fix my code?
#1

Hey

pawn Код:
format(hackmessage, sizeof(hackmessage), "%s [ID: %d] [IP: %s] has been exploded to test godmode %.0f to %.0f", hackername,playerid, plrIP, cHealth, cHealth);
            SendClientMessageToAll(0xFFFFFFFF, hackmessage);
            GetPlayerHealth(playerid, pHealth);
            if(pHealth <= 99)
            {

            SetTimerEx("end", 5000, false, "i", playerid);
           
   
            }
        }
    }
    return 1;
}

forward end(playerid);
public end(playerid)
{

            new hackername[MAX_PLAYER_NAME], hackmessage[80];
            new plrIP[16];
            GetPlayerName(playerid, hackername, sizeof(hackername));
            GetPlayerIp(playerid, plrIP, sizeof(plrIP));
            format(hackmessage, sizeof(hackmessage), "%s [ID: %d] [IP: %s] did not died, godmode DETECTED", hackername,playerid, plrIP);
            SendClientMessageToAll(0xFFFFFFFF, hackmessage);
            return 1;
}


When The player explodes = 0 hp (No godmode & No message)
When The Player explodes = 100 hp = Invulnerable ( godmode & message)

How can I fix this
Reply
#2

This can be the schema

Код:
Your command or whatever you are usign to launch a function
	Store current player health 
	Explode the player (or you can slap the player too)
	Get current player health
	Compare current with the stored one
	if current == stored
		player cheat
	else
		player no cheat
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)