info ban -
Netiinho - 01.03.2014
ola amigos queria pedir uma ajuda quem pode mim aruma um codigo info ban
Exemplo:
Ban Info
Nick: Zica
Hora: 3:38 01/03/2014
motivo: Cheats
se vc acha que foi banido injustamente tire SS /Forum
Alguem me ajuda?
Re: info ban -
Stroon - 01.03.2014
Bom peguei do game mod que estou editando, Pegue de exemplo e tente adapitar para seu game mod!
pawn Код:
CMD:ban(playerid, params[])
{
if(IsPlayerAdmin(playerid)) {
new id = strval(params);
new PID;
new reason[64];
new str[128];
if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_ERRO, "- ERRO - /Ban |[ID] [Motivo]");
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
new pname[MAX_PLAYER_NAME];
GetPlayerName(PID, pname, MAX_PLAYER_NAME);
if(!IsPlayerConnected(PID))
return SendClientMessage(playerid,COLOR_ERRO, "- ERRO - Player nгo conectado!");
new year, month,day;
getdate(year, month, day);
new string[200];
format(string, sizeof(string), "[Server] O Administrador %s baniu o jogador %s motivo: %s [Data: %d/%d/%d]", aname, pname,reason,day,month,year);
BanLog(string);
format(str, sizeof(str), "[Server] O administrador %s baniu o jogador %s (Motivo: %s) ", aname,pname, reason);
SendClientMessageToAll(COLOR_ADM, str);
format(str, sizeof(str), "[Server] Banido Motivo: %s", reason);
SendClientMessage(id,-1, str);
SendClientMessage(id,-1,"* Se vocк acha que foi banido injustamente, Vб atй nosso fуrum e se justifique-se!");
SendClientMessage(id,-1,"* Fуrum://Link do seu fуrum <<");
Ban(PID);
dini_IntSet("banidos.ini",pname,1);
}
else
{
SendClientMessage(playerid, COLOR_ERRO, "- ERRO - Vocк nгo й um administrador!");
}
return 1;
}
Re: info ban -
Netiinho - 01.03.2014
Quote:
Originally Posted by Stroon
Bom peguei do game mod que estou editando, Pegue de exemplo e tente adapitar para seu game mod!
pawn Код:
CMD:ban(playerid, params[]) { if(IsPlayerAdmin(playerid)) { new id = strval(params); new PID; new reason[64]; new str[128]; if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_ERRO, "- ERRO - /Ban |[ID] [Motivo]"); new aname[MAX_PLAYER_NAME]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); new pname[MAX_PLAYER_NAME]; GetPlayerName(PID, pname, MAX_PLAYER_NAME); if(!IsPlayerConnected(PID)) return SendClientMessage(playerid,COLOR_ERRO, "- ERRO - Player nгo conectado!"); new year, month,day; getdate(year, month, day); new string[200]; format(string, sizeof(string), "[Server] O Administrador %s baniu o jogador %s motivo: %s [Data: %d/%d/%d]", aname, pname,reason,day,month,year); BanLog(string); format(str, sizeof(str), "[Server] O administrador %s baniu o jogador %s (Motivo: %s) ", aname,pname, reason); SendClientMessageToAll(COLOR_ADM, str); format(str, sizeof(str), "[Server] Banido Motivo: %s", reason); SendClientMessage(id,-1, str); SendClientMessage(id,-1,"* Se vocк acha que foi banido injustamente, Vб atй nosso fуrum e se justifique-se!"); SendClientMessage(id,-1,"* Fуrum://Link do seu fуrum <<");
Ban(PID); dini_IntSet("banidos.ini",pname,1);
} else { SendClientMessage(playerid, COLOR_ERRO, "- ERRO - Vocк nгo й um administrador!"); } return 1; }
|
eu tenho isso aki ver
Код:
if(strcmp("/ban", cmd, true) == 0)
{
if(pAdmin[playerid] > 1 || Helper[playerid] == 1)
{
new plid, motivo[64];
if(sscanf(cmdtext, "s[5]us[64]", cmd, plid, motivo))
{
SendClientMessage(playerid, Cinza, "Use: /ban [id] [motivo]");
return 1;
}
if(IsPlayerConnected(plid))
{
if(IsPlayerNPC(plid))
{
SendClientMessage(playerid, Vermelho, "Vocк nгo pode fazer isso com um NPC.");
return 1;
}
ClearChatbox(plid, 3);
VBanID(playerid, plid, motivo);
}
else
{
SendClientMessage(playerid, Vermelho, "Valor invбlido, tente novamente!");
}
}
else
{
SendClientMessage(playerid, Vermelho, "Vocк nгo tem permissгo.");
}
return 1;
}
mais eu queria assim tipo quando o player ta logando ele coloca o login ai em vez do player banido coloca login ele vai ver o info ban delle poderia mimm ajuda?
Re: info ban -
Input - 01.03.2014
Cara, procura sobre salvamento de dados e usa as funзхes de getar (da sua include de salvamento), format e ShowPlayerDialog..
Tutoriais sobre salvamento:
https://sampforum.blast.hk/showthread.php?tid=497801
Re: info ban -
Stroon - 01.03.2014
Desculpe meu caro mais eu nгo conseguir entender sua pergunta, Poderia especificar mais?
Re: info ban -
Netiinho - 01.03.2014
Quote:
Originally Posted by Stroon
Desculpe meu caro mais eu nгo conseguir entender sua pergunta, Poderia especificar mais?
|
tipo: quando vc da ban em um player quando ele tenta loga num aparece isso ver
http://imgur.com/a/uWnMB#8Mjdk71
so que no meu nao aparece poderia ajuda nao intendo muito
Re: info ban -
Stroon - 01.03.2014
Nesse caso vocк tem que mexer no sistema de Dados do seu servidor, E saber criar a textDraw com as infos!
Coisa que ainda nгo manjo muito..
-
Eu prefiro assim!
pawn Код:
if(dini_Int("banidos.ini",aname) == 1)
{
SendClientMessage(playerid, -1, "- ERRO - Vocк foi impedido de logar pois sua conta estб Banida!)");
new sstring[200];
SendClientMessage(playerid, -1, "* Tire uma Print Screen e justifique-se em nosso Fуrum: > Seu fуrum <)");
new sstring[200];
Ban(playerid);
return 1;
}
Re : info ban -
davi54723 - 01.03.2014
1є Qual sistema de salvamento vocк usa ?
2є Jб procurou estudar ela ?
3є Procure Game-Modes na internet, e estude os sistema de salvamento deles, e tente fazer para o seu, se tiver dъvidas recorra ao fуrum,