12.09.2013, 14:54
NOPHacksCheck Timer
NOPHacksCheck forward & public
Problem - Everytime someone enters a LEO or a Trucker vehicle without that faction/job, they can enter but it gives a warning to a innocent person who doesn't use NOP Hacks. I'm asking that how to make it accurate?, like it only gives a warning who DOES Actually use that hack. not those innocent person who can be banned mistakenly (which is pain in the ass and loosing players). If anyone can explain HOW I could improve and make it more accurate.
pawn Code:
public OnGameModeInit()
{
SetTimer("NOPHacksCheck", 1000, true);
return 1;
}
NOPHacksCheck forward & public
pawn Code:
forward NOPHacksCheck(playerid);
public NOPHacksCheck(playerid)
{
// NOP Vehicle Cheat
new vehicleid = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(IsLeoVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 1 || IsTruckerVehicle(vehicleid) && PlayerInfo[playerid][pJob] != JOB_TRUCKER)
{
new string[128];
format(string, sizeof(string), "AdmWarn: %s(%d) might be Desynced or using NOP hacks. (Driving Restricted Vehicle - Vehicle Model: %d))", RPN(playerid), playerid, GetVehicleModel(vehicleid));
SendAdminMessage(COLOR_DARKRED, 1, string);
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}