Anti Unfreeze - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anti Unfreeze (
/showthread.php?tid=628714)
Anti Unfreeze -
xxxSpeedxxx - 13.02.2017
Is it posible to make this? For example a cheater get's freezed by an admin, the cheater unfreeze's himself with some cheat. Can I do something to prevent cheaters from unfreezing themselfs with theyr cheats? This is a serious problem for me, any suggestions? I ******d it but didn't find any results.
PHP Code:
Any example codes are more than welcome! tnx
Re: Anti Unfreeze -
morris91 - 13.02.2017
There might be totally a different way of doing this but just off the top of my head.
If you have a freeze == 1 in your playerdata, make a timer or add it into your globaltimer if you use one and make it so if(playerdata[playerid][freeze] == 1) { TogglePlayerControllable(id, 0); }
so every time your timer is called it re-freezes them just incase.
As i say there could be a much better way but this is just off the top of my head.
Re: Anti Unfreeze -
Rdx - 14.02.2017
I've done it like that. All that code in 1s timer with player loop.
Code:
if(pInfo[playerid][player_freeze] > 0)
{
if(GetPlayerSpeed(playerid) > 2)
{
pInfo[playerid][player_cheat_warns]++;
}
}
if( pInfo[playerid][player_cheat_warns]>3)
{
Kick(playerid);
continue;
}
You can also do it without warnings, just kick for first time, but player for example can be pushed by vehicle so warning method is better.