Message not displaying to player - 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: Message not displaying to player (
/showthread.php?tid=444331)
Message not displaying to player -
Lucky™ - 16.06.2013
When I kick someone from the server, He will get kicked but he can't see the reason why he got kicked. Here's the kick command [not whole command].
pawn Код:
format(string, sizeof(string), ""chat""COLOR_RED" %s %s kicked your from the server [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),reason);
SendClientMessage(targetid,-1,string);
Kick(targetid);
}
else {
SendClientMessage(playerid,-1,""chat""COLOR_BLUE" You don't have admin permission for this");
}
return 1;
}
What's wrong? Do you need whole command?
Re: Message not displaying to player -
Avi57 - 16.06.2013
pawn Код:
forward KickPublic(playerid);
public KickPublic(playerid) { Kick(playerid); }
stock KickWithMessage(playerid, color, message[])
{
SendClientMessage(playerid, color, message);
SetTimerEx("KickPublic", 1000, 0, "d", playerid); //Delay of 1 second before kicking the player so he recieves the message
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/kickme", true) == 0)
{
//Kicks the player who the executed this command
KickWithMessage(playerid, 0xFF0000FF, "You have been kicked.");
return 1;
}
return 0;
}
Re: Message not displaying to player -
SilverKiller - 16.06.2013
https://sampwiki.blast.hk/wiki/Kick
This will really help you.
Read it fully.
Re: Message not displaying to player -
Lucky™ - 16.06.2013
Quote:
Originally Posted by SilverKiller
|
I didn't noticed that last part, I will read it now.
Cheers!
@Avi- Thank you too.