Color1=0Color2=0
new color1, color2;GetVehicleColors(vehicleid, color1, color2);dini_IntSet(file, \"Color1\", color1);dini_IntSet(file, \"Color2\", color2);
Color1=0 Color2=0
enum vAdat{COLOR,COLOR2};new vInfo[MAX_VEHICLES][vAdat];//ez közvetlen alájaCMD:lefest(playerid, params[]){ if(IsPlayerInRangeOfPoint( playerid, 5.0, -322.7585,2682.3086,62.7733)) {if(pInfo[playerid][pFrakcio] == SZERELO || pInfo[playerid][pFrakcio] == SZFONOK || pInfo[playerid][pAdmin] >= 2){ if(pInfo[playerid][pMoney] >= 1500) { new Szin1, Szin2; new VehID = GetClosestCar(playerid); new Float: vX, Float: vY, Float: vZ; GetVehiclePos(VehID, vY, vX, vZ); if(sscanf(params, \"dd\", Szin1, Szin2)) return SendClientMessage(playerid, PIROS, \"Használat: /lefest < Szín 1 > < Szín 2 >\"); if(!IsPlayerInRangeOfPoint(playerid, 5.5, vY, vX, vZ)) return SendClientMessage(playerid, PIROS, \"Nincs a közeledben jármû!\"); cmd_me(playerid, \"lefestett egy jármûvet.\"); vInfo[VehID][color] = Szin1; vInfo[VehID][color2] = Szin2; ChangeVehicleColor(VehID, vInfo[VehID][color], vInfo[VehID][color2]); pInfo[playerid][pMoney] -= 1500; } else { SendClientMessage(playerid, PIROS, \"Nincs elég pénzed! (1500 FT)\"); }}else{ SendClientMessage(playerid, PIROS, \"Nem vagy Szerelõ!\");}}else SendClientMessage(playerid, PIROS, \"Nem vagy a gyarázsba!\");return 1;}stock SaveVehicle( vehicleid ){if(!dini_Exists(vehicleFile(vehicleid)) ){ dini_Create( vehicleFile(vehicleid) );}dini_IntSet( vehicleFile(vehicleid), \"MODEL\", vInfo[vehicleid][MODEL] ); dini_FloatSet( vehicleFile(vehicleid), \"X\", vInfo[vehicleid][X] ); dini_FloatSet( vehicleFile(vehicleid), \"Y\", vInfo[vehicleid][Y] ); dini_FloatSet( vehicleFile(vehicleid), \"Z\", vInfo[vehicleid][Z] ); dini_FloatSet( vehicleFile(vehicleid), \"A\", vInfo[vehicleid][A] ); dini_IntSet( vehicleFile(vehicleid), \"COLOR\", vInfo[vehicleid][color] ); dini_IntSet( vehicleFile(vehicleid), \"COLOR2\", vInfo[vehicleid][color2] ); dini_IntSet( vehicleFile(vehicleid), \"SOLD\", vInfo[vehicleid][sOLD] ); dini_Set( vehicleFile(vehicleid), \"PLATE\", vInfo[vehicleid][PLATE] ); dini_IntSet( vehicleFile(vehicleid), \"PRICE\", vInfo[vehicleid][PRICE] ); dini_IntSet( vehicleFile(vehicleid), \"LOCKED\", vInfo[vehicleid][LOCKED] ); dini_IntSet(vehicleFile(vehicleid), \"ÜzemanyagTipus\", vInfo[vehicleid][uZEMANYAGTIPUS]);dini_IntSet(vehicleFile(vehicleid), \"MilyenVanBenne\", vInfo[vehicleid][uZEMANYAGTIPUSVAN]);dini_IntSet(vehicleFile(vehicleid), \"MaxÜzemAnyag\", vInfo[vehicleid][MAXUZEMANYAG]);dini_IntSet(vehicleFile(vehicleid), \"ÜzemAnyag\", vInfo[vehicleid][uZEMANYAG]);dini_IntSet(vehicleFile(vehicleid), \"KerékBilincs\", vInfo[vehicleid][KEREKBILINCS]); return 1;}stock LoadVehicle( vehicleid ){vInfo[vehicleid][MODEL] = dini_Int( vehicleFile(vehicleid), \"MODEL\" ); vInfo[vehicleid][X] = dini_Float( vehicleFile(vehicleid), \"X\" ); vInfo[vehicleid][Y] = dini_Float( vehicleFile(vehicleid), \"Y\" ); vInfo[vehicleid][Z] = dini_Float( vehicleFile(vehicleid), \"Z\" ); vInfo[vehicleid][A] = dini_Float( vehicleFile(vehicleid), \"A\" ); vInfo[vehicleid][color] = dini_Int( vehicleFile(vehicleid), \"COLOR\" ); vInfo[vehicleid][color2] = dini_Int( vehicleFile(vehicleid), \"COLOR2\" ); vInfo[vehicleid][sOLD] = dini_Int( vehicleFile(vehicleid), \"SOLD\" ); format( vInfo[vehicleid][PLATE], (,\"%s\", dini_Get( vehicleFile(vehicleid), \"PLATE\") ); vInfo[vehicleid][PRICE] = dini_Int( vehicleFile(vehicleid), \"PRICE\" ); vInfo[vehicleid][LOCKED] = dini_Int( vehicleFile(vehicleid), \"LOCKED\" ); vInfo[vehicleid][uZEMANYAGTIPUS] = dini_Int(vehicleFile(vehicleid), \"ÜzemanyagTipus\");vInfo[vehicleid][uZEMANYAGTIPUSVAN] = dini_Int(vehicleFile(vehicleid), \"MilyenVanBenne\");vInfo[vehicleid][MAXUZEMANYAG] = dini_Int(vehicleFile(vehicleid), \"MaxÜzemAnyag\");vInfo[vehicleid][uZEMANYAG] = dini_Int(vehicleFile(vehicleid), \"ÜzemAnyag\");vInfo[vehicleid][KEREKBILINCS] = dini_Int(vehicleFile(vehicleid), \"KerékBilincs\"); vehicleid = CreateVehicle( vInfo[vehicleid][MODEL], vInfo[vehicleid][X], vInfo[vehicleid][Y], vInfo[vehicleid][Z], vInfo[vehicleid][A],vInfo[vehicleid][color], vInfo[vehicleid][color2], 0 );SetVehicleNumberPlate( vehicleid, vInfo[vehicleid][PLATE] );if (dini_Int(vehicleFile(vehicleid), \"Hidraulika\") == 1) { AddVehicleComponent(vehicleid, 1087); } if(dini_Int(vehicleFile(vehicleid), \"Kerék\") != 0) {AddVehicleComponent(vehicleid, dini_Int(vehicleFile(vehicleid), \"Kerék\"));}if(dini_Int(vehicleFile(vehicleid), \"Spoiler\") != 0) {AddVehicleComponent(vehicleid, dini_Int(vehicleFile(vehicleid), \"Spoiler\"));}if (dini_Int(vehicleFile(vehicleid), \"Nitro\") == 1) {AddVehicleComponent(vehicleid, 1010); }return 1;}stock ReloadVehicle( vehicleid ){DestroyVehicle( vehicleid );vehicleid = CreateVehicle( vInfo[vehicleid][MODEL], vInfo[vehicleid][X], vInfo[vehicleid][Y], vInfo[vehicleid][Z], vInfo[vehicleid][A],vInfo[vehicleid][color], vInfo[vehicleid][color2], 0 );SetVehicleNumberPlate( vehicleid, vInfo[vehicleid][PLATE] ); vInfo[vehicleid][bEINDITVA] = false;SaveVehicle( vehicleid );return 1;}
#include a_samp#include zcmd#include dini#include vfuncnew file[128+1];#define SCM SendClientMessage#define VehicleFile(%1) format(file, sizeof(file), \"Evolution/Vehicles/%s.veh\", GetNick(%1))CMD:sveh(playerid, params[]) {VehicleFile(playerid);new vehicleid = GetPlayerVehicleID(playerid), tunes[128], color1, color2;GetVehicleColors(vehicleid, color1, color2);if(dini_Exists(file)) {dini_IntSet(file, \"Model\", GetVehicleModel(vehicleid)); dini_IntSet(file, \"Color1\", color1);dini_IntSet(file, \"Color2\", color2);dini_IntSet(file, \"Paintjob\", GetVehiclePaintjob(vehicleid));for(new i; i < 14; i++) { format(tunes, 32, \"Tune%i\", i); dini_IntSet(file, tunes, GetVehicleComponentInSlot(vehicleid, i));}} else { dini_Create(file); dini_IntSet(file, \"Model\", GetVehicleModel(vehicleid)); dini_IntSet(file, \"Color1\", color1);dini_IntSet(file, \"Color2\", color2);dini_IntSet(file, \"Paintjob\", GetVehiclePaintjob(vehicleid));for(new i; i < 14; i++) { format(tunes, 32, \"Tune%i\", i); dini_IntSet(file, tunes, GetVehicleComponentInSlot(vehicleid, i));}}SCM(playerid, 0xFFFF99AA, \"* Jármûved sikeresen elmentve!\");return 1;} CMD:lveh(playerid, params[]) {VehicleFile(playerid);if(!dini_Exists(file)) return SCM(playerid, 0xFF4646AA, \"* Neked nincs mentett jármûved!\");new Float: X, Float: Y, Float: Z, Float: A, carid, color1, color2, paintjob;GetPlayerFacingAngle(playerid, A);GetPlayerPos(playerid, X, Y, Z);carid = dini_Int(file, \"Model\");color1 = dini_Int(file, \"Color1\");color2 = dini_Int(file, \"Color2\");paintjob = dini_Int(file, \"Paintjob\"); if(GetPVarInt(playerid, \"Vehicle\") != INVALID_VEHICLE_ID) { if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) == GetPVarInt(playerid, \"Vehicle\")) RemovePlayerFromVehicle(playerid); DestroyVehicle(GetPVarInt(playerid, \"Vehicle\")); } new vehicleid = CreateVehicle(carid, X, Y, Z, A, color1, color2, -1), tunes[128]; SetPVarInt(playerid, \"Vehicle\", vehicleid); PutPlayerInVehicle(playerid, GetPVarInt(playerid, \"Vehicle\"), 0); SetVehicleVirtualWorld(GetPVarInt(playerid, \"Vehicle\"), GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(GetPVarInt(playerid, \"Vehicle\"), GetPlayerInterior(playerid));for(new i; i < 14; i++) { format(tunes, 32, \"Tune%i\", i); AddVehicleComponent(vehicleid, dini_Int(file, tunes));}ChangeVehiclePaintjob(vehicleid, paintjob);SCM(playerid, 0xFFFF99AA, \"* Jármûved sikeresen betöltve!\");return 1;}stock GetNick(playerid) {new nick[24+1];GetPlayerName(playerid, nick, sizeof(nick));return nick;}
color1=0color2=0