#include <a_samp>#include <dini>#include <dudb>main(){ print(\"\\n----------------------------------\"); print(\" Blank Gamemode by your name here\"); print(\"----------------------------------\\n\");}#define regisztracio 0#define bejelentkezes 1#define nem 3#define HIBA 0xFF0000FF#define KEK 0x00ccffAAnew nev[MAX_PLAYER_NAME];enum JatekosAdatok{ Float:X, Float:Y, Float:Z, Float:Angle, Skin, Penz,}new JatekosInfo[MAX_PLAYERS][JatekosAdatok];public OnGameModeInit(){ // Don\'t use these lines if it\'s a filterscript SetGameModeText(\"Blank Script\"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1;}public OnGameModeExit(){ return 1;}public OnPlayerRequestClass(playerid, classid){ SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1;}public OnPlayerConnect(playerid){ new file[256]; SetSpawnInfo(playerid,0,0,2269.4287,-75.1134,26.7724,178.8719,0,0,0,0,0,0); SpawnPlayer(playerid); GetPlayerName(playerid,nev,sizeof(nev)); format(file,sizeof(file),\"/Karakterek/%s.ini\",nev); new string[256]; if(!fexist(file)) { format(string, sizeof string, \"Üdv %s! \\nKérjük regisztrálj! \\n\\nAdd meg a kívánt jelszavadat!\", nev); ShowPlayerDialog(playerid, regisztracio, DIALOG_STYLE_INPUT, \"Regisztráció\", string, \"Regisztráció\", \"\"); } if(fexist(file)) { format(string, sizeof string, \"Üdv %s! \\nKérjük jelentkezz be! \\n\\nÍrd be a jelszavadat!\", nev); ShowPlayerDialog(playerid, bejelentkezes, DIALOG_STYLE_INPUT, \"Bejelentkezés\", string, \"Belépés\", \"\"); } return 1;}public OnPlayerDisconnect(playerid, reason){ new file[128]; new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); JatekosInfo[playerid][X] = x; JatekosInfo[playerid][Y] = y; JatekosInfo[playerid][Z] = z; GetPlayerFacingAngle(playerid,JatekosInfo[playerid][Angle]); JatekosInfo[playerid][skin] = GetPlayerSkin(playerid); JatekosInfo[playerid][Penz] = GetPlayerMoney(playerid); format(file,sizeof(file),\"/Karakterek/%s.ini\",nev); if(fexist(file)) { dini_FloatSet(file,\"X\",JatekosInfo[playerid][X]); dini_FloatSet(file,\"Y\",JatekosInfo[playerid][Y]); dini_FloatSet(file,\"Z\",JatekosInfo[playerid][Z]); dini_FloatSet(file,\"Latoszog\",JatekosInfo[playerid][Angle]); dini_IntSet(file,\"Skin\",JatekosInfo[playerid][skin]); dini_IntSet(file,\"Penz\",JatekosInfo[playerid][Penz]); } 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[]){ if (strcmp(\"/mycommand\", cmdtext, true, 10) == 0) { // Do something here return 1; } return 0;}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[]){ if (dialogid == regisztracio) { if(response) { new file[128]; new string[128]; GetPlayerName(playerid, nev, sizeof(nev)); if(strlen(inputtext) == 0) { format(string, sizeof string, \"Üdv %s! \\nKérjük regisztrálj! \\n\\nAdd meg a kívánt jelszavadat!\", nev); ShowPlayerDialog(playerid, regisztracio, DIALOG_STYLE_INPUT, \"Regisztráció\", string, \"Regisztráció\", \"\"); return 0; } format(file,sizeof(file),\"/Karakterek/%s.ini\",nev); if(!fexist(file)) { dini_Create(file); dini_IntSet(file, \"Antibug\",0); dini_IntSet(file, \"Jelszo\",udb_hash(inputtext)); dini_IntSet(file,\"Skin\", 0); dini_IntSet(file,\"Penz\", 30); SpawnPlayer(playerid); ShowPlayerDialog(playerid,nem,DIALOG_STYLE_LIST,\"Regisztráció...\",\"Fiú\\nLány\",\"Folytat\",\"\"); } } } if(dialogid == nem) { if(response) { new file[128]; if(listitem == 0) { dini_IntSet(file,\"Nem\",1); SendClientMessage(playerid,KEK,\"Fiú lettél!\"); SetPlayerSkin(playerid,60); SetSpawnInfo(playerid,0,60,2269.4287,-75.1134,26.7724,178.8719,0,0,0,0,0,0); SpawnPlayer(playerid); } if(listitem == 1) { dini_IntSet(file,\"Nem\",2); SendClientMessage(playerid,KEK,\"Lány lettél!\"); SetPlayerSkin(playerid,233); SetSpawnInfo(playerid,0,233,2269.4287,-75.1134,26.7724,178.8719,0,0,0,0,0,0); SpawnPlayer(playerid); } } } if(dialogid == bejelentkezes) { if(response) { new file[128]; new string[128]; GetPlayerName(playerid, nev, sizeof(nev)); if(strlen(inputtext) == 0) { format(string, sizeof string, \"Üdv %s! \\nRegisztrálva vagy! \\n\\nÍrd be a jelszavadat!\", nev); ShowPlayerDialog(playerid, bejelentkezes, DIALOG_STYLE_INPUT, \"Bejelentkezés\", string, \"Belépés\", \"\"); return 0; } format(file,sizeof(file),\"/Karakterek/%s.ini\",nev); if(fexist(file)) { new jelszo = dini_Int(file, \"Jelszo\"); if(udb_hash(inputtext) == jelszo) { JatekosInfo[playerid][X] = dini_Float(file, \"X\"); JatekosInfo[playerid][Y] = dini_Float(file, \"Y\"); JatekosInfo[playerid][Z] = dini_Float(file, \"Z\"); JatekosInfo[playerid][Angle] = dini_Float(file, \"Latoszog\"); JatekosInfo[playerid][skin] = dini_Int(file,\"Skin\"); JatekosInfo[playerid][Penz] = dini_Int(file,\"Penz\"); SetPlayerSkin(playerid,JatekosInfo[playerid][skin]); GivePlayerMoney(playerid,JatekosInfo[playerid][Penz]); SetSpawnInfo(playerid,0,JatekosInfo[playerid][skin],JatekosInfo[playerid][X],JatekosInfo[playerid][Y],JatekosInfo[playerid][Z],JatekosInfo[playerid][Angle],0,0,0,0,0,0); SpawnPlayer(playerid); } else { format(string, sizeof string, \"Üdv %s! \\nRosz jelszo! \\n\\nÍrd be a helyes jelszavadat!\", nev); ShowPlayerDialog(playerid, bejelentkezes, DIALOG_STYLE_INPUT, \"Bejelentkezés\", string, \"Belépés\", \"\"); return 0; } } } } return 1;}public OnPlayerClickPlayer(playerid, clickedplayerid, source){ return 1;}
new bool:pBelepve[MAX_PLAYERS];
pBelepve[playerid] = true;
if(fexist(file) && pBelepve[playerid] == true)