#include <a_samp>#include <sscanf2>#include <streamer>#include <YSI\\y_ini>#include <iZCMD>#define JARMUVEK_HELYE \"FCRP/Jarmuvek/%d.ini\"enum ENUM_JARMU_INFO{bool:JarmuVan,jID,jModelID,jTipus,Float: jPosX,Float: jPosY,Float: jPosZ,Float: jPosA,jColor1,jColor2,jTulajdonos[MAX_PLAYER_NAME],jAr,Float:jElet,jPanelok,jAjtok,jLampak,jKerekek}new JarmuInfo[MAX_VEHICLES][ENUM_JARMU_INFO];new MyVehicleIDs[MAX_VEHICLES];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);JarmuvekBetoltese();return 1;}public OnGameModeExit(){JarmuvekMentese();return 1;}stock JarmuvekMentese(){for(new ji=1;ji < MAX_VEHICLES;ji++){ JarmuMentes(ji); DestroyVehicle(JarmuInfo[ji][jID]);}}stock JarmuMentes(jarmuid){new jFajl[35], modelid, Float:pos[4]; if(JarmuInfo[jarmuid][JarmuVan] == false) return 0;modelid = JarmuInfo[jarmuid][jModelID];GetVehiclePos(JarmuInfo[jarmuid][jID], pos[0], pos[1], pos[2]);GetVehicleZAngle(JarmuInfo[jarmuid][jID], pos[3]);new panels, doors, lights, tires, Float:vElet;GetVehicleDamageStatus(JarmuInfo[jarmuid][jID], panels, doors, lights, tires);GetVehicleHealth(JarmuInfo[jarmuid][jID], vElet);format(jFajl, sizeof(jFajl), JARMUVEK_HELYE, jarmuid); new INI:File = INI_Open(jFajl); INI_WriteInt(File, \"ModelID\", modelid); INI_WriteFloat(File, \"PosX\", pos[0]); INI_WriteFloat(File, \"PosY\", pos[1]); INI_WriteFloat(File, \"PosZ\", pos[2]); INI_WriteFloat(File, \"PosA\", pos[3]); INI_WriteInt(File, \"Color1\", JarmuInfo[jarmuid][jColor1]); INI_WriteInt(File, \"Color2\", JarmuInfo[jarmuid][jColor2]); INI_WriteString(File, \"Tulajdonos\", JarmuInfo[jarmuid][jTulajdonos]); INI_WriteInt(File, \"Ar\", JarmuInfo[jarmuid][jAr]); INI_WriteFloat(File, \"Elet\", vElet); INI_WriteInt(File, \"Panelok\", panels); INI_WriteInt(File, \"Ajtok\", doors); INI_WriteInt(File, \"Lampak\", lights); INI_WriteInt(File, \"Kerekek\", tires); INI_Close(File); return 1;}stock JarmuvekBetoltese(){new jarmucount;for(new ji = 1; ji < MAX_VEHICLES; ji++) { new jFajl[35]; format(jFajl, 35, JARMUVEK_HELYE ,ji); if(fexist(jFajl)) { INI_ParseFile(jFajl, \"JarmuBetolt\", .bExtra = true, .extra = ji); JarmuBetoltes(ji); jarmucount++; printf(\"%d jármű betöltve\", jarmucount); }}}forward JarmuBetolt(id, name[], value[]);public JarmuBetolt(id, name[], value[]){JarmuInfo[id][JarmuVan] = true; INI_Int(\"ModelID\", JarmuInfo[id][jModelID]); INI_Float(\"PosX\", JarmuInfo[id][jPosX]); INI_Float(\"PosY\", JarmuInfo[id][jPosY]); INI_Float(\"PosZ\", JarmuInfo[id][jPosZ]); INI_Float(\"PosA\", JarmuInfo[id][jPosA]); INI_Int(\"Color1\", JarmuInfo[id][jColor1]); INI_Int(\"Color2\", JarmuInfo[id][jColor2]); INI_String(\"Tulajdonos\", JarmuInfo[id][jTulajdonos]); INI_Int(\"Ar\", JarmuInfo[id][jAr]); INI_Float(\"Elet\", JarmuInfo[id][jElet]); INI_Int(\"Panelok\", JarmuInfo[id][jPanelok]); INI_Int(\"Ajtok\", JarmuInfo[id][jAjtok]); INI_Int(\"Lampak\", JarmuInfo[id][jLampak]); INI_Int(\"Kerekek\", JarmuInfo[id][jKerekek]); return 1;}stock JarmuBetoltes(jarmuid){ JarmuInfo[jarmuid][jID] = AddStaticVehicleEx (JarmuInfo[jarmuid][jModelID], JarmuInfo[jarmuid][jPosX], JarmuInfo[jarmuid][jPosY], JarmuInfo[jarmuid][jPosZ], JarmuInfo[jarmuid][jPosA], JarmuInfo[jarmuid][jColor1], JarmuInfo[jarmuid][jColor2], -1, 0);SetVehicleParamsEx(JarmuInfo[jarmuid][jID], 0, 0, 0, 0, 0, 0, 0);UpdateVehicleDamageStatus(JarmuInfo[jarmuid][jID], JarmuInfo[jarmuid][jPanelok], JarmuInfo[jarmuid][jAjtok], JarmuInfo[jarmuid][jLampak], JarmuInfo[jarmuid][jKerekek]);SetVehicleHealth(JarmuInfo[jarmuid][jID], JarmuInfo[jarmuid][jElet]);MyVehicleIDs[JarmuInfo[jarmuid][jID]] = jarmuid;return 1;} stock ElerhetoJarmuID(){for(new ji = 1; ji<MAX_VEHICLES; ji++){ if(JarmuInfo[ji][JarmuVan] == false) return ji;}return -1;}stock GetName(playerid){new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,sizeof(name));return name;}
CMD:fill(playerid, params[]){new vehicleid, uzemanyag;if(sscanf(params, \"dd\", vehicleid, uzemanyag)) return SendClientMessage(playerid, COLOR_WHITE, \"{2F70D0}[FCRP]{FFFFFF}: /fill [ID] [Üzemanyag]\");for(new bki = 1; bki < sizeof(BenzinKutInfo); bki++){ if(IsPlayerInRangeOfPoint(playerid,4.0,BenzinKutInfo[bki][BenzinKutX],BenzinKutInfo[bki][BenzinKutY],BenzinKutInfo[bki][BenzinKutZ])) { if(JarmuInfo[vehicleid][jUzemanyag] + uzemanyag > MAX_UZEMANYAG[GetVehicleModel(vehicleid) - 400]) return SendClientMessage(playerid,COLOR_WHITE,\"{2F70D0}[FCRP]{FFFFFF}:Ennyi nem fér bele\"); if(JatekosInfo[playerid][jPenz] <= uzemanyag * UZEMANYAG_ARA) return SendClientMessage(playerid, COLOR_WHITE,\"{2F70D0}[FCRP]{FFFFFF}: Nincs elég pénzed az üzemanyagra!\"); JarmuInfo[vehicleid][jUzemanyag] += uzemanyag; JatekosInfo[playerid][jPenz] -= uzemanyag * UZEMANYAG_ARA; }}return 1;}