08.02.2013, 10:04
I have this command:
it doesn't show the message to the kicked player... only kicks him
and it shows for other people.
Код:
CMD:kick(playerid, params[]) { new pid, reason[256], str[256], query[256]; new year, month, day, hour, mins, data[256]; if(!CheckAdmin(playerid, 1)) return NotAuthMSG(playerid); if(sscanf(params,"ds[256]",pid,reason)) return SyntaxMSG(playerid, "/kick [playerid] [reason]"); if(!IsPlayerConnected(pid)) return SCM(playerid, COLOR_GREY,"Invalid player id"); getdate(year, month, day); gettime(hour, mins); format(data, sizeof(data), "%d-%d-%d | %d:%d", day, month, year, hour, mins); format(query, sizeof(query), "INSERT INTO `kicks` (player, victim, reason, data) VALUES ('%s', '%s', '%s', '%s')", GetName(playerid), GetName(pid), reason, data); mysql_function_query(dbHandle, query, true, "", ""); format(str, sizeof(str), "AdmCmd: %s was kicked by %s, reason: %s", GetName(pid), GetName(playerid), reason); SendClientMessageToAll(COLOR_LIGHTRED,str); Kick(pid); return 1; }
and it shows for other people.