31.01.2010, 11:04
try this and let me know if that work
![Smiley](images/smilies/smile.png)
/* Command /kick */
else if (!strcmp(cmd, "/kick", true))
{
new pid, tmpp[256],string[256];
new day,month,year;
new hour,minute,second;
if (PlayerInfo[playerid][pAdmin] >= 1)
{
tmpp = strtok(cmdtext, idx);
if (!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_GREEN, "USAGE: /kick [playerid] [reason]");
return 1;
}
pid = strval(tmpp);
if (!(IsPlayerConnected(pid)))
{
SendClientMessage(playerid, COLOR_RED, "THAT PLAYER IS NOT CONNECTED!");
return 1;
}
getdate(year,month,day);
gettime(hour,minute,second);
GetPlayerName(pid, pidName, sizeof(pidName));
format(tmpp, sizeof(tmpp), "You have kicked %s (ID:%d) for reason : %s | Date : %d.%d.%d | Time : %d.%d.%d",pidName,pid,cmdtext[idx],day,month,year,hour,minute,second);
SendClientMessage(playerid, 0xAA3333AA, tmpp);
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(pid, pidName, sizeof(pidName));
format(string, sizeof(string), "%s has been kicked by admin %s | Reason : %s | Date : %d.%d.%d | Time : %d.%d.%d",pidName,AdminName,cmdtext[idx],day,month,year,hour,minute,second);
SendClientMessageToAll(0xAA3333AA, string);
BK(string);
Kick(pid);
return 1;
}
}