Error when changing to KickWithMessage
#1

Hello, kicked/banned players dont see the reason, they just get Server Closed The Connection.

I know Im doing something wrong, but how can I fix it?

Quote:

error 035: argument type mismatch (argument 2)

Quote:

KickWithMessage(playerid, COLOUR_GREEN, "You have been kicked by %s (reason: %s)");

Thanks in advance.
Reply
#2

pawn Код:
KickWithMessage(playerid, "Your kick message.");
And for the color, put it in the stock KickWithMessage like this

pawn Код:
SendClientMessage(playerid, COLOUR_GREEN, message); //note that colour green is the color you used in your first post,you can change it.
Note that this is an example, and you can change it!
Reply
#3

Many thanks for your quick reply!
What about the reason for kick?

Edit: Im just getting more and more errors Think I'll just back out of changing this :/
Reply
#4

Something like this?
pawn Код:
CMD:kick(playerid, params[])
{
 new reason[40], target;
 if(sscanf(params, "us[40]", target, reason)) return SCM(playerid, -1, "USAGE: /kick player reason.");
 if(!IsPlayerConnected(target)) return SCM(playerid, -1, "Player not connected.");
 else
 {
 new str[128];
 format(str, 128, "You have been kicked for the reason: %s", reason);
 SendClientMessage(target, -1, str);
 SetTimerEx("kickdelay", 1000, 0, "d", target);
 return 1;
 }
}
forward public kickdelay(target);
public kickdelay(target)
{
 Kick(target);
return 1;
}
Reply
#5

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
Something like this?
pawn Код:
CMD:kick(playerid, params[])
{
 new reason[40], target;
 if(sscanf(params, "us[40]", target, reason)) return SCM(playerid, -1, "USAGE: /kick player reason.");
 if(!IsPlayerConnected(target)) return SCM(playerid, -1, "Player not connected.");
 else
 {
 new str[128];
 format(str, 128, "You have been kicked for the reason: %s", reason);
 SendClientMessage(target, -1, str);
 SetTimerEx("kickdelay", 1000, 0, "d", target);
 return 1;
 }
}
forward public kickdelay(target);
public kickdelay(target)
{
 Kick(target);
return 1;
}
Is that 0.3x friendly?
Reply
#6

Yes.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)