16.04.2018, 20:30
Olб tenho uma "linha" que dб efeito no dialog do ban (quando a pessoa ta banida e vai logar) Sу que tentei colocar a data e o mesmo nгo funcionou. Na linha eu adicionei:
Porem a parte da data nгo funcionou,sу funcionou a do admin e o motivo,a data nгo.
Comando ban:
Obrigado a quem me ajudar! ^^
PHP код:
dUserSet(PlayerName2(player1)).("ban_admin",PlayerName2(playerid));
dUserSet(PlayerName2(player1)).("ban_motivo",params[2]);
dUserSet(PlayerName2(player1)).("ban_data",day,month,year,hour,minuite);
PHP код:
C:\Users\ata\Desktop\Minha GM\filterscripts\ladmin4v2.pwn(3998) : error 035: argument type mismatch (argument 3)
PHP код:
dcmd_ban(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1)
{
if(PlayerInfo[playerid][Level] >= 2)
{
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "| ERRO | Digite: /Ban [ID] [Motivo]");
if(!strlen(tmp2)) return SendClientMessage(playerid, red, "| ERRO | Coloque um Motivo!");
new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[800], string2[800];
player1 = strval(tmp);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) )
{
if(PlayerInfo[player1][Level] >= 1 && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"| ERRO | Vocк nгo pode banir um Admin!");
if(!IsNumeric(tmp)) return SendClientMessage(playerid,red,"| ERRO | ID invalido.");
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
new year,month,day,hour,minuite,second; getdate(year, month, day); gettime(hour,minuite,second);
CMDMessageToAdmins(playerid,"BAN");
format(string,sizeof(string),"| GNC-Admin | O(A) Administrador(a) %s baniu o(a) jogador(a) %s ( Motivo: %s )",adminname,playername,params[2],day,month,year,hour,minuite);
format(string2,sizeof(string2),"| BAN-LOG | O(A) Admin %s baniu o(a) jogador(a) %s Motivo: (%s)",adminname,playername,params[2],day,month,year,hour,minuite);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
SendClientMessageToAll(vermelho,string);
SaveToFile("BanLog",string2);
print(string);
if(udb_Exists(PlayerName2(player1)) && PlayerInfo[player1][LoggedIn] == 1) dUserSetINT(PlayerName2(player1)).("banned",1);
format(string,sizeof(string),"Banido pelo Administrador %s ( Motivo: %s )", adminname, params[2] );
BanNotify(player1);
dUserSet(PlayerName2(player1)).("ban_admin",PlayerName2(playerid));
dUserSet(PlayerName2(player1)).("ban_motivo",params[2]);
dUserSet(PlayerName2(player1)).("ban_data",day,month,year,hour,minuite);
return SetTimerEx("DelayedBan", 1000, false, "d", player1);
}
else return SendClientMessage(playerid, red, "| ERRO | Jogador(a) nгo conectado(a) ou й vocк mesmo ou admin de alto Nivel.");
}
else return SendClientMessage(playerid,red,"| ERRO | Comando Invalido! /Comandos");
}
else return SendClientMessage(playerid,red,"| ERRO | Voce deve estar logado para usar estes comandos");
}
forward DelayedBan(playerid);
public DelayedBan(playerid)
{
Kick(playerid);
Ban(playerid);
}