Tessék,mindent bemásoltam ahol a createvehicle található,és a végén ott a járművesz is.
CreateVehicle(416, 1218.4901, 305.2733, 19.7381, 156.2997, 3, 1, 0); // MENTŐS 1 ID: 1
CreateVehicle(416, 1230.8928, 300.1445, 19.7422, 156.1563, 3, 1, 0); // MENTŐS 2 ID: 2
CreateVehicle( 599, 1227.2814, 290.8150, 19.7410, 65.0194, 3, 1, 0); // MENTŐS 3 ID: 3
CreateVehicle(598,631.0626,-609.6750,16.0841,1.2632,1,0,0); // rendőr ID: 7
CreateVehicle(598,634.7933,-609.5344,16.0830,1.0248,1,0,0); // rendőr ID 6
CreateVehicle(598,639.1799,-609.5401,16.0810,358.4372,1,0,0); // rendőr ID 5
CreateVehicle(599,613.0661,-597.1179,17.4238,272.2764,1,0,0); // rendőr ID 6
/*CreateVehicle(598, 1352.2228, 323.0363, 19.3052, 65.6903, 1, 0, 0); // RENDŐR 1 ID: 4
CreateVehicle(598, 1349.3025, 316.1978, 19.3069, 66.2225, 1, 0, 0); // RENDŐR 2 ID: 5
CreateVehicle(598, 1338.1426, 325.2172, 19.3073, 244.8088,1, 0, 0); // RENDŐR 3 ID: 6
CreateVehicle(599, 1334.8680, 318.5319, 19.3053, 245.7769,1, 0, 0); // RANGER 4 ID: 7*/
CreateVehicle(582, 1239.2823, 180.9476, 19.9638, 336.4042,1, 1, 0); // RÁDIÓS 1 ID: 8
CreateVehicle(582, 1219.4591, 189.4696, 19.9853, 338.0541,1, 1, 0); // RÁDIÓS 2 ID: 9
CreateVehicle(574, 1249.3348, 253.1913, 19.2799, 154.2999,1, 1, 0); // ÚTNYALÓ 1 ID: 10
CreateVehicle(574, 1252.2014, 251.7780, 19.2798, 154.9476,1, 1, 0); // ÚTNYALÓ 2 ID: 11
CreateVehicle(574, 1255.0703, 250.3746, 19.2799, 154.7950,1, 1, 0); // ÚTNYALÓ 3 ID: 12
CreateVehicle(574, 1257.5408, 249.0204, 19.2798, 154.3877,1, 1, 0); // ÚTNYALÓ 4 ID: 13
CreateVehicle(574, 1254.6682, 245.9526, 19.2799, 65.6890, 1, 1, 0); // ÚTNYALÓ 5 ID: 14
CreateVehicle(448, 1364.5829, 264.4278, 19.1655, 64.7233, 3, 3, 0); // PIZZA 1 ID: 15
CreateVehicle(448, 1363.5481, 262.1345, 19.1655, 64.1873, 3, 3, 0); // PIZZA 2 ID: 16
CreateVehicle(448, 1362.6080, 260.1506, 19.1656, 65.1351, 3, 3, 0); // PIZZA 3 ID: 17
CreateVehicle(448, 1361.6155, 257.8916, 19.1656, 69.3991, 3, 3, 0); // PIZZA 4 ID: 18
CreateVehicle(540, 312.8823, -13.0542, 1.2848, 184.6197, 6, 6, 0); // JOGSIZÓ ID: 19
CreateVehicle(566, 1424.9781, 229.7255, 19.3940, 246.6169,0, 0, 0); // ADÓS 1 ID: 20
CreateVehicle(507, 1423.4398, 225.0557, 19.3580, 243.2234,0, 0, 0); // ADÓS 2 ID: 21
CreateVehicle(482, 1422.1852, 214.2378, 19.5496, 257.1005,0, 0, 0); // ADÓS 3 ID: 22
CreateVehicle(514, 103.1490, -284.1255, 2.1500, 0.0000, 1, 1, 0); // BSZ. K. 1 ID: 23
CreateVehicle(514, 77.7072, -284.1255, 2.1500, 0.0000, 1, 1, 0); // BSZ. K. 2 ID: 24
CreateVehicle(514, 65.7348, -284.1255, 2.1500, 0.0000, 1, 1, 0); // BSZ. K. 3 ID: 25
CreateVehicle(584, 52.1898, -286.6435, 2.7500, 0.0000, 1, 1, 0); // BSZ. T. 1 ID: 26
CreateVehicle(584, 39.6092, -286.6435, 2.7500, 0.0000, 1, 1, 0); // BSZ. T. 2 ID: 27
CreateVehicle(584, 26.7013, -286.6435, 2.7500, 0.0000, 1, 1, 0); // BSZ. T. 3 ID: 28
CreateVehicle(525, 195.5762, -252.2218, 1.5200, -180.0000, 1, 1, 0); // Szerelő 1 ID: 29
CreateVehicle(525, 206.1227, -250.2913, 1.5200, -90.0000, 1, 1, 0); // Szerelő 2 ID: 30
CreateVehicle(552, 1240.9960, 214.0869, 19.2500, 156.0000, 1, 1, 0); // VSzerelő 1 ID: 31
CreateVehicle(552, 1236.6924, 209.0887, 19.2500, 66.0000, 1, 1, 0); // VSzerelő 2 ID: 32
CreateVehicle(578, -506.9519, -198.7040, 79.0289, 3.4186,1, 1, 0); // FSzállító ID: 33
CreateVehicle(578, -503.2257, -198.4814, 79.0289, 3.4186, 1, 1, 0); // FSzállító ID: 34
CreateVehicle(532, -36.2909, 64.3391, 4.0942, 342.6792, 6, 6, 0); // Kombine ID: 35
// [ S Z A B A D ] //
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 36
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 37
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 38
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 39
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 40
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 41
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 42
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 43
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 44
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 45
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 46
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 47
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 48
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 49
CreateVehicle(400, 2000.00, 2000.00, - 2000.00, 000.00, 6, 6, 0); // Kombine ID: 50
// [ S Z A B A D ] //
if( dialogid == VEHICLE_DIALOG )
{
if(response)
{
new sz_gString[ 128 + 1 ];
new i_Vehicle;
new i_random[ 2 ];
i_random[ 0 ] = random( 199 );
i_random[ 1 ] = random( 199 );
if( i_Vehicle > MAX_VEHICLES) return SendClientMessageToAll(PIROS, \"Nem lehet több járművet venni, a járművek elérték a maximumot!\");
if( pInfo[playerid][pMoney] < Vehicles[ listitem ][ 1 ] ) return SendClientMessage( playerid, PIROS, \"Nincs elég pénzed a jármű megvételéhez!\" );
pInfo[playerid][pMoney] -= Vehicles[ listitem ][ 1 ];
kInfo[VarosKassza] += Vehicles[ listitem ][ 1 ];
i_Vehicle = CreateVehicle( GetVehicleNameFromDialog(listitem), f_Out[0], f_Out[1], f_Out[2], f_Out[3], i_random[0], i_random[1], 0 );
vInfo[ i_Vehicle ][ X ] = f_Out[ 0 ];
vInfo[ i_Vehicle ][ Y ] = f_Out[ 1 ];
vInfo[ i_Vehicle ][ Z ] = f_Out[ 2 ];
vInfo[ i_Vehicle ][ A ] = f_Out[ 3 ];
vInfo[ i_Vehicle ][ COLOR ] = i_random[ 0 ];
vInfo[ i_Vehicle ][ COLOR2 ] = i_random[ 1 ];
vInfo[ i_Vehicle ][ SOLD ] = 1;
vInfo[ i_Vehicle ][ PLATE ] = GenerateRandomPlate( );
vInfo[ i_Vehicle ][ PRICE ] = Vehicles[ listitem ][ 1 ];
vInfo[ i_Vehicle ][ MODEL ] = Vehicles[ listitem ][ 0 ];
if(pInfo[ playerid ][ VEHICLE ] == 0)
{
pInfo[ playerid ][ VEHICLE ] = 1;
pInfo[ playerid ][ VEHICLE_ID ] = i_Vehicle;
}
else
{
pInfo[ playerid ][ VEHICLE2 ] = 1;
pInfo[ playerid ][ VEHICLE_ID2 ] = i_Vehicle;
}
SetVehicleNumberPlate( i_Vehicle, vInfo[ i_Vehicle ][ PLATE ] );
ChangeVehicleColor( i_Vehicle, i_random[ 0 ], i_random[ 1 ] );
format( sz_gString, sizeof(sz_gString), \"Sikeresen megvetted a járművet! Rendszáma: %s (( ID: %d ))\", vInfo[ i_Vehicle ][ PLATE ], i_Vehicle );
SendClientMessage( playerid, ZOLD, sz_gString );
cmd_me(playerid, \"vett egy járművet.\");
format(S, sizeof(S), \"<> %s vett egy járművet!\", Nev(playerid));
SendAdminMessage(FONTOS, S);
if(!dini_Exists(vehicleFile(i_Vehicle)) )
{
dini_Create( vehicleFile(i_Vehicle) );
}
SaveVehicle(i_Vehicle);
ReloadVehicle( i_Vehicle );
MilyenUzemAnyag(i_Vehicle);
}
}
return 0;
}
CMD:kocsimodell(playerid, params[])
{
if(pInfo[playerid][pALogin] == 0) return SendClientMessage(playerid, PIROS, \"Nincs ilyen parancs, lehet hogy elírtál valamit!\");
if(Egyezik(Nev(playerid), \"Bruce Abruzzi\"))
{
new i_Vehicle, Modell;
if(sscanf(params, \"dd\", i_Vehicle, Modell)) return SendClientMessage(playerid, PIROS, \"Használat: /kocsimodell < Kocsi ID > < Modell ID >\");
vInfo[ i_Vehicle ][ MODEL ] = Modell;
DestroyVehicle(i_Vehicle);
i_Vehicle = CreateVehicle(vInfo[ i_Vehicle ][ MODEL ], vInfo[ i_Vehicle ][ X ], vInfo[ i_Vehicle ][ Y ], vInfo[ i_Vehicle ][ Z ], 0, vInfo[ i_Vehicle ][ COLOR ], vInfo[ i_Vehicle ][ COLOR2 ], 0);
ReloadVehicle(i_Vehicle);
SendClientMessage(playerid, NARANCS, \"* Modell átállítása, sikeres!\");
}
else
{
SendClientMessage(playerid, PIROS, \"Nincs ilyen parancs, lehet hogy elírtál valamit!\");
}
return 1;
}
CMD:v(playerid, params[])
{
if(pInfo[playerid][pALogin] == 0) return SendClientMessage(playerid, PIROS, \"Nincs ilyen parancs, lehet hogy elírtál valamit!\");
if(pInfo[playerid][pAdmin] >= 3)
{
new Float: vX, Float: vY, Float: vZ;
GetPlayerPos(playerid, vX, vY, vZ);
if(sscanf(params, \"d\", id)) return 1;
CreateVehicle(id, vX, vY, vZ, 0, 1, 1, 0);
}
else
{
SendClientMessage(playerid, PIROS, \"Nincs ilyen parancs, lehet hogy elírtál valamit!\");
}
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\"));
}
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;
}
CMD:jarmuvesz(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 297.1173, -163.0995, 1.5000))
{
if(pInfo[playerid][VEHICLE] == 1 && pInfo[playerid][VEHICLE2] == 1) return SendClientMessage(playerid, PIROS, \"Elérted a maximum járművek számát! ((/járműelad - /járműelad2))\");
DeleteString( );
for( new modelid; modelid < sizeof(Vehicles); modelid++ )
{
InsertModelToDialog( Vehicles[ modelid ][ 0 ] );
}
ShowPlayerDialog( playerid, VEHICLE_DIALOG, DIALOG_STYLE_LIST, \"Jármű Szalon\", DialogText, \"Megvesz\", \"Kilép\" );
cmd_me(playerid, \"nézi, hogy milyen eladó járművek vannak.\");
}
else
{
SendClientMessage(playerid, PIROS, \"Itt nem vehetsz járművet!\");
}
return 1;
}