kick player problem
#1

hey guys i created a gpci kicker everything worked fine, but i am ineedy to show the player a dialog before kicking the player, i created the timer which is 1 second but it wasn't enough it shows the player the register dialog then it kicks him lel
code
pawn Код:
public OnPlayerConnect(playerid)
{
//--------------------------------GCPI------------------------------------------
    new zSerial[128];
    gpci(playerid, zSerial, 128);
    format(ystring, sizeof(ystring),"ladmin/Sban/%s.txt", zSerial);
    if(dini_Exists(ystring))
    {
        format(ystring, sizeof(ystring),"{FFFFFF}You Can't Join The Server Now!\n{FFFFFF}Hardware ID: {FF0000}%d\n{FFFFFF}If You Want To Get Unbanned Visit {FF0000}www.tctdm.tk{FFFFFF}, Create an unban appeal there!", zSerial);
        ShowPlayerDialog(playerid, 31013, DIALOG_STYLE_MSGBOX, "{FF0000}TCTDM - Hardware ID Banned", ystring, "OK", "");
    }
Please help guys the dialog should be showen! thanks in advance <3
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=591458

Lookout for fix_kickban.inc which let you add a delay for kicks and even block player updating while the delay is active.

So you can very easily do this:
pawn Код:
public OnPlayerConnect(playerid)
{
//--------------------------------GCPI------------------------------------------
    new zSerial[128];
    gpci(playerid, zSerial, 128);
    format(ystring, sizeof(ystring),"ladmin/Sban/%s.txt", zSerial);
    if(dini_Exists(ystring))
    {
        format(ystring, sizeof(ystring),"{FFFFFF}You Can't Join The Server Now!\n{FFFFFF}Hardware ID: {FF0000}%d\n{FFFFFF}If You Want To Get Unbanned Visit {FF0000}www.tctdm.tk{FFFFFF}, Create an unban appeal there!", zSerial);
        ShowPlayerDialog(playerid, 31013, DIALOG_STYLE_MSGBOX, "{FF0000}TCTDM - Hardware ID Banned", ystring, "OK", "");

        Kick(playerid);
    }
Reply
#3

thanks for your fast reply so should i add the timer again?
Reply
#4

Quote:
Originally Posted by KillerStrike23
Посмотреть сообщение
thanks for your fast reply so should i add the timer again?
No since SAMP Fixer itself runs a timer for adding a delay. Just use the function normally.
Reply
#5

D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_gametext.inc(99) : error 017: undefined symbol "GetPlayerPoolSize"
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_menu.inc(70) : error 025: function heading differs from prototype
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_others.inc(52) : warning 235: public function lacks forward declaration (symbol "OnPlayerWeaponShot")
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_server.inc(723) : error 017: undefined symbol "BULLET_HIT_TYPE_VEHICLE"
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_server.inc(727) : error 017: undefined symbol "GetPlayerPoolSize"
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_server.inc(761) : warning 219: local variable "lights" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
include error
Reply
#6

Quote:
Originally Posted by KillerStrike23
Посмотреть сообщение
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_gametext.inc(99) : error 017: undefined symbol "GetPlayerPoolSize"
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_menu.inc(70) : error 025: function heading differs from prototype
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_others.inc(52) : warning 235: public function lacks forward declaration (symbol "OnPlayerWeaponShot")
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_server.inc(723) : error 017: undefined symbol "BULLET_HIT_TYPE_VEHICLE"
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_server.inc(727) : error 017: undefined symbol "GetPlayerPoolSize"
D:\3x-TCTDM\pawno\include\SAMP_Fixer/fix_server.inc(761) : warning 219: local variable "lights" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
include error
SAMP fixer is only compatible with 0.3.7 or higher SAMP versions.
Reply
#7

ah what to do now include kicker only ?
Reply
#8

Quote:
Originally Posted by KillerStrike23
Посмотреть сообщение
ah what to do now include kicker only ?
You can also include an individual library manually, like:
pawn Код:
#include <SAMP_Fixer/fix_kickban>
Reply
#9

nah, i just got it out of the file and included it normaly, thanks for your help bug gm under testing!
Reply
#10

player is not getting kicked anymore lol, Help Please!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)