/Explode to stop health hacks
#4

There are some types of hacks that can circumvent explosions, but for the most part I suppose /explode would work, since most people haven't figured it out yet.

However, the command itself is pretty simple to create, simply use the CreateExplosion function to get it to work.

With zcmd/sscanf, this should work (untested):
pawn Код:
CMD:explode(playerid, params[]) {
    new
        iTarget;
       
    if(sscanf(params, "u", iTarget))
        return 1; // The player didn't type a name or an ID
       
    if(iTarget == INVALID_PLAYER_ID)
        return 1; // Not connected.

    if(!IsPlayerAdmin(playerid))
        return 1; // The person typing this is not an admin.

    new
        Float: fExplosionPosition[3]; // Create some variables so we can store the position of where the explosion will be

    GetPlayerPos(iTarget, fExplosionPosition[0], fExplosionPosition[1], fExplosionPosition[2]); // Get the position that we'll set the explosion for
    CreateExplosion(fExplosionPosition[0], fExplosionPosition[1], fExplosionPosition[2], 2, 10.0); // Create the explosion with the SA-MP CreateExplosion function
    return 1;
}
EDIT: Damn, beaten x2.
Reply


Messages In This Thread
/Explode to stop health hacks - by ryan_parkour - 16.04.2011, 12:34
Re: /Explode to stop health hacks - by Vince - 16.04.2011, 12:40
Re: /Explode to stop health hacks - by Skylar Paul - 16.04.2011, 12:41
Re: /Explode to stop health hacks - by Calgon - 16.04.2011, 12:45
Re: /Explode to stop health hacks - by ryan_parkour - 16.04.2011, 12:47
Re: /Explode to stop health hacks - by Skylar Paul - 16.04.2011, 12:50
Re: /Explode to stop health hacks - by ryan_parkour - 16.04.2011, 12:54
Re: /Explode to stop health hacks - by ryan_parkour - 16.04.2011, 13:06
Re: /Explode to stop health hacks - by Calgon - 16.04.2011, 13:15
Re: /Explode to stop health hacks - by ryan_parkour - 16.04.2011, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)