Auto salon bug

pre 7 godina
840
pregleda
11
postova
Ova tema je zaključana. Samo moderatori i administratori mogu odgovarati.
Jeste i Bice
Wheel Man
pre 7 godina
Problem(error/warning): Kada pravim salon i dodjem do dela gde treba da postavim kameru ne mogu da pomeram(detalji na slikama),i kada kupim vozilo spawna ga na 0toj tacki(ima slika)
Dio skripte:sve vezano za salon
CMD:ascamera( playerid, params[] ) {
if( PlayerInfo[ playerid ][ xAdmin ] >= 7 ) {
if( FlyMode[ playerid ] == true && flymodecamera[ playerid ][ cameramode ] == true ) {
            new as = KreiranAutoSalon[ playerid ];
            new Float:fPX, Float:fPY, Float:fPZ,
Float:fVX, Float:fVY, Float:fVZ,
Float:object_x, Float:object_y, Float:object_z;

            const Float:fScale = 5.0;

GetPlayerCameraPos( playerid, fPX, fPY, fPZ);
GetPlayerCameraFrontVector( playerid, fVX, fVY, fVZ);

object_x = fPX + floatmul( fVX, fScale );
object_y = fPY + floatmul( fVY, fScale );
object_z = fPZ + floatmul( fVZ, fScale );

AutoSalon[ as ][ aCameraPos ][ 0 ] = fPX;
AutoSalon[ as ][ aCameraPos ][ 1 ] = fPY;
AutoSalon[ as ][ aCameraPos ][ 2 ] = fPZ;
AutoSalon[ as ][ aCameraLookAt ][ 0 ] = object_x;
AutoSalon[ as ][ aCameraLookAt ][ 1 ] = object_y;
AutoSalon[ as ][ aCameraLookAt ][ 2 ] = object_z;
SaveSalon( as );
CancelFlyMode( playerid );
Info( playerid, "Uspesno si sacuvao pozicije." );
    Info( playerid, "Sada koristi /asport da se vratis do auto salona." );
}
}
    return true;
}

CMD:asvozilo( playerid, params[] ) {
    if( PlayerInfo[ playerid ][ xAdmin ] < 7 ) return GRESKA( playerid, "Niste u mogucnosti koristiti ovu komandu.");
if( !AdminDuty[ playerid ] ) return GRESKA( playerid, "Da bi koristili ovu komandu morate biti na duznosti." );
if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu!" );
    new as = KreiranAutoSalon[ playerid ], Float:Pos[ 4 ], vehicleid = GetPlayerVehicleID( playerid );
if( KreiranAutoSalon[ playerid ] == -1 ) return GRESKA( playerid, "Ne kreiras nijedan auto salon." );
if( GetVehicleModel( AutoSalon[ as ][ aIzlogVeh ] ) != 0 ) return GRESKA( playerid, "Vec ste odradili ovaj korak." );

GetVehiclePos( vehicleid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
    GetVehicleZAngle( vehicleid, Pos[ 3 ] );

    for( new i = 1; i < MAX_CARS; i++ ) {
new fileauta[ 40 ];
format(fileauta, sizeof( fileauta ), V_FILE, i);
if( !fexist( fileauta ) ) {
VehicleInfo[ i ][ vOwned ] = 0;
VehicleInfo[ i ][ vNeaktivnost ] = 0;
VehicleInfo[ i ][ vKilometri ] = 0;
VehicleInfo[ i ][ vMetri ] = 0;
VehicleInfo[ i ][ vPrice ] = 0;
strmid( VehicleInfo[ i ][ vOwner ], "Drzava", 0, strlen("Drzava"), 32);
VehicleInfo[ i ][ vLocked ] = 1;
VehicleInfo[ i ][ vLokacijaX ] = Pos[ 0 ];
VehicleInfo[ i ][ vLokacijaY ] = Pos[ 1 ];
VehicleInfo[ i ][ vLokacijaZ ] = Pos[ 2 ];
VehicleInfo[ i ][ vLokacijaA ] = Pos[ 3 ];
VehicleInfo[ i ][ vVirtualWorld ] = 0;
VehicleInfo[ i ][ vInterior ] = 0;
VehicleInfo[ i ][ vUsage ] = IZLOZBENO_VOZILO;
VehicleInfo[ i ][ vJob ] = -1;
VehicleInfo[ i ][ vOrganization ] = -1;
VehicleInfo[ i ][ vFuelProperty ] = -1;
VehicleInfo[ i ][ vColor1 ] = 0;
VehicleInfo[ i ][ vColor2 ] = 0;
VehicleInfo[ i ][ vModel ] = AutoSalon[ as ][ aVehModel ][ 0 ];
VehicleInfo[ i ][ vReg ] = 1;
    VehicleInfo[ i ][ vRegVreme ] = 0;
VehicleInfo[ i ][ vTeh ] = 1;
VehicleInfo[ i ][ vGPS ] = 0;
VehicleInfo[ i ][ vOsiguranje ] = 5;
VehicleInfo[ i ][ vLock ] = 5;
VehicleInfo[ i ][ vAlarm ] = 4;
VehicleInfo[ i ][ vTuned ] = 0;
VehicleInfo[ i ][ vNeon ] = 0;
VehicleInfo[ i ][ vImobilizator ] = 5;
VehicleInfo[ i ][ vSpoiler ] = 0;
VehicleInfo[ i ][ vHood ] = 0;
VehicleInfo[ i ][ vRoof ] = 0;
VehicleInfo[ i ][ vSkirt ] = 0;
VehicleInfo[ i ][ vLamps ] = 0;
VehicleInfo[ i ][ vNitro ] = 0;
VehicleInfo[ i ][ vExhaust ] = 0;
VehicleInfo[ i ][ vWheels ] = 0;
VehicleInfo[ i ][ vStereo ] = 0;
VehicleInfo[ i ][ vHydraulics ] = 0;
VehicleInfo[ i ][ vFrontBumper ] = 0;
VehicleInfo[ i ][ vRearBumper ] = 0;
VehicleInfo[ i ][ vVents ] = 0;
VehicleInfo[ i ][ vPaintJob ] = 255;
VehicleInfo[ i ][ vProvera ] = i;
VehicleInfo[ i ][ vMaterijali ] = 0;
VehicleInfo[ i ][ vDrug ][ 0 ] = 0; VehicleInfo[ i ][ vDrug ][ 1 ] = 0; VehicleInfo[ i ][ vDrug ][ 2 ] = 0; VehicleInfo[ i ][ vDrug ][ 3 ] = 0; VehicleInfo[ i ][ vDrug ][ 4 ] = 0; VehicleInfo[ i ][ vDrug ][ 5 ] = 0;
VehicleInfo[ i ][ vDrugCode ][ 0 ] = 0; VehicleInfo[ i ][ vDrugCode ][ 1 ] = 0; VehicleInfo[ i ][ vDrugCode ][ 2 ] = 0; VehicleInfo[ i ][ vDrugCode ][ 3 ] = 0; VehicleInfo[ i ][ vDrugCode ][ 4 ] = 0; VehicleInfo[ i ][ vDrugCode ][ 5 ] = 0;
        VehicleInfo[ i ][ vMelee ] = 0; VehicleInfo[ i ][ vWeap1 ] = 0; VehicleInfo[ i ][ vAmmo1 ] = 0; VehicleInfo[ i ][ vWeap2 ] = 0; VehicleInfo[ i ][ vAmmo2 ] = 0;

Traxx_DestroyVehicle( vehicleid );
AdminVozilo[ playerid ] = -1;

VehicleInfo[ i ][ vID ] = Traxx_CreateVehicle( i, IZLOZBENO_VOZILO, -1, -1, -1, VehicleInfo[ i ][ vModel ], VehicleInfo[ i ][ vLokacijaX ], VehicleInfo[ i ][ vLokacijaY ], VehicleInfo[ i ][ vLokacijaZ ]+1.0, VehicleInfo[ i ][ vLokacijaA ], VehicleInfo[ i ][ vColor1 ], VehicleInfo[ i ][ vColor2 ], 300000 );
  SetVehicleVirtualWorld( VehicleInfo[ i ][ vID ], AutoSalon[ as ][ aVW ] );
    LinkVehicleToInterior( VehicleInfo[ i ][ vID ], AutoSalon[ as ][ aInt ] );

            if( Diesel( VehicleInfo[ i ][ vID ] ) ) VehicleInfo[ i ][ vFuelType ] = 1;
  else if( Gasoline( VehicleInfo[ i ][ vID ] ) ) VehicleInfo[ i ][ vFuelType ] = 2;
    else if( GasOil( VehicleInfo[ i ][ vID ] ) ) VehicleInfo[ i ][ vFuelType ] = 3;

VehicleInfo[ i ][ vFuel ] = getAmountFuel( VehicleInfo[ i ][ vID ] ); vCanDrive[ VehicleInfo[ i ][ vID ] ] = 1; Fuel[ VehicleInfo[ i ][ vID ] ] = getAmountFuel( VehicleInfo[ i ][ vID ] );
UnLockCar( VehicleInfo[ i ][ vID ] ); ResetVehicleStatistics( VehicleInfo[ i ][ vID ] ); SetTablice( VehicleInfo[ i ][ vID ] );
        SaveVehicle( i );
        carspawntimer = 1;
  SetTimer("AntiSpawnCrash", 3000, 0);

  Traxx_SetPlayerPos( playerid, AutoSalon[ as ][ aPickupPos ][ 0 ], AutoSalon[ as ][ aPickupPos ][ 1 ], AutoSalon[ as ][ aPickupPos ][ 2 ] );
SetPlayerInterior( playerid, AutoSalon[ as ][ aInt ] );
SetPlayerVirtualWorld( playerid, AutoSalon[ as ][ aVW ] );

            AutoSalon[ as ][ aIzlogVeh ] = i;
            SaveSalon( as );

break;
}
}
Info( playerid, "Uspesno si sacuvao vozilo." );
SCM( playerid,SERVERBOJA, "Sada trebas sacuvati poziciju kamere koja gleda ka vozilu u izlogu za listanje pri kupovini." );
SCM( playerid,SERVERBOJA, "Sa "col_white"~k~~GO_FORWARD~, ~k~~GO_BACK~, ~k~~GO_LEFT~ "col_srvboja"and "col_white"~k~~GO_RIGHT~"col_srvboja" pomerate kameru.");
SCM( playerid,SERVERBOJA, "Koristite "col_white"/ascamera"col_srvboja" da sacuvate poziciju kamere kada nadjete odredjeni ugao.");
SetTimerEx("FlyMode1", 1000, false, "d", playerid );
return true;
}
CMD:kupivozilo( playerid, params[] ) {
    if( ServerInfo[ KupovinaVozila ] == false ) return GRESKA( playerid, "Trenutno nije moguce kupovanje auta po salonima." );

    if( PlayerInfo[ playerid ][ xWanted ] > 0 ) return GRESKA( playerid, "Ne mozes kupovati kad imas Wanted Level." );

if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] == -1 ) { }
    else if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] == -1 ) { }
    else if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] == -1 ) { }
    else if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] == -1 ) {
if( PlayerInfo[ playerid ][ xDonatorSlot ] == true ) { }
else return GRESKA( playerid, "Svi slotovi vozila su vam zauzeti." );
}
else return GRESKA( playerid, "Svi slotovi vozila su vam zauzeti." );

    new as = GetNearestSalon( playerid );
if( GetNearestSalon( playerid ) == -1 ) return GRESKA( playerid, "Nisi na pickupu auto salona." );
if( AutoSalon[ as ][ AlreadyBuying ] == true ) return GRESKA( playerid, "Neko vec kupuje vozilo!" );

if( PlayerInfo[ playerid ][ xLevel ] < 5 ) return GRESKA( playerid, "Morate biti level 5+." );

    new slotid = AutoSalon[ as ][ aIzlogVeh ];
AutoSalon[ as ][ AlreadyBuying ] = true;

    PlayerBuyingAS[ playerid ] = as;
    ModelCar[ playerid ] = 0;
ClearChat( playerid, 25 );

BuyCarTDControl( playerid, true );

if( AutoSalon[ as ][ aVehAmmount ][ ModelCar[ playerid ] ] == 0 ) {
PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], "~r~Nedostupno" );
}
if( AutoSalon[ as ][ aVehAmmount ][ ModelCar[ playerid ] ] != 0 ) {
PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], "~g~Dostupno" );
}
new string[ 128 ];
format( string, sizeof( string ), "%s", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 2 ], string );

format( string, sizeof( string ), "Cena:_$%d", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 1 ] );
PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 4 ], string );

PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 3 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 3 ] );

SetPlayerCameraPos( playerid, AutoSalon[ as ][ aCameraPos ][ 0 ], AutoSalon[ as ][ aCameraPos ][ 1 ], AutoSalon[ as ][ aCameraPos ][ 2 ] );
SetPlayerCameraLookAt( playerid, AutoSalon[ as ][ aCameraLookAt ][ 0 ], AutoSalon[ as ][ aCameraLookAt ][ 1 ], AutoSalon[ as ][ aCameraLookAt ][ 2 ] );

Traxx_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
VehicleInfo[ slotid ][ vID ] = Traxx_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], -1, -1, -1 );
SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );

    SelectTextDraw( playerid, SERVERBOJA);
return 1;
}

CMD:asport( playerid, params[] ) {
    if( PlayerInfo[ playerid ][ xAdmin ] < 7 ) return GRESKA( playerid, "Niste u mogucnosti koristiti ovu komandu.");
if( !AdminDuty[ playerid ] ) return GRESKA( playerid, "Da bi koristili ovu komandu morate biti na duznosti." );
if( KreiranAutoSalon[ playerid ] == -1 ) return GRESKA( playerid, "Ne kreiras nijedan auto salon." );
new as = KreiranAutoSalon[ playerid ];
Traxx_SetPlayerPos( playerid, AutoSalon[ as ][ aPickupPos ][ 0 ], AutoSalon[ as ][ aPickupPos ][ 1 ], AutoSalon[ as ][ aPickupPos ][ 2 ] );
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, AutoSalon[ as ][ aInt ] );
SetPlayerVirtualWorld( playerid, AutoSalon[ as ][ aVW ] );
SCM( playerid,SERVERBOJA, "Kada izadjes na cisti prostor kucaj '/veh 560 1 1' da spawnas vozilo." );
SCM( playerid,SERVERBOJA, "Kada spawnas vozilo i nadjes lokaciju gde ce biti dostavljena kupljena vozila kucaj /asbvozilo." );
return 1;
}

CMD:asbvozilo( playerid, params[] ) {
    if( PlayerInfo[ playerid ][ xAdmin ] < 7 ) return GRESKA( playerid, "Niste u mogucnosti koristiti ovu komandu.");
if( !AdminDuty[ playerid ] ) return GRESKA( playerid, "Da bi koristili ovu komandu morate biti na duznosti." );
if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu!" );
    new as = KreiranAutoSalon[ playerid ], Float:Pos[ 4 ], vehicleid = GetPlayerVehicleID( playerid );
if( KreiranAutoSalon[ playerid ] == -1 ) return GRESKA( playerid, "Ne kreiras nijedan auto salon." );
GetVehiclePos( vehicleid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
    GetVehicleZAngle( vehicleid, Pos[ 3 ] );
    AutoSalon[ as ][ aVehBuyedPos ][ 0 ] = Pos[ 0 ];
    AutoSalon[ as ][ aVehBuyedPos ][ 1 ] = Pos[ 1 ];
AutoSalon[ as ][ aVehBuyedPos ][ 2 ] = Pos[ 2 ];
    AutoSalon[ as ][ aVehBuyedPos ][ 3 ] = Pos[ 3 ];
    SaveSalon( as );
    Traxx_DestroyVehicle( vehicleid );
    AdminVozilo[ playerid ] = -1;
    Info( playerid, "Uspesno si sacuvao poziciju za dostavljanje vozila." );

new coordsstring[ 64 ];
    strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
    strcat( DialogStrgEx, "Unesite za svaki model vozila, kolicinu.\nPrimer: 5 6 10 23\n\n" );
strcat( DialogStrgEx, "__________________________________________________________________\n");
for( new i = 0; i < AutoSalon[ as ][ aMaxVehModel ]; i++ ) {
    format( coordsstring, sizeof( coordsstring ), "Model %d - %s\n", (i+1), ImeVozila[ (AutoSalon[ as ][ aVehModel ][ i ]- 400) ] );
        strcat( DialogStrgEx, coordsstring );
}
    SPD( playerid, dialog_ASAMMOUNT, DSI, D_NASLOV, DialogStrgEx, D_ODABERI, D_NAZAD );
    strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );

return true;
}

*nisu ovako poredjane komande*

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):/

Slika/video ingame problema(obavezno ako je ingame problem):

Ovako je sad: https://imgur.com/a/fz99TmA

Ovako treba da bude: https://imgur.com/a/iZ269CD

Mesto gde se spavnaju vozila kad ih kupim: https://imgur.com/a/7D2evKY
EnLokos
Hustler
pre 7 godina
Koji je mod?
Nikola4
Made Man
pre 7 godina
Daj OnPlayerClickPlayerTextdraw/ tj. kad klikne dugme Kupi na Tom TDu sta ae desi.
Jeste i Bice
Wheel Man
pre 7 godina
N_loccos wrote on January 18, 2019, 9:55 pm:
Koji je mod?

Athlone mod ali radilo je normalno
Jeste i Bice
Wheel Man
pre 7 godina
.варнинг wrote on January 19, 2019, 10:47 am:
Daj OnPlayerClickPlayerTextdraw/ tj. kad klikne dugme Kupi na Tom TDu sta ae desi.

    if( _:playertextid != INVALID_TEXT_DRAW ) {
    if( playertextid == BuyCar[ playerid ][ 5 ] ) {
        new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
if( as != -1 ) {
      if( ModelCar[ playerid ] == (AutoSalon[ as ][ aMaxVehModel ]-1) ) return 1;

ModelCar[ playerid ]++;

                if( AutoSalon[ as ][ aVehAmmount ][ ModelCar[ playerid ] ] == 0 ) {
                    PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], "~r~Nedostupno" );
                }
                if( AutoSalon[ as ][ aVehAmmount ][ ModelCar[ playerid ] ] != 0 ) {
                    PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], "~g~Dostupno" );
                }

new string[ 128 ];
format( string, sizeof( string ), "%s", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 2 ], string );

format( string, sizeof( string ), "Cena:_$%d", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 1 ] );
PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 4 ], string );

PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 3 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 3 ] );

SetPlayerCameraPos( playerid, AutoSalon[ as ][ aCameraPos ][ 0 ], AutoSalon[ as ][ aCameraPos ][ 1 ], AutoSalon[ as ][ aCameraPos ][ 2 ] );
SetPlayerCameraLookAt( playerid, AutoSalon[ as ][ aCameraLookAt ][ 0 ], AutoSalon[ as ][ aCameraLookAt ][ 1 ], AutoSalon[ as ][ aCameraLookAt ][ 2 ] );

Traxx_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
VehicleInfo[ slotid ][ vID ] = Traxx_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], -1, -1, -1 );
    SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
    LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );

    SelectTextDraw( playerid, SERVERBOJA);
}
return true;
}
    if( playertextid == BuyCar[ playerid ][ 5 ] ) {
        new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
if( as != -1 ) {
      if( ModelCar[ playerid ] == 0 ) return 1;
ModelCar[ playerid ]--;

                if( AutoSalon[ as ][ aVehAmmount ][ ModelCar[ playerid ] ] == 0 ) {
                    PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], "~r~Nedostupno" );
                }
                if( AutoSalon[ as ][ aVehAmmount ][ ModelCar[ playerid ] ] != 0 ) {
                    PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], "~g~Dostupno" );
                }

new string[ 128 ];
format( string, sizeof( string ), "%s", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 2 ], string );

format( string, sizeof( string ), "Cena:_$%d", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 1 ] );
PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 4 ], string );

PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 3 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 3 ] );

SetPlayerCameraPos( playerid, AutoSalon[ as ][ aCameraPos ][ 0 ], AutoSalon[ as ][ aCameraPos ][ 1 ], AutoSalon[ as ][ aCameraPos ][ 2 ] );
SetPlayerCameraLookAt( playerid, AutoSalon[ as ][ aCameraLookAt ][ 0 ], AutoSalon[ as ][ aCameraLookAt ][ 1 ], AutoSalon[ as ][ aCameraLookAt ][ 2 ] );

Traxx_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
VehicleInfo[ slotid ][ vID ] = Traxx_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], -1, -1, -1 );
    SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
    LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );

    SelectTextDraw( playerid, SERVERBOJA);
}
return true;
}
if( playertextid == BuyCar[ playerid ][ 8 ] ) {
new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
if( as != -1 ) {
AutoSalon[ as ][ AlreadyBuying ] = false;

    PlayerBuyingAS[ playerid ] = -1;
ModelCar[ playerid ] = 0;

    Traxx_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
VehicleInfo[ slotid ][ vID ] = Traxx_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ 0 ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], -1, -1, -1 );
    SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
    LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );

BuyCarTDControl( playerid, false );
TogglePlayerControllable( playerid, true );

SetCameraBehindPlayer( playerid );
CancelSelectTextDraw( playerid );
}
return true;
}
if( playertextid == BuyCar[ playerid ][ 9 ] )  {

    new as = GetNearestSalon( playerid );
if( as != -1 ) {

strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );

format( globalstring, sizeof( globalstring ),""col_white"Da li ste sigurni da zelite kupiti vozilo "col_srvboja"%s.\n", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
strcat( DialogStrgEx, globalstring );
format( globalstring, sizeof( globalstring ),""col_white"Cena: "col_srvboja"$%d\n", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]- 400 ][ 1 ] );
strcat( DialogStrgEx, globalstring );

ShowPlayerDialog( playerid, dialog_VEHMONEYBUY, DSMSG, D_NASLOV, DialogStrgEx, "Kupi", D_ODUSTANI );
strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));

            }
return true;
}

To sa vozilima je pocelo kad se kamera sjebala
Macas
Enforcer
pre 7 godina
jel moze objasnjenje sta koja komanda treba radi (osim one "kupivozilo")?
Nikola4
Made Man
pre 7 godina
Daj dialog_VEHMONEYBUY
Jeste i Bice
Wheel Man
pre 7 godina
rizla wrote on January 19, 2019, 12:24 pm:
jel moze objasnjenje sta koja komanda treba radi (osim one "kupivozilo")?


CMD:ascamera-postavljam poziciju kamere da gleda u izlozbeno vozilo(trebalo bi kad postavim da bude kao na slici 2 ali nije vec je kao na slici 1)
cmd:asport-portam se nazad do salona kog kreiram
cmd:asvozilo-pravim izlozbeno vozilo
[SKRIPTER]Alexis
Wheel Man
pre 7 godina
Komplicirate...Mislim da bi trebalo samo ubaciti cameditor.pwn u FS, i jednostavno uci u mod i odabradi koordinate gdje se vozilo spawna i staviti kameru na njega, te uzeti koordinate i amen...Btw msm da nije do skripte vec do fukcije uzimanja koordinata igraca, dok spawnuje na def/pocetnoj fazi sto je 0.0.0 na x y z, ako to napravis "ispravno" onda se javi i postavi post vamo
Jeste i Bice
Wheel Man
pre 7 godina
Ima li neko resenje?

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava