21.02.2010, 13:30
Sup, I got a simple kick command and when I'm kicking someone they're saying that they cant see the reason so they cant make a ban appeal on my forums.
Here is my kick command:
They basicly cant see this line:
Thanks
Here is my kick command:
Код:
if(strcmp(cmd, "/kick", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, " USAGE: /kick [playerid] [reason]"); return 1; } giveplayerid = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >= 1) { if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GREY, " USAGE: /kick [playerid] [reason]"); return 1; } new year, month,day; getdate(year, month, day); format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year); KickLog(string); Kick(giveplayerid); format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s", giveplayer, sendername, (result)); SendClientMessageToAll(COLOR_ADMINCHAT, string); return 1; } else { format(string, sizeof(string), "%d is not an active player.", giveplayerid); SendClientMessage(playerid, COLOR_RED, string); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that command."); return 1; } } return 1; }
Код:
AdmCmd: %s was kicked by %s, reason: %s