new bool:TeleportInt[MAX_PLAYERS][19] ; I make this stock to detect interior id stock SetPlayerIntEx(playerid, interior) { TeleportInt[playerid][interior] = true; SetPlayerInterior(playerid,interior); } I am resetting all all interior when player join and on player disconnect and using Timer 1sec to detect but how i can avoid car modification interiors new interior = GetPlayerInterior(i); if(TeleportInt[i][interior] == false ) { BanMessages(i, "Interior Hack"); }
stock SetPlayerHealthEx(playerid, Float:Health) { HealthAllowed[playerid] = true; SetPlayerHealth(playerid, Health); } save under 1 sec Timer new Float:health; GetPlayerHealth(i, health); if (health >= 100 && HealthAllowed[i] == false) { BanMessages(i, "Health Hack"); } I want to ask is it give problem when he die and auto get Health too fast from OnPLayerSPawn fast rather than getting it from SetPlayerHealthEx ?..
This callback is called when a player enters or exits a mod shop. |
public OnEnterExitModShop(playerid, enterexit, interiorid) { if(enterexit == 0) // If enterexit is 0, this means they are exiting { SetPlayerIntEx(playerid,GetPlayerInterior(playerid)); } return 1; }
new CurrentInterior[MAX_PLAYERS] ;
stock SetPlayerIntEx(playerid, interior)
{
CurrentInterior[playerid] = interior;
SetPlayerInterior(playerid, interior);
return 1;
}
if(CurrentInterior[i] != GetPlayerInterior(i))
{
BanMessages(i, "Interior Hack");
}
public OnEnterExitModShop(playerid, enterexit, interiorid)
{
CurrentInterior[playerid] = interiorid;//This sets the current interior to the new interior the player has entered
return 1;
}
stock SetPlayerHealthEx(playerid, Float:Health) { HealthAllowed[playerid] = true; SetPlayerHealth(playerid, Health); } save under 1 sec Timer new Float:health; GetPlayerHealth(i, health); if (health >= 100 && HealthAllowed[i] == false) { BanMessages(i, "Health Hack"); }
new Float:PlayerHealth[MAX_PLAYERS]; SetPlayerHealthEx(playerid, Float:hp) { PlayerHealth[playerid] = hp; return SetPlayerHealth(playerid, hp); } public AntiCheat() { for(new i; i < MAX_PLAYERS; i++) { new Float:health; GetPlayerHealth(i, health); if(health > PlayerHealth[i]) { //Player Using Health Hack } else { //>Player Health decreased, lets set variable value to new health PlayerHealth[i] = health; } } return 1; }
new Float:PlayerHealth[MAX_PLAYERS];
new Float:CurrentHealth[MAX_PLAYERS];
stock SetPlayerHealthEx(playerid, Float:Health)
{
CurrentHealth[playerid] = health;
SetPlayerHealth(playerid, Health);
}
//Timer
new Float:health;
GetPlayerHealth(i, health);
if (health > CurrentHealth[playerid])
{
BanMessages(i, "Health Hack");
}