01.09.2013, 18:04
Ola galera Boa Tarde O Meu /banirip Nao esta banindo ip alguem poderia me ajudar a resolver?
PHP код:
if(strcmp(cmd, "/banirip", true) == 0) {
if(GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"Admin: Vocк nгo tem Nivel Necessбrio para usar este comando");
new Hours,Minutes,Seconds,Days,Months,Years;
gettime(Hours, Minutes, Seconds);getdate(Years, Months, Days);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0x007FFFAA, "USE: /banirip [playerid] [motivo]");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')) {
idx++;
}
new offset = idx;
new reason[64];
while ((idx < length) && ((idx - offset) < (sizeof(reason) - 1))) {
reason[idx - offset] = cmdtext[idx];
idx++;
}
reason[idx - offset] = EOS;
new playa = strval(tmp);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, NomePlayer, sizeof(NomePlayer));
format(string, sizeof(string), "*Admin: %s foi Banido pelo %s. Motivo: %s",giveplayer ,NomePlayer, reason);
SendClientMessageToAll(0x007FFFAA, string);
SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
format(string, sizeof(string), "Vocк foi pego.O admin baniu vocк: %s", NomePlayer);
SendClientMessage(playa,0x007FFFAA, string);
format(string, sizeof(string),"Motivo: %s ", reason);
SendClientMessage(playa,0x007FFFAA, string);
format(string, sizeof(string), "Data: %d/%d/%d", Days,Months,Years);
SendClientMessage(playa,0x007FFFAA,string);
format(string, sizeof(string), "Hora %d:%d:%d",Hours,Minutes,Seconds);
SendClientMessage(playa,0x007FFFAA,string);
SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
Ban(playa);
return 1;
}