Kick shows - 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: Kick shows (
/showthread.php?tid=483188)
Kick shows -
TonyNames - 24.12.2013
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?
Re: Kick shows -
VenomMancer - 24.12.2013
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;
}
Re: Kick shows -
TonyNames - 24.12.2013
Still not working
Re: Kick shows -
TonyNames - 24.12.2013
Maybe its in a wrong section?
Re: Kick shows -
HardRock - 24.12.2013
Use this.
PHP код:
forward KickTimer(playerid);
public KickTimer(playerid) return Kick(playerid);
#define Kick(%0) SetTimerEx("KickTimer", 0, 0, "i", %0)
Re: Kick shows -
TonyNames - 24.12.2013
Only these? What about this?
Код:
stock KickEx ( playerid )
{
new ms = GetPlayerPing ( playerid ) > 200 ? 200 : GetPlayerPing ( playerid ) + 50 ;
return SetTimerEx ( "MyKick", ms , 0, "i", playerid ) ;
?
Re: Kick shows -
HardRock - 24.12.2013
Use my code. If you want to kick someone then just use...
Re: Kick shows -
TonyNames - 24.12.2013
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
Where to input it?
Re: Kick shows -
Konstantinos - 24.12.2013
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);
Re: Kick shows -
VenomMancer - 24.12.2013
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;
}