[Help] /hhcheck
#1

So, I've took some time to make the following stock for a /hhcheck command.

pawn Код:
stock HealthHackCheck(playerid)
{
    new Float:x,Float:y,Float:z;
    new Float:healthbeforecheck;
    new Float:healthaftercheck;
    new string[128];
   
    new GetHHCheckVW = GetPlayerVirtualWorld(playerid);
    new GetHHCheckInt = GetPlayerInterior(playerid);
   
    GetPlayerPos(playerid, x, y, z);
    Player[playerid][HHCheckVW] = GetHHCheckVW;
    Player[playerid][HHCheckInt] = GetHHCheckInt;
    GetPlayerHealth(playerid, healthbeforecheck);

    new Float:x,Float:y,Float:z;
    SetPlayerInterior(playerid, 10);
    SetPlayerVirtualWorld(playerid, 50);
    SetPlayerPos(playerid, 0, 0, 0);
    GetPlayerPos(playerid, x, y, z);
    CreateExplosion(x, y, z, 10, 100.0);
   
    GetPlayerHealth(playerid, healthaftercheck);
   
    format(string, sizeof(string), "%s was just Health Hack Checked. Health before check: %s. Health after check: %s", GetName(playerid), GetPlayerHealth(playerid, healthbeforecheck), GetPlayerHealth(playerid, healthaftercheck));
    SendToAdmins(ADMINORANGE, string, 0);
    SendToAdmins(ADMINORANGE, "If their health dropped, he/she may not be hacking. If it stayed the same, he/she may be hacking, or desynced. Make sure before banning them.", 0);
   
    SetPlayerHealth(playerid, healthbeforecheck);
    SetPlayerPos(playerid, x, y, z);
    SetPlayerVirtualWorld(playerid, GetHHCheckVW);
    SetPlayerInterior(playerid, GetHHCheckInt);
    return 1;
}
However, I'm having a few problems:
  • It doesn't set your location to 0, 0, 0 or any virtualworld/interior when it creates the explosion. (either that or the script does it so fast I can't see it with my eye)
  • It isn't stating the players health before and after the check in the string, it just leaves them blank.
Can anyone help me? [REP+]
Reply


Messages In This Thread
[Help] Strings - by BornHuman - 05.06.2014, 23:44
Re: [Help] /hhcheck - by Jack_Leslie - 06.06.2014, 03:22
Re: [Help] /hhcheck - by BornHuman - 06.06.2014, 03:44

Forum Jump:


Users browsing this thread: 1 Guest(s)