[DUVIDA] Como fazer isso? -
matheuzinho - 13.09.2010
Bom, eu queria colocar no meu servidor algo como uma lista negra, que quando o player entrasse, nгo desse pra conectar. Mas nгo quero da forma de colocar no GM, quero do modo de digitar /listanegra NICK e ele fosse pra essa lista. Provavelmente vai ter que ser por dini, mas como nгo sei usar dini, queria uma ajuda de vocкs. Abraзos e obrigado desde jб ^^
Re: [DUVIDA] Como fazer isso? -
sergio_xd - 13.09.2010
no public OnPlayerCommandText(playerid, cmdtext[])
pawn Код:
//
if(strcmp(cmd,"/listanegra",true)==0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)//bani
{
new file[300];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GRAD1,"USE: /listanegra [Nick]");
return 1;
}
format(file, sizeof(file), "/listaN/%s.ini", tmp);
if(!fexist(file))
{
dini_Create(file);
Kick(tmp);
SendClientMessage(playerid,COLOR_GRAD1,"Jogador banido com sucesso");
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"Este nick ja esta em nossa lista negra!!!");
}
}
return 1;
}
if(strcmp(cmd,"/tirardalistaN",true)==0)//desbani
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
new file[300];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GRAD1,"USE: /tirardalistaN [Nick]");
return 1;
}
format(file, sizeof(file), "/listaN/%s.ini", tmp);
if(dini_Exists(file))
{
dini_Remove(file);
SendClientMessage(playerid,COLOR_GRAD1,"Retirado da lista negra com sucesso!!!");
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"Esta conta nгo Esta na lista negra!!!");
}
}
return 1;
}
agora no public OnPlayerConnect(playerid)
pawn Код:
//
new Baname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Baname, sizeof(Baname));
new Banstring2[128];
format(Banstring2, sizeof(Banstring2), "/listaN/%s.ini", Baname);
if(fexist(Banstring2))
{
Toban[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTRED,"Esta Conta Esta em nossa lista negra, Por isso vocк foi kikado.");
Kick(playerid);
}
espero ter ajudado
ps: tem que criar a pasta
listaN dentro da pasta scriptfiles.
@ edit:
Baixem e instalem os incluides que eu coloquei disponнvel no post.
post atualizado:
http://forum.sa-mp.com/showpost.php?...2&postcount=15
Re: [DUVIDA] Como fazer isso? -
matheuzinho - 13.09.2010
valeeu!!!!!
valeuzaзo! vou testar!
Re: [DUVIDA] Como fazer isso? -
Kasura - 13.09.2010
se funcionar avisa pois gostei tbm desse comando
Re: [DUVIDA] Como fazer isso? -
matheuzinho - 13.09.2010
ta dando que dini_create e as outras funзхes nao tao definidas... preciso de alguma include?
Re: [DUVIDA] Como fazer isso? -
zSuYaNw - 13.09.2010
Quote:
Originally Posted by [GangstA]Kasura
se funcionar avisa pois gostei tbm desse comando
|
Lolz eu tambem gostei do comando
Re: [DUVIDA] Como fazer isso? -
Kasura - 13.09.2010
include dini... talvez dudb tbm
Re: [DUVIDA] Como fazer isso? -
matheuzinho - 13.09.2010
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(129

: error 021: symbol already defined: "Time"
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(5485) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(5486) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(5487) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(548

: error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(9157) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(10460) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(1420

: error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(17054) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(17069) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(20536) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(25341) : warning 219: local variable "mod" shadows a variable at a preceding level
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(32555) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Matheus\Meus documentos\Matheus\Eliteb\Eliteb\gamemodes\EliteNE W2.pwn(52821) : warning 203: symbol is never used: "ret_memcpy"
nгo tenho a include dudb... alguem pode botar no pastebin pra mim?
deu conflito com meu gm, rs
talvez seja a falta dessa include!
Re: [DUVIDA] Como fazer isso? -
Kasura - 13.09.2010
nгo precisa do dudb sу dini
Re: [DUVIDA] Como fazer isso? -
[NWD]Jim._.Carrey - 13.09.2010
Bom de mais, o fim estб proximo de da restart no modem e voltar XITERS FD............!!!