28.08.2017, 13:37
Olб! eu tenho um bantemp porem ele sу da banimento por horas,alguйm poderia me ajudar a converter para dias?
Grato!!!!!!!!!!
cmd:
Grato!!!!!!!!!!
cmd:
PHP код:
dcmd_tempban(playerid,params[]) {
if(PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid,red,"| ERRO | Comando Inexistente. ");
new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index), tmp3 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "| ERRO | Digite: /tempban [ID] [Horas] [Motivo]");
new string[128];
new player,horas;
player = strval(tmp);
horas = strval(tmp2);
if(PlayerInfo[player][LoggedIn] != 1) return SendClientMessage(playerid, red, "| ERRO | Jogador(a) nгo Logado!");
if(!IsPlayerConnected(player)) return SendClientMessage(playerid, red, "| ERRO | Jogador(a) nгo Conectado(a)!");
if(horas > 360) return SendClientMessage(playerid, red, "| ERRO | Mбximo de horas: 360");
if(horas <= 0) return SendClientMessage(playerid, red, "| ERRO | Mнnimo de horas: 1");
if(!strlen(params[4])) return SendClientMessage(playerid, red, "| ERRO | Coloque um Motivo!");
CMDMessageToAdmins(playerid,"TEMPBAN");
new year,month,day,hour,minuite,second; getdate(year, month, day); gettime(hour,minuite,second);
new playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
GetPlayerName(player, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
new string2[100],string3[100];
format(string,sizeof(string),"| BvD-Admin | O(A) Administrador(a) %s baniu o(a) jogador(a) %s Por %i Hora(s) Pelo ( Motivo: %s )",adminname,playername,horas,params[strlen(tmp)+strlen(tmp2)+1],day,month,year,hour,minuite);
format(string3,sizeof(string3),"| BAN | Vocк foi banido temporariamente Pelo ( Motivo: %s )",params[4]);
format(string2,sizeof(string2),"| BAN | Sua conta serб desbanida automaticamente em %i hora(s)",horas);
SendClientMessageToAll(red,string);
SaveToFile("BanLog",string);
dUserSetINT(PlayerName2(player)).("tmpb",1);
dUserSetINT(PlayerName2(player)).("tmpbs",HourTimeStamp);
dUserSetINT(PlayerName2(player)).("tmpbh",horas);
SendClientMessage(player,COLOR_WHITE, "| BAN | Vocк acaba de ser banido temporariamente do Servidor!");
SendClientMessage(player,COLOR_WHITE, string3);
SendClientMessage(player,COLOR_WHITE, string2);
SendClientMessage(player,COLOR_WHITE, "| BAN | Caso tenha achado errado a atitude do admin,crie revisгo em nosso Fуrum.");
SendClientMessage(player,COLOR_WHITE, "| BAN | Fуrum: www.ServerBvD.Forumeiros.com");
Kick(player);
return 1;
}