/kick does not message the kicked player
#6

Quote:
Originally Posted by -Jason
Посмотреть сообщение
PHP код:
forward KickPublic(playerid);
public 
KickPublic(playeridKick(playerid);
stock KickWithMessage(playerid)
{
    
//SendClientMessageToAll(playerid, color, message);
    
SetTimerEx("KickPublic"200"d"playerid);
}
/* TEST */
CMD:kick(playeridparams[])
{
    if (!(
IsPlayerAdmin(playerid))) return 0;
    new 
targetidname1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], kickreason[128];
    if(
sscanf(params"us"targetidkickreason)) return SendClientMessage(playerid, -1"Usage: /kick [ID] [REASON]");
    if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1,"Invalid ID.");
    
GetPlayerName(playeridname1sizeof(name1));
    
GetPlayerName(targetidname2sizeof(name2));
    new 
kickmsg[128];
    
format(kickmsgsizeof(kickmsg), "[ADMIN] %s was kicked by %s for: %s"name2name1kickreason);
    
SendClientMessageToAll(COLOR_ORANGEkickmsg);
    
KickWithMessage(playerid);
    return 
1;

Code now looks like that and it worked, is 20 milliseconds recommended?
Try 1000ms Its 1 sec i think
Reply


Messages In This Thread
/kick does not message the kicked player - by -Jason - 16.01.2014, 08:57
Re: /kick does not message the kicked player - by Vince - 16.01.2014, 09:04
Re: /kick does not message the kicked player - by Konstantinos - 16.01.2014, 09:05
Re: /kick does not message the kicked player - by Excelize - 16.01.2014, 09:12
Re: /kick does not message the kicked player - by -Jason - 16.01.2014, 09:14
Re: /kick does not message the kicked player - by UnknownOwner - 16.01.2014, 09:15
Re: /kick does not message the kicked player - by DaniceMcHarley - 16.01.2014, 09:27

Forum Jump:


Users browsing this thread: 3 Guest(s)