// This is a comment// uncomment the line below if you want to write a filterscript//#define FILTERSCRIPT#include <a_samp>#include <Dini>#include <fixchars>#include <foreach>#include <OPVD>#include <Streamer>#include <sscanf2>#include <zcmd>#include <YSI\\y_ini>#define DIALOG_REGEL 1 //DIALOG_REGISTER#define DIALOG_BELEP 2 //DIALOG_LOGIN#define DIALOG_SIKERES_1 3 //DIALOG_SUCCESS_1#define DIALOG_SIKERES_2 4 //DIALOG_SUCCESS_2//============ SZÍNEK ==================#define NARANCS 0xff8c00AA#define PIROS 0xFF0000AA#define ZOLD 0x33AA33AA#define LILA 0xC2A2DAAA#define CITROM 0xFFFF00AA#define FONTOS 0x007bffAA#define UZENET 0x5de8e1AA#define RADIO 0x5ccdf2AA#define KEK 0x1373C1FF#define SOTETKEK 0x0000FFFF#define VILAGOSKEK 0x2BCDFDFF#define SOTETZOLD 0x008000FF#define VILAGOSZOLD 0x00FF00FF#define ROZSASZIN 0xFF00FFFF#define AQUA 0x00FFFFFF#define FEKETE 0x000000FF#define FEHER 0xFFFFFFFF#define SZURKE 0x808080FF#define BORDO 0x800000FF//===================#define PATH \"/Felhasznalok/%s.ini\"main(){}enum pInfo{ pJelszo, pPenz, pAdmin, pDriftPont, pDMPont, pSkin}new PlayerInfo[MAX_PLAYERS][pInfo];stock UserPath(playerid){ new string[128],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); return string;}stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1;}forward LoadUser_data(playerid,name[],value[]);public LoadUser_data(playerid,name[],value[]){ INI_Int(\"Jelszo\",PlayerInfo[playerid][pJelszo]); INI_Int(\"Penz\",PlayerInfo[playerid][pPenz]); INI_Int(\"Admin\",PlayerInfo[playerid][pAdmin]); INI_Int(\"DriftPont\",PlayerInfo[playerid][pDriftPont]); INI_Int(\"DMPont\",PlayerInfo[playerid][pDMPont]); INI_Int(\"Skin\",PlayerInfo[playerid][pSkin]); return 1;}public OnGameModeInit(){SetGameModeText(\"LAN v1.0\");return 1;}public OnGameModeExit(){return 1;}public OnPlayerRequestClass(playerid, classid){return 1;}public OnPlayerConnect(playerid){ if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), \"LoadUser_%s\", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid, DIALOG_BELEP, DIALOG_STYLE_INPUT,\"\"FEHER\"Belépés\",\"\"FEHER\"Írd be a jelszavad a belépéshez!\",\"Belépés\",\"Kilépés\"); } else { ShowPlayerDialog(playerid, DIALOG_REGEL, DIALOG_STYLE_INPUT,\"\"FEHER\"Regisztráció...\",\"\"FEHER\"Írj be egy jelszót a regisztrációhoz.\",\"Regisztráció\",\"Kilép\"); } return 1;}public OnPlayerDisconnect(playerid, reason){ new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,\"data\"); INI_WriteInt(File,\"Penz\",GetPlayerMoney(playerid)); INI_WriteInt(File,\"Admin\",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,\"DriftPont\",PlayerInfo[playerid][pDriftPont]); INI_WriteInt(File,\"DMPont\",PlayerInfo[playerid][pDMPont]); INI_WriteInt(File,\"Skin\",PlayerInfo[playerid][pSkin]); INI_Close(File); return 1;}public OnPlayerSpawn(playerid){return 1;}public OnPlayerDeath(playerid, killerid, reason){ return 1;}public OnVehicleSpawn(vehicleid){return 1;}public OnVehicleDeath(vehicleid, killerid){return 1;}public OnPlayerText(playerid, text[]){return 1;}public OnPlayerCommandText(playerid, cmdtext[]){return 1;}public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){return 1;}public OnPlayerExitVehicle(playerid, vehicleid){return 1;}public OnPlayerStateChange(playerid, newstate, oldstate){return 1;}public OnPlayerEnterCheckpoint(playerid){return 1;}public OnPlayerLeaveCheckpoint(playerid){return 1;}public OnPlayerEnterRaceCheckpoint(playerid){return 1;}public OnPlayerLeaveRaceCheckpoint(playerid){return 1;}public OnRconCommand(cmd[]){return 1;}public OnPlayerRequestSpawn(playerid){return 1;}public OnObjectMoved(objectid){return 1;}public OnPlayerObjectMoved(playerid, objectid){return 1;}public OnPlayerPickUpPickup(playerid, pickupid){return 1;}public OnVehicleMod(playerid, vehicleid, componentid){return 1;}public OnVehiclePaintjob(playerid, vehicleid, paintjobid){return 1;}public OnVehicleRespray(playerid, vehicleid, color1, color2){return 1;}public OnPlayerSelectedMenuRow(playerid, row){return 1;}public OnPlayerExitedMenu(playerid){return 1;}public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid){return 1;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){return 1;}public OnRconLoginAttempt(ip[], password[], success){return 1;}public OnPlayerUpdate(playerid){return 1;}public OnPlayerStreamIn(playerid, forplayerid){return 1;}public OnPlayerStreamOut(playerid, forplayerid){return 1;}public OnVehicleStreamIn(vehicleid, forplayerid){return 1;}public OnVehicleStreamOut(vehicleid, forplayerid){return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ switch( dialogid ) { case DIALOG_REGEL: { if (!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGEL, DIALOG_STYLE_INPUT, \"\"FEHER\"Regisztráció...\",\"\"PIROS\"Rossz jelszót írtál be!\\n\"FEHER\"Írj be egy jelszót a regisztrációhoz.\",\"Regisztráció\",\"Kilép\"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,\"data\"); INI_WriteInt(File,\"Jelszo\",udb_hash(inputtext)); INI_WriteInt(File,\"Penz\",0); INI_WriteInt(File,\"Admin\",0); INI_WriteInt(File,\"DriftPont\",0); INI_WriteInt(File,\"DMPont\",0); INI_WriteInt(File,\"Skin\",1); INI_Close(File); SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); ShowPlayerDialog(playerid, DIALOG_SIKERES_1, DIALOG_STYLE_MSGBOX,\"\"FEHER\"Sikeres!\",\"\"COL_GREEN\"Sikeresen regisztráltál! Lépj be újra, hogy elmentsd a statod!\",\"Ok\",\"\"); } } case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { if(udb_hash(inputtext) == PlayerInfo[playerid][pJelszo]) { INI_ParseFile(UserPath(playerid), \"LoadUser_%s\", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pPenz]); ShowPlayerDialog(playerid, DIALOG_SIKERES_2, DIALOG_STYLE_MSGBOX,\"\"FEHER\"Sikeres!\",\"\"ZOLD\"Sikeresen beléptél!\",\"Ok\",\"\"); } else { ShowPlayerDialog(playerid, DIALOG_BELEP, DIALOG_STYLE_INPUT,\"\"FEHER\"Belépés\",\"\"PIROS\"Rossz jelszót írtál be.\\n\"FEHER\"Írd be a jelszavad a belépéshez.\",\"Belép\",\"Kilép\"); } return 1; } } } return 1;}public OnPlayerClickPlayer(playerid, clickedplayerid, source){return 1;}//=========================================
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #include <Dini> #include <fixchars> #include <foreach> #include <OPVD> #include <Streamer> #include <sscanf2> #include <zcmd> #include <YSI\\y_ini> #define DIALOG_REGEL 1 //DIALOG_REGISTER #define DIALOG_BELEP 2 //DIALOG_LOGIN #define DIALOG_SIKERES_1 3 //DIALOG_SUCCESS_1 #define DIALOG_SIKERES_2 4 //DIALOG_SUCCESS_2 //============ SZÍNEK ================== #define NARANCS 0xff8c00AA #define PIROS 0xFF0000AA #define ZOLD 0x33AA33AA #define LILA 0xC2A2DAAA #define CITROM 0xFFFF00AA #define FONTOS 0x007bffAA #define UZENET 0x5de8e1AA #define RADIO 0x5ccdf2AA #define KEK 0x1373C1FF #define SOTETKEK 0x0000FFFF #define VILAGOSKEK 0x2BCDFDFF #define SOTETZOLD 0x008000FF #define VILAGOSZOLD 0x00FF00FF #define ROZSASZIN 0xFF00FFFF #define AQUA 0x00FFFFFF #define FEKETE 0x000000FF #define FEHER 0xFFFFFFFF #define SZURKE 0x808080FF #define BORDO 0x800000FF //=================== #define PATH \"/Felhasznalok/%s.ini\" main() { } enum pInfo { pJelszo, pPenz, pAdmin, pDriftPont, pDMPont, pSkin } new PlayerInfo[MAX_PLAYERS][pInfo]; stock UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); return string; } stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; } forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int(\"Jelszo\",PlayerInfo[playerid][pJelszo]); INI_Int(\"Penz\",PlayerInfo[playerid][pPenz]); INI_Int(\"Admin\",PlayerInfo[playerid][pAdmin]); INI_Int(\"DriftPont\",PlayerInfo[playerid][pDriftPont]); INI_Int(\"DMPont\",PlayerInfo[playerid][pDMPont]); INI_Int(\"Skin\",PlayerInfo[playerid][pSkin]); return 1; } public OnGameModeInit() { SetGameModeText(\"LAN v1.0\"); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { return 1; } public OnPlayerConnect(playerid) { if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), \"LoadUser_%s\", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid, DIALOG_BELEP, DIALOG_STYLE_INPUT,\"FEHER\"Belépés\",\"\"FEHER\"Írd be a jelszavad a belépéshez!\",\"Belépés\",\"Kilépés\"); } else { ShowPlayerDialog(playerid, DIALOG_REGEL, DIALOG_STYLE_INPUT,\"FEHER\"Regisztráció...\",\"\"FEHER\"Írj be egy jelszót a regisztrációhoz.\",\"Regisztráció\",\"Kilép\"); } return 1; } public OnPlayerDisconnect(playerid, reason) { new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,\"data\"); INI_WriteInt(File,\"Penz\",GetPlayerMoney(playerid)); INI_WriteInt(File,\"Admin\",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,\"DriftPont\",PlayerInfo[playerid][pDriftPont]); INI_WriteInt(File,\"DMPont\",PlayerInfo[playerid][pDMPont]); INI_WriteInt(File,\"Skin\",PlayerInfo[playerid][pSkin]); INI_Close(File); return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch( dialogid ) { case DIALOG_REGEL: { if (!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGEL, DIALOG_STYLE_INPUT, \"\"FEHER\"Regisztráció...\",\"\"PIROS\"Rossz jelszót írtál be!\\n\"FEHER\"Írj be egy jelszót a regisztrációhoz.\",\"Regisztráció\",\"Kilép\"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,\"data\"); INI_WriteInt(File,\"Jelszo\",udb_hash(inputtext)); INI_WriteInt(File,\"Penz\",0); INI_WriteInt(File,\"Admin\",0); INI_WriteInt(File,\"DriftPont\",0); INI_WriteInt(File,\"DMPont\",0); INI_WriteInt(File,\"Skin\",1); INI_Close(File); SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); ShowPlayerDialog(playerid, DIALOG_SIKERES_1, DIALOG_STYLE_MSGBOX,\"\"FEHER\"Sikeres!\",\"\"COL_GREEN\"Sikeresen regisztráltál! Lépj be újra, hogy elmentsd a statod!\",\"Ok\",\"\"); } } case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { if(udb_hash(inputtext) == PlayerInfo[playerid][pJelszo]) { INI_ParseFile(UserPath(playerid), \"LoadUser_%s\", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pPenz]); ShowPlayerDialog(playerid, DIALOG_SIKERES_2, DIALOG_STYLE_MSGBOX,\"\"FEHER\"Sikeres!\",\"\"ZOLD\"Sikeresen beléptél!\",\"Ok\",\"\"); } else { ShowPlayerDialog(playerid, DIALOG_BELEP, DIALOG_STYLE_INPUT,\"\"FEHER\"Belépés\",\"\"PIROS\"Rossz jelszót írtál be.\\n\"FEHER\"Írd be a jelszavad a belépéshez.\",\"Belép\",\"Kilép\"); } return 1; } } } return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } //=========================================
C:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : error 001: expected token: \"-string end-\", but found \"-identifier-\"C:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : error 017: undefined symbol \"Bel\"C:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : error 029: invalid expression, assumed zeroC:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase4 Errors.Tiedre ez a hibaüzenet
new Bel;
ShowPlayerDialog(playerid, DIALOG_BELEP, DIALOG_STYLE_INPUT,\"\"FEHER\"Belépés\",\"\"FEHER\"Írd be a jelszavad a belépéshez!\",\"Belépés\",\"Kilépés\");
\"\"FEHER\"Belépés\",\"\"FEHER\"Írd be a jelszavad a belépéshez!\"
\" post=\"418135\" timestamp=\"1366922564\"]C:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : error 001: expected token: \"-string end-\", but found \"-identifier-\"C:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : error 017: undefined symbol \"Bel\"C:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : error 029: invalid expression, assumed zeroC:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase4 Errors.Tiedre ez a hibaüzenet [/quote]Mod elejéhez new Bel; 112.sort másold be ide! [/quote]Létezõ legrosszabb megoldás a problémára.
C:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : error 001: expected token: \"-string end-\", but found \"-identifier-\"C:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : error 017: undefined symbol \"Bel\"C:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : error 029: invalid expression, assumed zeroC:\\Documents and Settings\\Valaki\\Asztal\\Szerver\\Szerver\\gamemodes\\asd.pwn(112) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase4 Errors.Tiedre ez a hibaüzenet [/quote]Mod elejéhez new Bel; 112.sort másold be ide! [/quote]Létezõ legrosszabb megoldás a problémára.