dcmd_kick(playerid, params[])
{
new index = 0;
tmp = strtok(params, index);
if (!IsPlayerAdmin(playerid))
{
SystemMessage(playerid, "Jus ne esate Administratorius.");
return 1;
}
if(!strlen(tmp))
{
SystemMessage(playerid, "Correct usage: '/kick [playername] [reason]'");
return 1;
}
new string[MAX_STRING];
new second, minute, hour, day, month, year;
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "You have been kicked by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
SystemMessage(giveplayerid, string);
format(string, sizeof(string), "Player %s has been kicked by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
SystemMessageToAll(string);
format(string, sizeof(string), "%s has been kicked by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
print(string);
gettime(hour, minute, second);
getdate(year, month, day);
format(string, sizeof(string), "Player %s kicked player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
ServerLog(string);
KickPlayer(giveplayerid, "");
}
else
{
format(string, sizeof(string), "That player is not active.");
SystemMessage(playerid, string);
}
return 1;
}
|
Originally Posted by dice7
Notepad++ has automatic indentation, don't know about other editors, but pawno doesn't
|