CMD:kick(playerid, params[])
{
if(pDados[playerid][Staff] >= 2)
{
if(pDados[playerid][StaffTrabalhando] == 1)
{
new ID, Motivo[128];
if(sscanf(params, "is", ID, Motivo)) return SendClientMessage(playerid, -1, "Use: /kick [id] [motivo]");
new Nome[MAX_PLAYER_NAME], string[64 + MAX_PLAYER_NAME];
GetPlayerName(ID, Nome, sizeof(Nome));
Kick(ID);
format(string, sizeof(string), "%s Foi kickado por %s, motivo:%s", Nome, playerid, Motivo);
SendClientMessageToAll(-1, string);
fileLog("Kicks", string);
} else { SendClientMessage(playerid, -1, "Vocк precisa estб no modo trabalho!"); }
} else { SendClientMessage(playerid, -1, "Vocк nгo tem permissгo para usar esse comando!"); }
return 1;
}
stock fileLog(file[], string[])
{
new time[6];
gettime(time[0], time[1], time[2]);
getdate(time[3], time[4], time[5]);
new timestr[32], data[128];
format(timestr,32,"[%02d.%02d|%02d:%02d] ",time[5],time[4], time[0], time[1]);
format(data, sizeof(data), "%s%s\r\n",timestr,string);
new File:hFile, thefile[32];
format(thefile, sizeof(thefile), "/Logs/%s.log", file);
hFile = fopen(thefile, io_append);
fwrite(hFile, data);
fclose(hFile);
return 1;
}
[04.12|03:54] Yuri_Nogueira Foi kickado por , motivo:Text
format(string, sizeof(string), "%s Foi kickado por %s, motivo:%s", Nome, playerid, Motivo);
new Nome2[MAX_PLAYER_NAME]; GetPlayerName(playerid, Nome2, sizeof(Nome2)); format(string, sizeof(string), "%s Foi kickado por %s, motivo:%s", Nome, Nome2, Motivo);
Код:
format(string, sizeof(string), "%s Foi kickado por %s, motivo:%s", Nome, playerid, Motivo); Код:
new Nome2[MAX_PLAYER_NAME]; GetPlayerName(playerid, Nome2, sizeof(Nome2)); format(string, sizeof(string), "%s Foi kickado por %s, motivo:%s", Nome, Nome2, Motivo); |