Little help with KickWithMessage
#1

Ok so i have a kick command, and i have a KickWithMessage stock
Kick command:
Код:
CMD:kick(playerid, params[])
{
	if (pInfo[playerid][Adminlevel] < 2) return 0;
	new targetid, reason[64], string[128], pID;
	if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessage(playerid, -1, "/kick <ID> <Reason>");
	if(pID == IPI) return SCM(playerid, red, "Player is not connected!");
	format(string, sizeof(string), "%s %s has kicked %s reason: %s ", AdminLevelName(playerid), GetName(playerid), GetName(targetid), reason);
 	SendClientMessageToAll(-1, string);
	Kick(targetid);
 	return 1;
}
Stock:
Код:
forward KickPublic(playerid);

public KickPublic(playerid) { Kick(playerid); }
stock KickWithMessage(playerid, message[])
{
    SCM(playerid, 0xFF4444FF, message);
    SetTimerEx("KickPublic", 100, 0, "d", playerid);     //Delay of 1 second before kicking the player so he recieves the message
}
But i don't seem to be able to get it to work, i wanted it to say to the player: Admin Blk has kicked you reason: test
Reply


Messages In This Thread
Little help with KickWithMessage - by KyLeBlaK - 22.10.2014, 15:11
Re: Little help with KickWithMessage - by Rudy_ - 22.10.2014, 15:13
Re: Little help with KickWithMessage - by Stinged - 22.10.2014, 15:15
Re: Little help with KickWithMessage - by KyLeBlaK - 22.10.2014, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)