#include <a_samp>#include <dutils>#include <Dini>#if defined FILTERSCRIPT#define FILTERSCRIPT#define COLOR_GREEN 0x33AA33AA enum pInfo{ AdminLevel, level, cash, pw,}new PlayerInfo[MAX_PLAYERS][pInfo]; public OnFilterScriptInit(){print(\"\\n--------------------------------------\");print(\" Account System v0.1\");print(\"--------------------------------------\\n\");return 1;} public OnPlayerConnect(playerid){new name[MAX_PLAYER_NAME], file[128];GetPlayerName(playerid, name, MAX_PLAYER_NAME);format(file, sizeof(file), \"c:/Program Files/Rockstar Games/SA-MP Server/scriptfiles/Users/%s.ini\", name);if(!fexist(file)) {SendClientMessage(playerid, COLOR_GREEN, \"Még nem regisztráltál! Kérlek tedd meg!\");ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, \"Kérlek regisztrálj!\", \"Írd be a jelszavad!\", \"Register\", \"Cancel\");}else {new str[128];GetPlayerName(playerid, name, MAX_PLAYER_NAME);format(str, sizeof(str), \"Üdv újra! ~r~%s.\", name);SendClientMessage(playerid, COLOR_GREEN, str);ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, \"Jelentkezz be!\", \"Írd be a jelszavad!\", \"Login\", \"Cancel\");}return 1;} public OnPlayerDisconnect(playerid, reason){new file[128], name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, MAX_PLAYER_NAME);format(file, sizeof(file), \"c:/Program Files/Rockstar Games/SA-MP Server/scriptfiles/Users/%s.ini\", name);if(dini_Exists(file)) { dini_IntSet(file, \"pw\", PlayerInfo[playerid][pw]); dini_IntSet(file, \"AdminLevel\", PlayerInfo[playerid][AdminLevel]); dini_IntSet(file, \"cash\", PlayerInfo[playerid][cash]); dini_IntSet(file, \"level\", PlayerInfo[playerid][level]);}return 1;public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == 1){new file[128], name[MAX_PLAYER_NAME], str[128];GetPlayerName(playerid, name, MAX_PLAYER_NAME);format(file, sizeof(file), \"c:/Program Files/Rockstar Games/SA-MP Server/scriptfiles/Users/%s.ini\", name);if(response) { if(strlen(inputtext)) { dini_Create(file); dini_IntSet(file, \"pw\", num_hash(inputtext)); dini_IntSet(file, \"AdminLevel\", PlayerInfo[playerid][AdminLevel]); dini_IntSet(file, \"cash\", PlayerInfo[playerid][cash]); dini_IntSet(file, \"level\", PlayerInfo[playerid][level]); format(str, sizeof(str), \"You are registered as ~r~%s. Your password is ~r~%s. /changepass to change it\", name, inputtext);SendClientMessage(playerid, COLOR_SYSTEM, str);PlayerInfo[playerid][level] = dini_Int(file, \"level\");PlayerInfo[playerid][cash] = dini_Int(file, \"cash\");PlayerInfo[playerid][AdminLevel] = dini_Int(file, \"AdminLevel\"); }}else { Kick(playerid); }}if(dialogid == 2) {new file[128], name[MAX_PLAYER_NAME], str[128];GetPlayerName(playerid, name, MAX_PLAYER_NAME);format(str, sizeof(str), \"c:/Program Files/Rockstar Games/SA-MP Server/scriptfiles/Users/%s.ini\", name);if(response){if(strlen(inputtext)) {if(num_hash(inputtext) != dini_Int(file, \"pw\")) {SendClientMessage(playerid, COLOR_SYSTEM, \"Rossz jelszó!\");ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, \"Jelentkezz be!\", \"Írd be a jelszavad!\", \"Login\", \"Cancel\");}else {SendClientMessage(playerid, COLOR_SYSTEM, \"Sikeresen bejelentkeztél!\");PlayerInfo[playerid][level] = dini_Int(file, \"level\");PlayerInfo[playerid][cash] = dini_Int(file, \"cash\");GivePlayerMoney(playerid, dini_Int(file, \"cash\"));PlayerInfo[playerid][AdminLevel] = dini_Int(file, \"AdminLevel\"); }}}else { Kick(playerid); }public OnPlayerCommandText(playerid, cmdtext[]){return 0;} public OnFilterScriptExit(){ print(\"\\n----------------------------------\");print(\" Account System v0.1\");print(\"----------------------------------\\n\");return 1;} #endif
#if defined FILTERSCRIPT#define FILTERSCRIPT
:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(76) : warning 225: unreachable codeC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(76) : error 029: invalid expression, assumed zeroC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(76) : error 004: function \"OnDialogResponse\" is not implementedC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(78) : error 017: undefined symbol \"dialogid\"C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(80) : warning 219: local variable \"file\" shadows a variable at a preceding levelC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(80) : warning 219: local variable \"name\" shadows a variable at a preceding levelC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(84) : error 017: undefined symbol \"dialogid\"C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(85) : warning 219: local variable \"file\" shadows a variable at a preceding levelC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(85) : warning 219: local variable \"name\" shadows a variable at a preceding levelC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(85) : warning 219: local variable \"str\" shadows a variable at a preceding levelC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(88) : error 017: undefined symbol \"response\"C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(89) : error 017: undefined symbol \"inputtext\"C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(91) : error 017: undefined symbol \"inputtext\"C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(95) : error 017: undefined symbol \"inputtext\"C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(96) : warning 217: loose indentationC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(96) : error 017: undefined symbol \"COLOR_SYSTEM\"C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(107) : error 017: undefined symbol \"dialogid\"C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(108) : warning 219: local variable \"file\" shadows a variable at a preceding levelC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(108) : warning 219: local variable \"name\" shadows a variable at a preceding levelC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(108) : warning 219: local variable \"str\" shadows a variable at a preceding levelC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(110) : error 037: invalid string (possibly non-terminated string)C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(110) : warning 215: expression has no effectC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(110) : warning 215: expression has no effectC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(110) : error 001: expected token: \";\", but found \")\"C:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(110) : error 029: invalid expression, assumed zeroC:\\Program Files\\Rockstar Games\\SA-MP Server\\accsys.pwn(110) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 14 Errors.