Kick shows
#1

Hello well i tried to add so when you kick/ban anyone it will show the reason and the kicker. So i added this one

Код:
stock KickEx ( playerid )
{
	new ms = GetPlayerPing ( playerid ) > 200 ? 200 : GetPlayerPing ( playerid ) + 50 ;
	return SetTimerEx ( "MyKick", ms , 0, "i", playerid ) ;
}
forward MyKick ( playerid );
public MyKick ( playerid ) { Kick ( playerid ) ;}
But it wont work. Did i set it in the wrong section or what?
Reply
#2

Try this

pawn Код:
stock KickEx ( playerid )
{
    new ms = GetPlayerPing ( playerid ) > 200 ? 200 : GetPlayerPing ( playerid ) + 50 ;
    return SetTimerEx ( "MyKick", ms , 0, "i", playerid ) ;
}

forward MyKick ( playerid );

public MyKick ( playerid )
{
    Kick ( playerid ) ;
    return 1;
}
Reply
#3

Still not working
Reply
#4

Maybe its in a wrong section?
Reply
#5

Use this.

PHP код:
forward KickTimer(playerid);
public 
KickTimer(playerid) return Kick(playerid);
#define Kick(%0) SetTimerEx("KickTimer", 0, 0, "i", %0) 
Reply
#6

Only these? What about this?

Код:
stock KickEx ( playerid )
{
	new ms = GetPlayerPing ( playerid ) > 200 ? 200 : GetPlayerPing ( playerid ) + 50 ;
	return SetTimerEx ( "MyKick", ms , 0, "i", playerid ) ;
?
Reply
#7

Use my code. If you want to kick someone then just use...

PHP код:
Kick(playerid); 
Reply
#8

Okay well now it wont kick. It's just shows the Reason of the kick, and then it let the player continue play on the server.

If i am going to use the
Код:
Kick(playerid);
Where to input it?
Reply
#9

Why do you set the interval depending on the ping?

pawn Код:
stock KickEx(playerid) SetTimerEx("KickPlayer", 500, false, "i", playerid);

forward KickPlayer(playerid);
public KickPlayer(playerid) Kick(playerid);
Just use send the reason and then use: KickEx(playerid);
Reply
#10

Quote:
Originally Posted by TonyNames
Посмотреть сообщение
Still not working
This ?

pawn Код:
stock KickEx ( playerid )
{
    new ms = GetPlayerPing ( playerid ) > 200 ? 200 : GetPlayerPing ( playerid ) + 50 ;
    SetTimerEx ( "MyKick", ms , 0, "i", playerid ) ;
}

forward MyKick ( playerid );
public MyKick ( playerid )
{
    Kick ( playerid ) ;
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)