I need assistance - no kick message shown
#1

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?
Reply
#2

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

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

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.
Reply
#5

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

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

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,
Reply
#8

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.
Reply
#9

Nevermind. Fixed it! Thanks all of you!
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)