Szerző Téma: Több jármû Virtual World-jének átállítása  (Megtekintve 1394 alkalommal)

Több jármû Virtual World-jének átállítása
« Dátum: 2011. március 29. - 12:58:55 »
0 Show voters
Sziasztok,sikerült átállítani 1 db jármû Virtual World-jét,de többet kéne,és ráadásúl még egy Warningot is ki dob,így néz ki:
 
new vehicle;

 

vehicle = AddStaticVehicleEx(520,-3583.56445312,-2504.04980469,9.97183800,267.99499512,-1,-1,15); //Hydra
vehicle = AddStaticVehicleEx(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1,15); //Quad
vehicle = AddStaticVehicleEx(470,-3478.30371094,-2523.12597656,11.78172112,0.00000000,-1,-1,15); //Patriot
vehicle = AddStaticVehicleEx(425,-3513.81640625,-2599.72460938,4.98219109,0.00000000,-1,-1,15); //Hunter
vehicle = AddStaticVehicleEx(432,-3580.37646484,-2650.09545898,2.88043070,0.00000000,-1,-1,15); //Rhino
vehicle = AddStaticVehicleEx(432,-3588.67895508,-2648.80371094,2.88043070,0.00000000,-1,-1,15); //Rhino
vehicle = AddStaticVehicleEx(468,-3440.74511719,-2335.98144531,5.33223867,0.00000000,-1,-1,15); //Sanchez
vehicle = AddStaticVehicleEx(468,-3442.72460938,-2335.99707031,5.33223867,0.00000000,-1,-1,15); //Sanchez
vehicle = AddStaticVehicleEx(468,-3444.25878906,-2335.94140625,5.08223867,0.00000000,-1,-1,15); //Sanchez
vehicle = AddStaticVehicleEx(468,-3445.50683594,-2335.68359375,5.08223867,0.00000000,-1,-1,15); //Sanchez
vehicle = AddStaticVehicleEx(432,-3549.15234375,-2381.38085938,3.42157602,0.00000000,-1,-1,15); //Rhino
vehicle = AddStaticVehicleEx(460,-3638.62084961,-2427.42871094,2.00000000,0.00000000,-1,-1,15); //Skimmer
vehicle = AddStaticVehicleEx(425,-3491.50097656,-2278.55175781,9.11552715,184.24621582,-1,-1,15); //Hunter
vehicle = AddStaticVehicleEx(433,-3592.00878906,-2612.77246094,3.35109353,0.00000000,-1,-1,15); //Barracks
vehicle = AddStaticVehicleEx(470,-3594.32934570,-2592.79125977,2.89110518,0.00000000,-1,-1,15); //Patriot
vehicle = AddStaticVehicleEx(470,-3474.16674805,-2616.19702148,10.64374352,0.00000000,-1,-1,15); //Patriot
vehicle = AddStaticVehicleEx(548,-3530.41479492,-2640.13330078,6.05574512,0.00000000,-1,-1,15); //Cargobob
vehicle = AddStaticVehicleEx(548,-3503.46386719,-2226.34375000,12.38854885,0.00000000,-1,-1,15); //Cargobob
vehicle = AddStaticVehicleEx(578,-3459.23388672,-2282.79052734,10.06329536,196.00000000,-1,-1,15); //DFT-30
vehicle = AddStaticVehicleEx(578,-3450.92187500,-2278.17749023,10.83830261,167.99591064,-1,-1,15); //DFT-30
vehicle = AddStaticVehicleEx(579,-3430.76025391,-2332.39355469,2.35235405,0.00000000,-1,-1,15); //Huntley
vehicle = AddStaticVehicleEx(489,-3433.43164062,-2316.60839844,4.63448906,243.99536133,-1,-1,15); //Rancher
vehicle = AddStaticVehicleEx(422,-3500.31567383,-2326.29443359,2.40223885,184.00000000,-1,-1,15); //Bobcat
vehicle = AddStaticVehicleEx(471,-3461.45800781,-2305.39160156,5.09011745,0.00000000,-1,-1,15); //Quad
vehicle = AddStaticVehicleEx(504,-3459.38085938,-2317.31982422,3.73644018,186.75000000,-1,-1,15); //Bloodring Banger
vehicle = AddStaticVehicleEx(495,-3458.93847656,-2336.20507812,6.88231277,159.99938965,-1,-1,15); //Sandking
vehicle = AddStaticVehicleEx(520,-3596.23046875,-2384.34277344,15.24181461,271.99951172,-1,-1,15); //Hydra
vehicle = AddStaticVehicleEx(540,-3420.53222656,-2323.38720703,4.35509634,0.00000000,-1,-1,15); //Vincent
vehicle = AddStaticVehicleEx(433,-3583.95410156,-2534.73242188,9.60109329,0.00000000,-1,-1,15); //Barracks
vehicle = AddStaticVehicleEx(548,-3557.17700195,-2627.32421875,6.05574512,114.00000000,-1,-1,15); //Cargobob//Hydra

 
És OnPlayer Connect-nél:
 
SetVehicleVirtualWorld(vehicle, 3);

 
Jah és a warning:
 
warning 219: local variable \"vehicle\" shadows a variable at a preceding level

 
Meg még egy kérdés, hogy ha minden jármûvet \"vehicle = \"-zek akkor az összeset át kellene állítania nem?

Több jármû Virtual World-jének átállítása
« Válasz #1 Dátum: 2011. március 29. - 13:25:52 »
0 Show voters
Egy változóra akarsz több jármûvet rakni?
 
#include <a_samp>
#define MAX_VW_VEHS 30 //ide hogy hány ilyen jármûvet akarsz,  + 1
new vehicle[MAX_VW_VEHS]; //változó
public OnFilterScriptInit() {
    vehicle[0] = AddStaticVehicleEx(520,-3583.56445312,-2504.04980469,9.97183800,267.99499512,-1,-1,15); //Hydra
    vehicle[1] = AddStaticVehicleEx(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1,15); //Quad
    vehicle[2] = AddStaticVehicleEx(470,-3478.30371094,-2523.12597656,11.78172112,0.00000000,-1,-1,15); //Patriot
    vehicle[3] = AddStaticVehicleEx(425,-3513.81640625,-2599.72460938,4.98219109,0.00000000,-1,-1,15); //Hunter
    vehicle[4] = AddStaticVehicleEx(432,-3580.37646484,-2650.09545898,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[5] = AddStaticVehicleEx(432,-3588.67895508,-2648.80371094,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[6] = AddStaticVehicleEx(468,-3440.74511719,-2335.98144531,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[7] = AddStaticVehicleEx(468,-3442.72460938,-2335.99707031,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[8] = AddStaticVehicleEx(468,-3444.25878906,-2335.94140625,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[9] = AddStaticVehicleEx(468,-3445.50683594,-2335.68359375,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[10] = AddStaticVehicleEx(432,-3549.15234375,-2381.38085938,3.42157602,0.00000000,-1,-1,15); //Rhino
    vehicle[11] = AddStaticVehicleEx(460,-3638.62084961,-2427.42871094,2.00000000,0.00000000,-1,-1,15); //Skimmer
    vehicle[12] = AddStaticVehicleEx(425,-3491.50097656,-2278.55175781,9.11552715,184.24621582,-1,-1,15); //Hunter
    vehicle[13] = AddStaticVehicleEx(433,-3592.00878906,-2612.77246094,3.35109353,0.00000000,-1,-1,15); //Barracks
    vehicle[14] = AddStaticVehicleEx(470,-3594.32934570,-2592.79125977,2.89110518,0.00000000,-1,-1,15); //Patriot
    vehicle[15] = AddStaticVehicleEx(470,-3474.16674805,-2616.19702148,10.64374352,0.00000000,-1,-1,15); //Patriot
    vehicle[16] = AddStaticVehicleEx(548,-3530.41479492,-2640.13330078,6.05574512,0.00000000,-1,-1,15); //Cargobob
    vehicle[17] = AddStaticVehicleEx(548,-3503.46386719,-2226.34375000,12.38854885,0.00000000,-1,-1,15); //Cargobob
    vehicle[18] = AddStaticVehicleEx(578,-3459.23388672,-2282.79052734,10.06329536,196.00000000,-1,-1,15); //DFT-30
    vehicle[19] = AddStaticVehicleEx(578,-3450.92187500,-2278.17749023,10.83830261,167.99591064,-1,-1,15); //DFT-30
    vehicle[20] = AddStaticVehicleEx(579,-3430.76025391,-2332.39355469,2.35235405,0.00000000,-1,-1,15); //Huntley
    vehicle[21] = AddStaticVehicleEx(489,-3433.43164062,-2316.60839844,4.63448906,243.99536133,-1,-1,15); //Rancher
    vehicle[22] = AddStaticVehicleEx(422,-3500.31567383,-2326.29443359,2.40223885,184.00000000,-1,-1,15); //Bobcat
    vehicle[23] = AddStaticVehicleEx(471,-3461.45800781,-2305.39160156,5.09011745,0.00000000,-1,-1,15); //Quad
    vehicle[24] = AddStaticVehicleEx(504,-3459.38085938,-2317.31982422,3.73644018,186.75000000,-1,-1,15); //Bloodring Banger
    vehicle[25] = AddStaticVehicleEx(495,-3458.93847656,-2336.20507812,6.88231277,159.99938965,-1,-1,15); //Sandking
    vehicle[26] = AddStaticVehicleEx(520,-3596.23046875,-2384.34277344,15.24181461,271.99951172,-1,-1,15); //Hydra
    vehicle[27] = AddStaticVehicleEx(540,-3420.53222656,-2323.38720703,4.35509634,0.00000000,-1,-1,15); //Vincent
    vehicle[28] = AddStaticVehicleEx(433,-3583.95410156,-2534.73242188,9.60109329,0.00000000,-1,-1,15); //Barracks
    vehicle[29] = AddStaticVehicleEx(548,-3557.17700195,-2627.32421875,6.05574512,114.00000000,-1,-1,15); //Cargobob//Hydra
    return 1;
}
public OnVehicleSpawn(vehicleid) {
    for(new i = 0; i < MAX_VW_VEHS; i++) {
        if(vehicleid == vehicle) SetVehicleVirtualWorld(i, VW); // ide h melyik VWbe aakrod
    }
    return 1;
}

Több jármû Virtual World-jének átállítása
« Válasz #2 Dátum: 2011. március 29. - 14:04:43 »
0 Show voters
Egy változóra akarsz több jármûvet rakni?

 
Ezt hogy érted?
Am köszi,csak valamiért nem rakja át 3-as VW-be.Csináltam egy DM zónát és abba kellenek az autók,az át van állítva 3-as-ra meg ez is,szóval mennie kéne!
Amúgy rájöttem hogy a warning-t erre,dobja ki
 
if (strcmp(\"/cflip\", cmdtext, true, 10) == 0)
    {   if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GREEN,\"Nem vagy jármûben.\");
        {
        new vehicle;
        new Float:zangle;
        vehicle = GetPlayerVehicleID(playerid);
        GetVehicleZAngle(vehicle,zangle);
        SetVehicleZAngle(vehicle,zangle);
        SendClientMessage(playerid,COLOR_GREEN,\"Sikeresen megfordítottad az autódat.\");
        }
        return 1;
       }

 
,gondolom mert van már egy új
new vehicle

 
Csak annyi kéne hogy ezeket a jármûveket megjelenítse WV 3-ba!
« Utoljára szerkesztve: 2011. március 29. - 14:07:56 írta kadaradam »

Több jármû Virtual World-jének átállítása
« Válasz #3 Dátum: 2011. március 29. - 14:35:32 »
0 Show voters
if (strcmp(\"/cflip\", cmdtext, true, 10) == 0)

    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GREEN,\"Nem vagy jármûben.\");
    new Float:zangle, vehicleID = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(vehicleID, zangle);
    SetVehicleZAngle(vehicleID, zangle);
    SendClientMessage(playerid,COLOR_GREEN,\"Sikeresen megfordítottad az autódat.\");
    return 1;
}

Több jármû Virtual World-jének átállítása
« Válasz #4 Dátum: 2011. március 29. - 14:44:22 »
0 Show voters
Idézetet írta: TengeriMalac date=1301402132\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7187\" data-ipsquote-contentclass=\"forums_Topic

if (strcmp(\"/cflip\", cmdtext, true, 10) == 0)

    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GREEN,\"Nem vagy jármûben.\");
    new Float:zangle, vehicleID = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(vehicleID, zangle);
    SetVehicleZAngle(vehicleID, zangle);
    SendClientMessage(playerid,COLOR_GREEN,\"Sikeresen megfordítottad az autódat.\");
    return 1;
}

 

Ezt köszi,de leginkább a jármûvekkel van a problémám,amit irtál annak mûködni kell,le van tesztelve,hogy áthelyezi az összes autót?

Nem elérhető Buba

  • 540
    • Profil megtekintése
Több jármû Virtual World-jének átállítása
« Válasz #5 Dátum: 2011. március 29. - 15:14:23 »
0 Show voters

#include <a_samp>
new vehicles;
public OnGameModeInit()
{
vehicles =
AddStaticVehicle(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1);
AddStaticVehicle(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1);
AddStaticVehicle(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1);
return 1;
}
public OnPlayerConnect(playerid)
{
SetVehicleVirtualWorld(vehicles, 3);
return 1;
}

 
Nekem mûködött, gondolom addstaticvehicleex -el sem ad ki rá hibát ...

Több jármû Virtual World-jének átállítása
« Válasz #6 Dátum: 2011. március 29. - 15:22:27 »
0 Show voters
Most nézem, hogy elírtam..
Így már biztos jó, teszteltem.
 
#include <a_samp>
#define MAX_VW_VEHS 30 //ide hogy hány ilyen jármûvet akarsz,  + 1
new vehicle[MAX_VW_VEHS]; //változó
public OnFilterScriptInit() {
    vehicle[0] = AddStaticVehicleEx(520,-3583.56445312,-2504.04980469,9.97183800,267.99499512,-1,-1,15); //Hydra
    vehicle[1] = AddStaticVehicleEx(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1,15); //Quad
    vehicle[2] = AddStaticVehicleEx(470,-3478.30371094,-2523.12597656,11.78172112,0.00000000,-1,-1,15); //Patriot
    vehicle[3] = AddStaticVehicleEx(425,-3513.81640625,-2599.72460938,4.98219109,0.00000000,-1,-1,15); //Hunter
    vehicle[4] = AddStaticVehicleEx(432,-3580.37646484,-2650.09545898,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[5] = AddStaticVehicleEx(432,-3588.67895508,-2648.80371094,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[6] = AddStaticVehicleEx(468,-3440.74511719,-2335.98144531,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[7] = AddStaticVehicleEx(468,-3442.72460938,-2335.99707031,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[8] = AddStaticVehicleEx(468,-3444.25878906,-2335.94140625,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[9] = AddStaticVehicleEx(468,-3445.50683594,-2335.68359375,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[10] = AddStaticVehicleEx(432,-3549.15234375,-2381.38085938,3.42157602,0.00000000,-1,-1,15); //Rhino
    vehicle[11] = AddStaticVehicleEx(460,-3638.62084961,-2427.42871094,2.00000000,0.00000000,-1,-1,15); //Skimmer
    vehicle[12] = AddStaticVehicleEx(425,-3491.50097656,-2278.55175781,9.11552715,184.24621582,-1,-1,15); //Hunter
    vehicle[13] = AddStaticVehicleEx(433,-3592.00878906,-2612.77246094,3.35109353,0.00000000,-1,-1,15); //Barracks
    vehicle[14] = AddStaticVehicleEx(470,-3594.32934570,-2592.79125977,2.89110518,0.00000000,-1,-1,15); //Patriot
    vehicle[15] = AddStaticVehicleEx(470,-3474.16674805,-2616.19702148,10.64374352,0.00000000,-1,-1,15); //Patriot
    vehicle[16] = AddStaticVehicleEx(548,-3530.41479492,-2640.13330078,6.05574512,0.00000000,-1,-1,15); //Cargobob
    vehicle[17] = AddStaticVehicleEx(548,-3503.46386719,-2226.34375000,12.38854885,0.00000000,-1,-1,15); //Cargobob
    vehicle[18] = AddStaticVehicleEx(578,-3459.23388672,-2282.79052734,10.06329536,196.00000000,-1,-1,15); //DFT-30
    vehicle[19] = AddStaticVehicleEx(578,-3450.92187500,-2278.17749023,10.83830261,167.99591064,-1,-1,15); //DFT-30
    vehicle[20] = AddStaticVehicleEx(579,-3430.76025391,-2332.39355469,2.35235405,0.00000000,-1,-1,15); //Huntley
    vehicle[21] = AddStaticVehicleEx(489,-3433.43164062,-2316.60839844,4.63448906,243.99536133,-1,-1,15); //Rancher
    vehicle[22] = AddStaticVehicleEx(422,-3500.31567383,-2326.29443359,2.40223885,184.00000000,-1,-1,15); //Bobcat
    vehicle[23] = AddStaticVehicleEx(471,-3461.45800781,-2305.39160156,5.09011745,0.00000000,-1,-1,15); //Quad
    vehicle[24] = AddStaticVehicleEx(504,-3459.38085938,-2317.31982422,3.73644018,186.75000000,-1,-1,15); //Bloodring Banger
    vehicle[25] = AddStaticVehicleEx(495,-3458.93847656,-2336.20507812,6.88231277,159.99938965,-1,-1,15); //Sandking
    vehicle[26] = AddStaticVehicleEx(520,-3596.23046875,-2384.34277344,15.24181461,271.99951172,-1,-1,15); //Hydra
    vehicle[27] = AddStaticVehicleEx(540,-3420.53222656,-2323.38720703,4.35509634,0.00000000,-1,-1,15); //Vincent
    vehicle[28] = AddStaticVehicleEx(433,-3583.95410156,-2534.73242188,9.60109329,0.00000000,-1,-1,15); //Barracks
    vehicle[29] = AddStaticVehicleEx(548,-3557.17700195,-2627.32421875,6.05574512,114.00000000,-1,-1,15); //Cargobob//Hydra
    return 1;
}
public OnVehicleSpawn(vehicleid) {
    for(new i = 0; i < MAX_VW_VEHS; i++) {
        if(vehicleid == vehicle) SetVehicleVirtualWorld(vehicle, VW); // ide h melyik VWbe aakrod
    }
    return 1;
}
« Utoljára szerkesztve: 2011. március 29. - 15:23:59 írta TengeriMalac »

Több jármû Virtual World-jének átállítása
« Válasz #7 Dátum: 2011. március 29. - 15:31:34 »
0 Show voters
Idézetet írta: Buba date=1301404463\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7187\" data-ipsquote-contentclass=\"forums_Topic


#include <a_samp>
new vehicles;
public OnGameModeInit()
{
vehicles =
AddStaticVehicle(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1);
AddStaticVehicle(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1);
AddStaticVehicle(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1);
return 1;
}
public OnPlayerConnect(playerid)
{
SetVehicleVirtualWorld(vehicles, 3);
return 1;
}

 
Nekem mûködött, gondolom addstaticvehicleex -el sem ad ki rá hibát ...
 
De evvel csak egy jármûvet tõlt be nekem,mindig a legutolsót(,ha egy van bejelölve,akkor csak azt),azért köszi.Amúgy ugyan ezt írtam le,hogy ez nem megy! :D

Több jármû Virtual World-jének átállítása
« Válasz #8 Dátum: 2011. március 29. - 15:38:06 »
0 Show voters
Idézetet írta: TengeriMalac date=1301404947\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7187\" data-ipsquote-contentclass=\"forums_Topic
Most nézem, hogy elírtam..
Így már biztos jó, teszteltem.
 
#include <a_samp>
#define MAX_VW_VEHS 30 //ide hogy hány ilyen jármûvet akarsz,  + 1
new vehicle[MAX_VW_VEHS]; //változó
public OnFilterScriptInit() {
    vehicle[0] = AddStaticVehicleEx(520,-3583.56445312,-2504.04980469,9.97183800,267.99499512,-1,-1,15); //Hydra
    vehicle[1] = AddStaticVehicleEx(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1,15); //Quad
    vehicle[2] = AddStaticVehicleEx(470,-3478.30371094,-2523.12597656,11.78172112,0.00000000,-1,-1,15); //Patriot
    vehicle[3] = AddStaticVehicleEx(425,-3513.81640625,-2599.72460938,4.98219109,0.00000000,-1,-1,15); //Hunter
    vehicle[4] = AddStaticVehicleEx(432,-3580.37646484,-2650.09545898,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[5] = AddStaticVehicleEx(432,-3588.67895508,-2648.80371094,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[6] = AddStaticVehicleEx(468,-3440.74511719,-2335.98144531,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[7] = AddStaticVehicleEx(468,-3442.72460938,-2335.99707031,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[8] = AddStaticVehicleEx(468,-3444.25878906,-2335.94140625,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[9] = AddStaticVehicleEx(468,-3445.50683594,-2335.68359375,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[10] = AddStaticVehicleEx(432,-3549.15234375,-2381.38085938,3.42157602,0.00000000,-1,-1,15); //Rhino
    vehicle[11] = AddStaticVehicleEx(460,-3638.62084961,-2427.42871094,2.00000000,0.00000000,-1,-1,15); //Skimmer
    vehicle[12] = AddStaticVehicleEx(425,-3491.50097656,-2278.55175781,9.11552715,184.24621582,-1,-1,15); //Hunter
    vehicle[13] = AddStaticVehicleEx(433,-3592.00878906,-2612.77246094,3.35109353,0.00000000,-1,-1,15); //Barracks
    vehicle[14] = AddStaticVehicleEx(470,-3594.32934570,-2592.79125977,2.89110518,0.00000000,-1,-1,15); //Patriot
    vehicle[15] = AddStaticVehicleEx(470,-3474.16674805,-2616.19702148,10.64374352,0.00000000,-1,-1,15); //Patriot
    vehicle[16] = AddStaticVehicleEx(548,-3530.41479492,-2640.13330078,6.05574512,0.00000000,-1,-1,15); //Cargobob
    vehicle[17] = AddStaticVehicleEx(548,-3503.46386719,-2226.34375000,12.38854885,0.00000000,-1,-1,15); //Cargobob
    vehicle[18] = AddStaticVehicleEx(578,-3459.23388672,-2282.79052734,10.06329536,196.00000000,-1,-1,15); //DFT-30
    vehicle[19] = AddStaticVehicleEx(578,-3450.92187500,-2278.17749023,10.83830261,167.99591064,-1,-1,15); //DFT-30
    vehicle[20] = AddStaticVehicleEx(579,-3430.76025391,-2332.39355469,2.35235405,0.00000000,-1,-1,15); //Huntley
    vehicle[21] = AddStaticVehicleEx(489,-3433.43164062,-2316.60839844,4.63448906,243.99536133,-1,-1,15); //Rancher
    vehicle[22] = AddStaticVehicleEx(422,-3500.31567383,-2326.29443359,2.40223885,184.00000000,-1,-1,15); //Bobcat
    vehicle[23] = AddStaticVehicleEx(471,-3461.45800781,-2305.39160156,5.09011745,0.00000000,-1,-1,15); //Quad
    vehicle[24] = AddStaticVehicleEx(504,-3459.38085938,-2317.31982422,3.73644018,186.75000000,-1,-1,15); //Bloodring Banger
    vehicle[25] = AddStaticVehicleEx(495,-3458.93847656,-2336.20507812,6.88231277,159.99938965,-1,-1,15); //Sandking
    vehicle[26] = AddStaticVehicleEx(520,-3596.23046875,-2384.34277344,15.24181461,271.99951172,-1,-1,15); //Hydra
    vehicle[27] = AddStaticVehicleEx(540,-3420.53222656,-2323.38720703,4.35509634,0.00000000,-1,-1,15); //Vincent
    vehicle[28] = AddStaticVehicleEx(433,-3583.95410156,-2534.73242188,9.60109329,0.00000000,-1,-1,15); //Barracks
    vehicle[29] = AddStaticVehicleEx(548,-3557.17700195,-2627.32421875,6.05574512,114.00000000,-1,-1,15); //Cargobob//Hydra
    return 1;
}
public OnVehicleSpawn(vehicleid) {
    for(new i = 0; i < MAX_VW_VEHS; i++) {
        if(vehicleid == vehicle) SetVehicleVirtualWorld(vehicle, VW); // ide h melyik VWbe aakrod
    }
    return 1;
}

 

Hát nem tudom,nekem nem megy,de még VW1-ben sincs,valahova eldugta ;D,kíváncsi vagyok,hogy megy-e neked,kérlek majd írd meg!

Több jármû Virtual World-jének átállítása
« Válasz #9 Dátum: 2011. március 29. - 15:52:04 »
0 Show voters
Lehet hogy csak respawn után rakja át másik VW-be.
 
#include <a_samp>
#define MAX_VW_VEHS 30 //ide hogy hány ilyen jármûvet akarsz,  + 1
new vehicle[MAX_VW_VEHS]; //változó
public OnFilterScriptInit() {
    vehicle[0] = AddStaticVehicleEx(520,-3583.56445312,-2504.04980469,9.97183800,267.99499512,-1,-1,15); //Hydra
    vehicle[1] = AddStaticVehicleEx(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1,15); //Quad
    vehicle[2] = AddStaticVehicleEx(470,-3478.30371094,-2523.12597656,11.78172112,0.00000000,-1,-1,15); //Patriot
    vehicle[3] = AddStaticVehicleEx(425,-3513.81640625,-2599.72460938,4.98219109,0.00000000,-1,-1,15); //Hunter
    vehicle[4] = AddStaticVehicleEx(432,-3580.37646484,-2650.09545898,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[5] = AddStaticVehicleEx(432,-3588.67895508,-2648.80371094,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[6] = AddStaticVehicleEx(468,-3440.74511719,-2335.98144531,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[7] = AddStaticVehicleEx(468,-3442.72460938,-2335.99707031,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[8] = AddStaticVehicleEx(468,-3444.25878906,-2335.94140625,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[9] = AddStaticVehicleEx(468,-3445.50683594,-2335.68359375,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[10] = AddStaticVehicleEx(432,-3549.15234375,-2381.38085938,3.42157602,0.00000000,-1,-1,15); //Rhino
    vehicle[11] = AddStaticVehicleEx(460,-3638.62084961,-2427.42871094,2.00000000,0.00000000,-1,-1,15); //Skimmer
    vehicle[12] = AddStaticVehicleEx(425,-3491.50097656,-2278.55175781,9.11552715,184.24621582,-1,-1,15); //Hunter
    vehicle[13] = AddStaticVehicleEx(433,-3592.00878906,-2612.77246094,3.35109353,0.00000000,-1,-1,15); //Barracks
    vehicle[14] = AddStaticVehicleEx(470,-3594.32934570,-2592.79125977,2.89110518,0.00000000,-1,-1,15); //Patriot
    vehicle[15] = AddStaticVehicleEx(470,-3474.16674805,-2616.19702148,10.64374352,0.00000000,-1,-1,15); //Patriot
    vehicle[16] = AddStaticVehicleEx(548,-3530.41479492,-2640.13330078,6.05574512,0.00000000,-1,-1,15); //Cargobob
    vehicle[17] = AddStaticVehicleEx(548,-3503.46386719,-2226.34375000,12.38854885,0.00000000,-1,-1,15); //Cargobob
    vehicle[18] = AddStaticVehicleEx(578,-3459.23388672,-2282.79052734,10.06329536,196.00000000,-1,-1,15); //DFT-30
    vehicle[19] = AddStaticVehicleEx(578,-3450.92187500,-2278.17749023,10.83830261,167.99591064,-1,-1,15); //DFT-30
    vehicle[20] = AddStaticVehicleEx(579,-3430.76025391,-2332.39355469,2.35235405,0.00000000,-1,-1,15); //Huntley
    vehicle[21] = AddStaticVehicleEx(489,-3433.43164062,-2316.60839844,4.63448906,243.99536133,-1,-1,15); //Rancher
    vehicle[22] = AddStaticVehicleEx(422,-3500.31567383,-2326.29443359,2.40223885,184.00000000,-1,-1,15); //Bobcat
    vehicle[23] = AddStaticVehicleEx(471,-3461.45800781,-2305.39160156,5.09011745,0.00000000,-1,-1,15); //Quad
    vehicle[24] = AddStaticVehicleEx(504,-3459.38085938,-2317.31982422,3.73644018,186.75000000,-1,-1,15); //Bloodring Banger
    vehicle[25] = AddStaticVehicleEx(495,-3458.93847656,-2336.20507812,6.88231277,159.99938965,-1,-1,15); //Sandking
    vehicle[26] = AddStaticVehicleEx(520,-3596.23046875,-2384.34277344,15.24181461,271.99951172,-1,-1,15); //Hydra
    vehicle[27] = AddStaticVehicleEx(540,-3420.53222656,-2323.38720703,4.35509634,0.00000000,-1,-1,15); //Vincent
    vehicle[28] = AddStaticVehicleEx(433,-3583.95410156,-2534.73242188,9.60109329,0.00000000,-1,-1,15); //Barracks
    vehicle[29] = AddStaticVehicleEx(548,-3557.17700195,-2627.32421875,6.05574512,114.00000000,-1,-1,15); //Cargobob//Hydra
    for(new i = 0; i < MAX_VW_VEHS; i++) SetVehicletoRespawn(vehicle); // respawnolja, ami elvileg berakja másik VWbe.
    return 1;
}
public OnVehicleSpawn(vehicleid) {
    for(new i = 0; i < MAX_VW_VEHS; i++) {
        if(vehicleid == vehicle) SetVehicleVirtualWorld(vehicle, VW); // ide h melyik VWbe aakrod
    }
    return 1;
}

 
Ha így most neked jó, akkor nekem azért volt jó, mert a GMem bekapcsolása után minden jármûvel respawnol, rendszám miatt.
« Utoljára szerkesztve: 2011. március 29. - 15:54:51 írta TengeriMalac »

Több jármû Virtual World-jének átállítása
« Válasz #10 Dátum: 2011. március 29. - 16:35:38 »
0 Show voters
Idézetet írta: TengeriMalac date=1301406724\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7187\" data-ipsquote-contentclass=\"forums_Topic
Lehet hogy csak respawn után rakja át másik VW-be.
 
#include <a_samp>
#define MAX_VW_VEHS 30 //ide hogy hány ilyen jármûvet akarsz,  + 1
new vehicle[MAX_VW_VEHS]; //változó
public OnFilterScriptInit() {
    vehicle[0] = AddStaticVehicleEx(520,-3583.56445312,-2504.04980469,9.97183800,267.99499512,-1,-1,15); //Hydra
    vehicle[1] = AddStaticVehicleEx(471,-3578.56298828,-2612.52758789,2.35609365,0.00000000,-1,-1,15); //Quad
    vehicle[2] = AddStaticVehicleEx(470,-3478.30371094,-2523.12597656,11.78172112,0.00000000,-1,-1,15); //Patriot
    vehicle[3] = AddStaticVehicleEx(425,-3513.81640625,-2599.72460938,4.98219109,0.00000000,-1,-1,15); //Hunter
    vehicle[4] = AddStaticVehicleEx(432,-3580.37646484,-2650.09545898,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[5] = AddStaticVehicleEx(432,-3588.67895508,-2648.80371094,2.88043070,0.00000000,-1,-1,15); //Rhino
    vehicle[6] = AddStaticVehicleEx(468,-3440.74511719,-2335.98144531,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[7] = AddStaticVehicleEx(468,-3442.72460938,-2335.99707031,5.33223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[8] = AddStaticVehicleEx(468,-3444.25878906,-2335.94140625,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[9] = AddStaticVehicleEx(468,-3445.50683594,-2335.68359375,5.08223867,0.00000000,-1,-1,15); //Sanchez
    vehicle[10] = AddStaticVehicleEx(432,-3549.15234375,-2381.38085938,3.42157602,0.00000000,-1,-1,15); //Rhino
    vehicle[11] = AddStaticVehicleEx(460,-3638.62084961,-2427.42871094,2.00000000,0.00000000,-1,-1,15); //Skimmer
    vehicle[12] = AddStaticVehicleEx(425,-3491.50097656,-2278.55175781,9.11552715,184.24621582,-1,-1,15); //Hunter
    vehicle[13] = AddStaticVehicleEx(433,-3592.00878906,-2612.77246094,3.35109353,0.00000000,-1,-1,15); //Barracks
    vehicle[14] = AddStaticVehicleEx(470,-3594.32934570,-2592.79125977,2.89110518,0.00000000,-1,-1,15); //Patriot
    vehicle[15] = AddStaticVehicleEx(470,-3474.16674805,-2616.19702148,10.64374352,0.00000000,-1,-1,15); //Patriot
    vehicle[16] = AddStaticVehicleEx(548,-3530.41479492,-2640.13330078,6.05574512,0.00000000,-1,-1,15); //Cargobob
    vehicle[17] = AddStaticVehicleEx(548,-3503.46386719,-2226.34375000,12.38854885,0.00000000,-1,-1,15); //Cargobob
    vehicle[18] = AddStaticVehicleEx(578,-3459.23388672,-2282.79052734,10.06329536,196.00000000,-1,-1,15); //DFT-30
    vehicle[19] = AddStaticVehicleEx(578,-3450.92187500,-2278.17749023,10.83830261,167.99591064,-1,-1,15); //DFT-30
    vehicle[20] = AddStaticVehicleEx(579,-3430.76025391,-2332.39355469,2.35235405,0.00000000,-1,-1,15); //Huntley
    vehicle[21] = AddStaticVehicleEx(489,-3433.43164062,-2316.60839844,4.63448906,243.99536133,-1,-1,15); //Rancher
    vehicle[22] = AddStaticVehicleEx(422,-3500.31567383,-2326.29443359,2.40223885,184.00000000,-1,-1,15); //Bobcat
    vehicle[23] = AddStaticVehicleEx(471,-3461.45800781,-2305.39160156,5.09011745,0.00000000,-1,-1,15); //Quad
    vehicle[24] = AddStaticVehicleEx(504,-3459.38085938,-2317.31982422,3.73644018,186.75000000,-1,-1,15); //Bloodring Banger
    vehicle[25] = AddStaticVehicleEx(495,-3458.93847656,-2336.20507812,6.88231277,159.99938965,-1,-1,15); //Sandking
    vehicle[26] = AddStaticVehicleEx(520,-3596.23046875,-2384.34277344,15.24181461,271.99951172,-1,-1,15); //Hydra
    vehicle[27] = AddStaticVehicleEx(540,-3420.53222656,-2323.38720703,4.35509634,0.00000000,-1,-1,15); //Vincent
    vehicle[28] = AddStaticVehicleEx(433,-3583.95410156,-2534.73242188,9.60109329,0.00000000,-1,-1,15); //Barracks
    vehicle[29] = AddStaticVehicleEx(548,-3557.17700195,-2627.32421875,6.05574512,114.00000000,-1,-1,15); //Cargobob//Hydra
    for(new i = 0; i < MAX_VW_VEHS; i++) SetVehicletoRespawn(vehicle); // respawnolja, ami elvileg berakja másik VWbe.
    return 1;
}
public OnVehicleSpawn(vehicleid) {
    for(new i = 0; i < MAX_VW_VEHS; i++) {
        if(vehicleid == vehicle) SetVehicleVirtualWorld(vehicle, VW); // ide h melyik VWbe aakrod
    }
    return 1;
}

 
Ha így most neked jó, akkor nekem azért volt jó, mert a GMem bekapcsolása után minden jármûvel respawnol, rendszám miatt.
 
YES :D Köszi TengeriMalac minden remekül megy!
Zárok

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal