Dialog LAG -
RicaNiel - 10.04.2013
Guys I have a Anti Cheat that runs every 1 second
but when it detects a cheat
i will automatically close the connection without poping out the dialog
any idea how to fix this problem?
pawn Код:
stock BotBan(playerid,reason[])
{
sData[pBan] += 1;
new reasonn[512],year,month,day,hour,minute,second;
getdate(year,month,day);
gettime(hour,minute,second);
format(reasonn,sizeof(reasonn),""CWHITE"You have been banned from the server\n\nBy: ["CGREEN" Anti-Cheat "CWHITE"]\nReason: ["CGREEN" %s "CWHITE"]\nDate: ["CGREEN" %s %d %d "CWHITE"]\nBan ID: [ "CGREEN"%d"CWHITE" ]\n\nIf you think this is wrong please take a screenshot and post a ban appeal on\n[ "CURL"%s"CWHITE" ]",reason,monthname(month),day,year,sData[pBan],sData[URL]);
ShowPlayerDialog(playerid,D_BAN,MSGBOX,""CSERVER"BANNED",reasonn,"Ok","");
Kick(playerid);
return 0;
}
Re: Dialog LAG -
iJumbo - 10.04.2013
in 0.3x Kick have more importance than a dialog
to fix that you have to call kick 100 ms 200 ms later
you can create a function for that
Re: Dialog LAG -
RicaNiel - 10.04.2013
still same look what i have done
pawn Код:
stock BotBan(playerid,reason[])
{
sData[pBan] += 1;
new reasonn[512],year,month,day,hour,minute,second;
getdate(year,month,day);
gettime(hour,minute,second);
format(reasonn,sizeof(reasonn),""CWHITE"You have been banned from the server\n\nBy: ["CGREEN" Anti-Cheat "CWHITE"]\nReason: ["CGREEN" %s "CWHITE"]\nDate: ["CGREEN" %s %d %d "CWHITE"]\nBan ID: [ "CGREEN"%d"CWHITE" ]\n\nIf you think this is wrong please take a screenshot and post a ban appeal on\n[ "CURL"%s"CWHITE" ]",reason,monthname(month),day,year,sData[pBan],sData[URL]);
ShowPlayerDialog(playerid,D_BAN,MSGBOX,""CSERVER"BANNED",reasonn,"Ok","");
SetTimer("botkick",1200,false);
return botkick(playerid);
}
forward botkick(playerid);
public botkick(playerid)
{
return Kick(playerid);
}
Re: Dialog LAG -
iJumbo - 10.04.2013
That
pawn Код:
stock BotBan(playerid,reason[])
{
sData[pBan] += 1;
new reasonn[512],year,month,day,hour,minute,second;
getdate(year,month,day);
gettime(hour,minute,second);
format(reasonn,sizeof(reasonn),""CWHITE"You have been banned from the server\n\nBy: ["CGREEN" Anti-Cheat "CWHITE"]\nReason: ["CGREEN" %s "CWHITE"]\nDate: ["CGREEN" %s %d %d "CWHITE"]\nBan ID: [ "CGREEN"%d"CWHITE" ]\n\nIf you think this is wrong please take a screenshot and post a ban appeal on\n[ "CURL"%s"CWHITE" ]",reason,monthname(month),day,year,sData[pBan],sData[URL]);
ShowPlayerDialog(playerid,D_BAN,MSGBOX,""CSERVER"BANNED",reasonn,"Ok","");
SetTimerEx("botkick",200,false,"i",playerid);
return 1;
}
forward botkick(playerid);
public botkick(playerid)
{
return Kick(playerid);
}
Re: Dialog LAG -
RicaNiel - 10.04.2013
But wait if we will do that one
Aint any other players connected to the server
will also be kicked?
Re: Dialog LAG -
iJumbo - 10.04.2013
Just look how i set the timer i used SetTimerEx
Re: Dialog LAG -
RicaNiel - 10.04.2013
Oh yhea thanks
Re: Dialog LAG -
Pottus - 10.04.2013
Screw the dialog do this SetPlayerPos(playerid, 999999999.0, 999999999.0, 0.0); will give them 1fps