#include <a_samp>#include <Dini>#include \"../include/gl_common.inc\"new szoveg1[128];new Fajl[256];new total_vehicles_from_files=0;enum pAdat{ pPenz, pSkin, pReg, Float:X, Float:Y, Float:Z, Float:Angle}new JatekosInfo[MAX_PLAYERS][pAdat];#define DIALOG_REGISTER 1#define DIALOG_LOGIN 2#define DIALOG_NEM 3#define KEK 0x00ccffAA#define ZOLD 0x43e85fAA#define FEHER 0xffffffAAmain(){print(\"\\n----------------------------------\");print(\" Blank Gamemode by your name here\");print(\"----------------------------------\\n\");}#pragma tabsize 0public OnGameModeInit(){SetGameModeText(\"Valos\");AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);// SPECIALtotal_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/trains.txt\");total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/pilots.txt\"); // LAS VENTURAS total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/lv_law.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/lv_airport.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/lv_gen.txt\"); // SAN FIERRO total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/sf_law.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/sf_airport.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/sf_gen.txt\"); // LOS SANTOS total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/ls_law.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/ls_airport.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/ls_gen_inner.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/ls_gen_outer.txt\"); // OTHER AREAS total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/whetstone.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/bone.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/flint.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/tierra.txt\"); total_vehicles_from_files += LoadStaticVehiclesFromFile(\"vehicles/red_county.txt\"); printf(\"Total vehicles from files: %d\",total_vehicles_from_files);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){ SetSpawnInfo(playerid,0,26,2269.4287,-75.1134,26.7724,178.8719,0,0,0,0,0,0); SpawnPlayer(playerid); format(Fajl,sizeof(Fajl),\"/Karakterek/%s.ini\",Neve(playerid)); format(szoveg1,sizeof(szoveg1),\"Üdvözöllek %s!\",Neve(playerid)); if(fexist(Fajl)) { ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,szoveg1,\"Ez a név már regisztrálva van!\\nKérlek jelentkezz be!\",\"Belép\",\"Kilép\"); } else { ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,szoveg1,\"Ez a név még nincsen regisztrálva!\\nKérlek regisztrálj!\",\"Regisztrál\",\"Kilép\"); } return 1;}public OnPlayerDisconnect(playerid, reason){ new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); JatekosInfo[playerid][X] = x; JatekosInfo[playerid][Y] = y; JatekosInfo[playerid][Z] = z; JatekosInfo[playerid][pPenz] = GetPlayerMoney(playerid); JatekosInfo[playerid][pSkin] = GetPlayerSkin(playerid); GetPlayerFacingAngle(playerid,JatekosInfo[playerid][Angle]); format(Fajl,sizeof(Fajl),\"/Karakterek/%s.ini\",Neve(playerid)); dini_IntSet(Fajl,\"Penz\",JatekosInfo[playerid][pPenz]); dini_IntSet(Fajl,\"Skin\",JatekosInfo[playerid][pSkin]); dini_FloatSet(Fajl,\"Latoszog\",JatekosInfo[playerid][Angle]); dini_FloatSet(Fajl,\"X\",Float:JatekosInfo[playerid][X]); dini_FloatSet(Fajl,\"Y\",Float:JatekosInfo[playerid][Y]); dini_FloatSet(Fajl,\"Z\",Float:JatekosInfo[playerid][Z]); 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 herereturn 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[]){ format(Fajl,sizeof(Fajl),\"/Karakterek/%s.ini\",Neve(playerid)); if(dialogid == DIALOG_REGISTER) { if(response) { dini_Create(Fajl); dini_Set(Fajl,\"Jelszo\",inputtext); dini_IntSet(Fajl,\"Penz\",30); dini_IntSet(Fajl,\"Skin\",0); SpawnPlayer(playerid); ShowPlayerDialog(playerid,DIALOG_NEM,DIALOG_STYLE_LIST,\"Regisztráció...\",\"Fiú\\nLány\",\"Folytat\",\"Kilép\"); } else { dini_Remove(Fajl); Kick(playerid); } } if(dialogid == DIALOG_NEM) { if(response) { if(listitem == 0) { dini_IntSet(Fajl,\"Nem\",1); SendClientMessage(playerid,KEK,\"Fiú lettél!\"); SetPlayerSkin(playerid,60); } if(listitem == 1) { dini_IntSet(Fajl,\"Nem\",2); SendClientMessage(playerid,KEK,\"Lány lettél!\"); SetPlayerSkin(playerid,233); } } else { dini_Remove(Fajl); Kick(playerid); } } if(dialogid == DIALOG_LOGIN) { if(response) { new jelszo[200]; format(jelszo, sizeof(jelszo), \"%s\", dini_Get(Fajl, \"Jelszo\")); if(strcmp(inputtext, jelszo) == 0) { JatekosInfo[playerid][pPenz] = dini_Int(Fajl, \"Penz\"); JatekosInfo[playerid][pSkin] = dini_Int(Fajl,\"Skin\"); JatekosInfo[playerid][Angle] = dini_Int(Fajl, \"posicio\"); JatekosInfo[playerid][Angle] = dini_Int(Fajl, \"Latoszog\"); JatekosInfo[playerid][X] = dini_Int(Fajl, \"X\"); JatekosInfo[playerid][Y] = dini_Int(Fajl, \"Y\"); JatekosInfo[playerid][Z] = dini_Int(Fajl, \"Z\"); SetPlayerSkin(playerid,JatekosInfo[playerid][pSkin]); SetPlayerColor(playerid,FEHER); SetSpawnInfo(playerid,0,JatekosInfo[playerid][pSkin],JatekosInfo[playerid][X],JatekosInfo[playerid][Y],JatekosInfo[playerid][Z],JatekosInfo[playerid][Angle],0,0,0,0,0,0); SpawnPlayer(playerid); GivePlayerMoney(playerid,JatekosInfo[playerid][pPenz]); SendClientMessage(playerid,KEK,\"Sikeresen Bejelentkeztél!\"); } else { ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,\"Bejelentkezõ Panel\",\"Rossz jelszó!\\nJelentkezz be!\",\"Oké\",\"Kilép\"); } } else { Kick(playerid); } } return 1;}public OnPlayerClickPlayer(playerid, clickedplayerid, source){return 1;}stock Neve(playerid){ new Nev[MAX_PLAYER_NAME]; GetPlayerName(playerid,Nev,sizeof(Nev)); return Nev;}
GivePlayerMoney(playerid,JatekosInfo[playerid][pPenz]);
SetPVarInt(playerid, \"NowLoogedIn\", 1);
if(GetPVarInt(playerid, \"NowLoogedIn\")) {SetPVarInt(playerid, \"NowLoogedIn\", 0);GivePlayerMoney(playerid,JatekosInfo[playerid][pPenz]);}
#include <a_samp>#include <dini>#include <dudb>#define regisztracio 0#define bejelentkezes 1#define HIBA 0xFF0000FFnew nev[MAX_PLAYER_NAME];enum JatekosAdatok{Skin,Penz,Float:X,Float:Y,Float:Z,}new JatekosInfo[MAX_PLAYERS][JatekosAdatok]; main(){print(\"\\n----------------------------------\");print(\" Blank Gamemode by your name here\");print(\"----------------------------------\\n\");} public OnGameModeInit(){// Don\'t use these lines if it\'s a filterscriptSetGameModeText(\"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];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ó\", \"Kilépés\");}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, \"Bejelentkezés\", \"Kilé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;GetPlayerName(playerid,nev,sizeof(nev));format(file,sizeof(file),\"/Karakterek/%s.ini\",nev);if(fexist(file)){ dini_IntSet(file,\"Skin\",JatekosInfo[playerid][skin]); dini_IntSet(file,\"Penz\",GetPlayerMoney(playerid));dini_FloatSet(file,\"X\",JatekosInfo[playerid][X]); dini_FloatSet(file,\"Y\",JatekosInfo[playerid][Y]); dini_FloatSet(file,\"Z\",JatekosInfo[playerid][Z]);}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 herereturn 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ó\", \"Kilépés\"); 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); }}}if(dialogid == bejelentkezes){if(response){ new file[128]; new string[128]; GetPlayerName(playerid, nev, sizeof(nev)); if(strlen(inputtext) == 0) { format(string, sizeof string, \"Bejelentkezés \\n\\nÜdv %s! \\nRegisztrálva vagy! \\n\\nÍrd be a jelszavadat!\", nev); ShowPlayerDialog(playerid, bejelentkezes, DIALOG_STYLE_INPUT, \"Bejelentkezés\", string, \"Belépés\", \"Kilé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][skin] = dini_Int(file,\"Skin\"); JatekosInfo[playerid][Penz] = dini_Int(file,\"Penz\"); JatekosInfo[playerid][X] = dini_Float(file, \"X\"); JatekosInfo[playerid][Y] = dini_Float(file, \"Y\"); JatekosInfo[playerid][Z] = dini_Float(file, \"Z\"); } else { SendClientMessage(playerid, HIBA, \"Rossz jelszó!\"); printf(\"%s bejelentkezése sikertelen volt.\", nev); Kick(playerid); } }}else{ Kick(playerid);}}return 1;}public OnPlayerClickPlayer(playerid, clickedplayerid, source){return 1;}
ResetPlayerMoney(playerid);GivePlayerMoney(playerid, dini_Int(file, \"Penz\"));