Auta na spawnu


Započeo .ysi, Januar 07, 2022, 16:33:09 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Ubacio sam auta na spawn,i kad udjem u auto izbaci dialog oko parkiranja,pa kad taj dialog zatvorim izbaci da je auto pokvareno i kada popravim auto izbaci da auto nema goriva..tek kada ga napunim gorivom moze se voziti kako treba.Inace koristi mod Athlone v2.0  dole ce biti slike ovoga..
Deo skripte:
new Text3D:PrimerLabel[ MAX_VEHICLES ], voziloid;
    voziloid = AddStaticVehicle(411,1279.2249,-1835.2574,13.2803,90.1151,3,3); // KOLA BROJ 1
    PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.5289,-1831.9709,13.2796,89.8399,3,3); // KOLA BROJ 2
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.2336,-1828.6803,13.2796,89.5260,3,3); // KOLA BROJ 3
    PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.3916,-1825.6343,13.2799,90.3913,3,3); // KOLA BROJ 4
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.4926,-1822.2946,13.2804,88.8627,3,3); // KOLA BROJ 5
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.4823,-1819.2698,13.2800,89.8814,3,3); // KOLA BROJ 6
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.1329,-1816.3285,13.2798,91.4635,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.2216,-1813.1702,13.2796,89.7282,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.2683,-1809.7084,13.2789,89.8044,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.7345,-1806.4529,13.2786,89.4189,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.0734,-1803.0953,13.2798,89.8116,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.4742,-1799.4055,13.2820,91.3262,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1279.5011,-1795.8875,13.2842,90.2873,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1261.9196,-1797.0010,13.3132,179.4054,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1264.9753,-1797.1440,13.3077,180.3134,3,3);
    PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1268.5471,-1797.4650,13.3011,180.1965,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);
	voziloid = AddStaticVehicle(411,1271.6868,-1796.8557,13.2967,179.6088,3,3);
	PrimerLabel[ voziloid ] = Create3DTextLabel(""col_yelow"[ BESPLATNO VOZILO ]",-1, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(PrimerLabel[ voziloid ], voziloid, 0.0, 0.0, 0.0);

if( vCanDrive[ GetPlayerVehicleID( playerid ) ] == 0 ) {
			SetCameraBehindPlayer( playerid );
			SCM( playerid, CRVENA, "Ovo vozilo je unisteno. Koristite /call 555 ili ukucajte /exit za napustanje vozila.");
			GetVehicleParamsEx( GetPlayerVehicleID( playerid ),engine, lights, alarm, doors, bonnet, boot, objective );
			SetVehicleParamsEx( GetPlayerVehicleID( playerid ),0,lights,alarm,doors,bonnet,boot,objective);
		}

if( PRESSED( KEY_SUBMISSION ) ) {
        if( IsPlayerInAnyVehicle( playerid ) && GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) {
	        new vehicle = GetPlayerVehicleID( playerid ),
				engine,lights,alarm,doors,bonnet,boot,objective;

		 	if( vCanDrive[ vehicle ] == 0 ) return GRESKA( playerid, "Ovo vozilo je unisteno i ne moze se pokrenuti.");
		    if( IsVehicleBajs( vehicle ) ) return GRESKA( playerid, "Stvarno mislis upaliti biciklu? " );
			if( Fuel[ vehicle ] == 0 ) return GRESKA( playerid, "Vozilo nema goriva ne mozete ga upaliti." );

			if( TipVozila[ vehicle ] == PRIVATNO_VOZILO ) {

				if( PlayerInfo[ playerid ][ xAdmin ] >= 5 ) { }
				else {
			        if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 0 ] ][ vID ] == vehicle ) { }
				    else if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 1 ] ][ vID ] == vehicle ) { }
				    else if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 2 ] ][ vID ] == vehicle ) { }
				    else if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] != -1 && VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 3 ] ][ vID ] == vehicle ) { }
                    else if( PlayerInfo[ playerid ][ xRezervniKljucevi ] == ScriptIDVozila[ vehicle ] ) { }
					else return GRESKA( playerid, "Ovo nije vase vozilo." );
				}

	            GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
				if( engine == 1 ) return GRESKA( playerid, "Motor vozila je vec upaljen." );
				format( globalstring, sizeof( globalstring ), " %s pokusava pokrenuti motor.", ImeIgraca( playerid ) );
				PorukaRadius( 20.0, playerid, globalstring, SIVA );
				SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
				SetPVarInt( playerid, "StartingVehicle", 1 );

			}
	        else if( TipVozila[ vehicle ] == ORGANIZACIJSKO_VOZILO ) {
				if( OrgaVozila[ vehicle ] == PlayerInfo[ playerid ][ xClan ] || PlayerInfo[ playerid ][ xAdmin ] >= 5 ) {
				    GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
					if( engine == 1 ) return GRESKA( playerid, "Motor vozila je vec upaljen." );
					format( globalstring, sizeof( globalstring ), " %s pokusava pokrenuti motor.", ImeIgraca( playerid ) );
					PorukaRadius( 20.0, playerid, globalstring, SIVA );
					SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
					SetPVarInt( playerid, "StartingVehicle", 1 );

				}
				else {
					GRESKA( playerid, "Nemate kljuc ovog vozila.");

				}
	        }

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

Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/S2b2FDN
Poslednja Izmena: Januar 15, 2022, 11:28:52 PRE PODNE od 'xza
e

Galardo

*

mgWhosyGD

if( vCanDrive[ vehicle ] == 0 ) return GRESKA( playerid, "Ovo vozilo je unisteno i ne moze se pokrenuti.");
		    if( IsVehicleBajs( vehicle ) ) return GRESKA( playerid, "Stvarno mislis upaliti biciklu? " );
			if( Fuel[ vehicle ] == 0 ) return GRESKA( playerid, "Vozilo nema goriva ne mozete ga upaliti." );


Kao sto i sam mozes vidjeti, tu si ti varijable, dakle postavi te vrijednosti varijabli na vise.

Ali kako brate,pomozi molim te
e

Evo stavio sam ovo:     
if( vCanDrive[ vehicle ] == 1 ) return GRESKA( playerid, "Ovo vozilo je unisteno i ne moze se pokrenuti.");
		    if( IsVehicleBajs( vehicle ) ) return GRESKA( playerid, "Stvarno mislis upaliti biciklu? " );
			if( Fuel[ vehicle ] == 1 ) return GRESKA( playerid, "Vozilo nema goriva ne mozete ga upaliti." );

i radi sve ali sad ne znam da li ce izbacivati poruka da se vozilo ne moze upaliti kada stvarno ne bude goriva...i jos mi izbacuje onaj dijalog za parking
e

Cekaj koristis ath mod imas /server i kreiras rent jednostavno neko da se bahces tako

Citat: audi100 poslato Januar 07, 2022, 17:40:21 POSLE PODNE
Cekaj koristis ath mod imas /server i kreiras rent jednostavno neko da se bahces tako
ne zna da pronadje rcon code 100%

Galardo

*

mgWhosyGD

Citat: Sync poslato Januar 07, 2022, 17:08:33 POSLE PODNE
Ali kako brate,pomozi molim te
Idi gdje kreiras ta vozila i na njihov id dodijeli vece vrijednosti od 0.
Tipa Fuel[tvoj id vozila] = 90


Ma znam da pronadjem rcon kod,nego nisam video da to ima na /server,hvala ! Ali sad kako nastimati komandu /avozilo,to nikako ne znam...
e

Citat: Sync poslato Januar 07, 2022, 18:51:49 POSLE PODNE
Ma znam da pronadjem rcon kod,nego nisam video da to ima na /server,hvala ! Ali sad kako nastimati komandu /avozilo,to nikako ne znam...
Mislis kad ukucas komandinda se spavnaju automobil ili da ti izadje kao panel da izaberes automobil

Citat: audi100 poslato Januar 07, 2022, 20:25:52 POSLE PODNE
Mislis kad ukucas komandinda se spavnaju automobil ili da ti izadje kao panel da izaberes automobil
da izadje panel i da biram auta odredjena za koja napravim notepad file i ubacim u scriptfiles...kontas sta zelim da kazem
e

Citat: Sync poslato Januar 07, 2022, 20:41:48 POSLE PODNE
da izadje panel i da biram auta odredjena za koja napravim notepad file i ubacim u scriptfiles...kontas sta zelim da kazem
Javi se dm pokazacu ti  ;D

Citat: Sync poslato Januar 07, 2022, 20:41:48 POSLE PODNE
da izadje panel i da biram auta odredjena za koja napravim notepad file i ubacim u scriptfiles...kontas sta zelim da kazem
vhttps://www.mediafire.com/file/rv6uisx996q9f37/vozila+fs.rar/file slicno kao na skill areni mslm isto ali nema mnogo vozilo eto ona osnovna


Citat: 5eed poslato Januar 07, 2022, 22:42:15 POSLE PODNE
Mislis da ce znati da  ubaciti ovo?
Odakle znam valjda mu nije tesko da ubaci u folder filterscripts i da postavi u server.cfg