[AJUDA]Salvar nнvel de procurado. -
Andy7 - 11.07.2011
Eai povo, Tipo eu to querendo que quando o player fique procurado ele relogue e continue com o nнvel de procurado, tentei por aqui mas nгo deu certo se souberem e poder me ajduar ai valeu .
Re: [AJUDA]Salvar nнvel de procurado. -
Shadoww5 - 11.07.2011
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
new str[50];
GetPlayerName(playerid, str, 24);
format(str, sizeof str, "/Jogadores/%s.txt", str);
if(!fexist(str)) { dini_Create(str); }
dini_IntSet(str, "Nivel de Procurado", GetPlayerWantedLevel(playerid));
return 1;
}
public OnPlayerConnect(playerid)
{
new str[50];
GetPlayerName(playerid, str, 24);
format(str, sizeof str, "/Jogadores/%s.txt", str);
if(fexist(str)) { SetPlayerWantedLevel(playerid, dini_Int(str, "Nivel de Procurado")); }
return 1;
}
OBS: Caso nгo crie a pasta Jogadores no diretorio scriptfiles, o codigo irб causar erros no teu servidor.
Re: [AJUDA]Salvar nнvel de procurado. -
Andy7 - 11.07.2011
Deu esses errors ai
pawn Код:
Gm.pwn(13441) : error 055: start of function body without function header
Gm.pwn(13443) : error 021: symbol already defined: "GetPlayerName"
Gm.pwn(13445) : error 010: invalid function or declaration
Gm.pwn(13446) : error 010: invalid function or declaration
Gm.pwn(14698) : error 055: start of function body without function header
Gm.pwn(14699) : error 021: symbol already defined: "str"
Gm.pwn(14702) : error 010: invalid function or declaration
Gm.pwn(14703) : error 021: symbol already defined: "dini_IntSet"
Gm.pwn(14703) : error 010: invalid function or declaration
Gm.pwn(14703 -- 14704) : error 010: invalid function or declaration
Gm.pwn(14703 -- 14704) : fatal error 107: too many error messages on one line
Linhas:
pawn Код:
{
new str[50];
GetPlayerName(playerid, str, 24);
format(str, sizeof str, "/Jogadores/%s.txt", str);
if(fexist(str)) { SetPlayerWantedLevel(playerid, dini_Int(str, "Nivel de Procurado")); }
return 1;
pawn Код:
{
new str[50];
GetPlayerName(playerid, str, 24);
format(str, sizeof str, "/Jogadores/%s.txt", str);
if(!fexist(str)) { dini_Create(str); }
dini_IntSet(str, "Nivel de Procurado", GetPlayerWantedLevel(playerid));
return 1;
E ja tenho a include Dini ;s
Re: [AJUDA]Salvar nнvel de procurado. -
Shadoww5 - 11.07.2011
Coloque isto no topo:
#EDIT
Rapaz .. Tenta isto, mas nгo sei se irб funcionar.
Й como se vocк tivesse usando a include Dini duas vezes, ou, por exemplo, tivesse colocado ela no seu GM.
Re: [AJUDA]Salvar nнvel de procurado. -
Andy7 - 11.07.2011
Ja coloquei a inc. na pasta e no inicio mas continua :f
@EDIT
Alguem ajuda ai ;x