SA-MP Forums Archive
I need assistance - no kick message shown - 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: I need assistance - no kick message shown (/showthread.php?tid=467557)



I need assistance - no kick message shown - Eugene. - 03.10.2013

Well-.. my problem its kinda impossible to find a problem.

Exemple:

When I am adding " Kick(playerid); or Kick(other); or Kick(target); to anything - it doesn't show any kind of SendClientMessage and all that crap to the person that got banned/kicked or anything like that.

I've placed this the last one and all the texts works perfectlly when I remove Kick-...


Does anybody knows what may be the problem?


Re: I need assistance - kaisersouse - 03.10.2013

Quote:
Originally Posted by Eugene.
View Post
Well-.. my problem its kinda impossible to find a problem.

Exemple:

When I am adding " Kick(playerid); or Kick(other); or Kick(target); to anything - it doesn't show any kind of SendClientMessage and all that crap to the person that got banned/kicked or anything like that.

I've placed this the last one and all the texts works perfectlly when I remove Kick-...


Does anybody knows what may be the problem?
1) moving to scripting as this is a scripting issue
2) a search would have revealed that this has been discussed MANY times before

You need to set up a kick timer that shows them the message, then counts a few seconds before kicking them.


Re: I need assistance - no kick message shown - Shoulen - 03.10.2013

Simply displaying the message before running the kick should suffice.

For example:
pawn Code:
Kick(playerid);
SendClientMessage(playerid, 0, "You were kicked");
Would become
pawn Code:
SendClientMessage(playerid, 0, "You were kicked");
Kick(playerid);
and would therefore show correctly.

Regards

Matt


Re: I need assistance - no kick message shown - Mattakil - 03.10.2013

Quote:
Originally Posted by Shoulen
View Post
Simply displaying the message before running the kick should suffice.

For example:
pawn Code:
Kick(playerid);
SendClientMessage(playerid, 0, "You were kicked");
Would become
pawn Code:
SendClientMessage(playerid, 0, "You were kicked");
Kick(playerid);
and would therefore show correctly.

Regards

Matt
Doesn't work that way man.

Do your SCM or w/e, then set a timer ex for half a second, when the timer expires, kick the person.


Re: I need assistance - no kick message shown - xganyx - 04.10.2013

pawn Code:
forward KickPlayer(playerid);

Extra_Kick(playerid,"You have been kicked");//Put this where do you want

stock Extra_Kick(playerid,reason[])
{
    SendClientMessage(playerid,-1,reason);
    SetTimer("KickPlayer",2000,false);
    return 1;
}

public KickPlayer(playerid)
{
    Kick(playerid);
}



Re: I need assistance - no kick message shown - Eugene. - 04.10.2013

Quote:
Originally Posted by xganyx
View Post
pawn Code:
forward KickPlayer(playerid);

Extra_Kick(playerid,"You have been kicked");//Put this where do you want

stock Extra_Kick(playerid,reason[])
{
    SendClientMessage(playerid,-1,reason);
    SetTimer("KickPlayer",2000,false);
    return 1;
}

public KickPlayer(playerid)
{
    Kick(playerid);
}
The admin that uses it gets kicked not the other person. I've tried to change the playerid to target and same thing. Suggestions?


Re: I need assistance - no kick message shown - zT KiNgKoNg - 04.10.2013

Are you putting playerid on the stock when you're kicking the player or are you putting the id taht you would like to kick in replace with playerid Example: Extra_Kick(id, "You've been kicked from the server"); - i may have juyst solved your problem Eugene.

Regards, Austin Rapter your beloved friend,


Re: I need assistance - no kick message shown - Eugene. - 04.10.2013

Quote:
Originally Posted by zT KiNgKoNg
View Post
Are you putting playerid on the stock when you're kicking the player or are you putting the id taht you would like to kick in replace with playerid Example: Extra_Kick(id, "You've been kicked from the server"); - i may have juyst solved your problem Eugene.

Regards, Austin Rapter your beloved friend,
Problem isn't there. Its happening somewhere else since I already tried this with target.


Re: I need assistance - no kick message shown - Eugene. - 04.10.2013

Nevermind. Fixed it! Thanks all of you!


Re: I need assistance - no kick message shown - kaisersouse - 04.10.2013

Quote:
Originally Posted by Shoulen
View Post
Simply displaying the message before running the kick should suffice.
Unfortunately it doesn't