[PEDIDO] Comando /kick dini - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [PEDIDO] Comando /kick dini (
/showthread.php?tid=227474)
[PEDIDO] Comando /kick dini -
GuikBretas - 17.02.2011
Pessoal alguйm tem um comando /Kick ID motivo para include Dini? eu nгo to conseguindo fazer ¬¬'
Re: [PEDIDO] Comando /kick dini -
Macintosh - 17.02.2011
pawn Код:
forward KickLog(string[]);
pawn Код:
if(strcmp(cmd, "/kick", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /kick [Id Do Jogador] [motivo]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(admintrabalhando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)");
return 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_GRAD2, "USE: /kick [Id Do Jogador] [motivo]");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "ADMIN CMD: %s Foi kickado by %s, Motivo: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
KickLog(string);
format(string, sizeof(string), "ADMIN CMD: %s Foi Kickado by %s, Motivo: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(giveplayerid);
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d Nгo estб on.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
pawn Код:
public KickLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\n",string);
new File:hFile;
hFile = fopen("kick.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
Re: [PEDIDO] Comando /kick dini -
Baddark2131 - 17.02.2011
Thug ou versхes Superiores Detected /\
Re: [PEDIDO] Comando /kick dini -
GuikBretas - 17.02.2011
Quote:
Originally Posted by Lucas Nicolas
pawn Код:
forward KickLog(string[]);
pawn Код:
if(strcmp(cmd, "/kick", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /kick [Id Do Jogador] [motivo]"); return 1; } giveplayerid = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >= 1) { if(admintrabalhando[playerid] < 1) { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)"); return 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_GRAD2, "USE: /kick [Id Do Jogador] [motivo]"); return 1; } new year, month,day; getdate(year, month, day); format(string, sizeof(string), "ADMIN CMD: %s Foi kickado by %s, Motivo: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year); KickLog(string); format(string, sizeof(string), "ADMIN CMD: %s Foi Kickado by %s, Motivo: %s", giveplayer, sendername, (result)); SendClientMessageToAll(COLOR_LIGHTRED, string); Kick(giveplayerid); return 1; } } } else { format(string, sizeof(string), " %d Nгo estб on.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }
pawn Код:
public KickLog(string[]) { new entry[256]; format(entry, sizeof(entry), "%s\n",string); new File:hFile; hFile = fopen("kick.log", io_append); fwrite(hFile, entry); fclose(hFile); }
|
Vlw cara, GF detected XD!
Re: [PEDIDO] Comando /kick dini -
Macintosh - 17.02.2011
Й Thug 2.3 kkkkkkk