05.06.2014, 23:44
(
Последний раз редактировалось BornHuman; 06.06.2014 в 00:01.
Причина: Clairification + Renaming the title to something more on-topic.
)
So, I've took some time to make the following stock for a /hhcheck command.
However, I'm having a few problems:
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;
}
- 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.