08.05.2013, 12:23
hello i created filterscripts called " health hack "
it works but i can't off it
header
This Is Error
How To Make The Random Health (Health Hack)
it works but i can't off it
header
pawn Код:
#include <a_samp>
new endhack[MAX_PLAYERS];
#pragma tabsize 0
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/cchackon", cmdtext, true) == 0)
{
endhack[playerid] = SetTimerEx("SetPlayerHealth70", 100, false, "i", playerid);
return 1;
}
if (strcmp("/cchackoff", cmdtext, true) == 0)
{
KillTimer(endhack[playerid]);
return 1;
}
return 0;
}
pawn Код:
forward SetPlayerHealth70(playerid);
public SetPlayerHealth70(playerid)
{
SetPlayerHealth(playerid, 70);
SetPlayerArmour(playerid, 70);
SetTimerEx("SetPlayerHealth50", 100, false, "i", playerid);
return 1;
}
forward SetPlayerHealth50(playerid);
public SetPlayerHealth50(playerid)
{
SetPlayerHealth(playerid, 50);
SetPlayerArmour(playerid, 50);
SetTimerEx("SetPlayerHealth20", 100, false, "i", playerid);
return 1;
}
forward SetPlayerHealth20(playerid);
public SetPlayerHealth20(playerid)
{
SetPlayerHealth(playerid, 20);
SetTimerEx("SetPlayerHealth100", 100, false, "i", playerid);
SetPlayerArmour(playerid, 20);
return 1;
}
forward SetPlayerHealth100(playerid);
public SetPlayerHealth100(playerid)
{
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SetTimerEx("SetPlayerHealth70", 100, false, "i", playerid);
return 1;
}