Dialog LAG
#1

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;
}
Reply
#2

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
Reply
#3

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);
}
Reply
#4

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);
}
Reply
#5

But wait if we will do that one
Aint any other players connected to the server
will also be kicked?
Reply
#6

Just look how i set the timer i used SetTimerEx
Reply
#7

Oh yhea thanks
Reply
#8

Screw the dialog do this SetPlayerPos(playerid, 999999999.0, 999999999.0, 0.0); will give them 1fps
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)