Komanda /artc


Započeo .варнинг, Jul 04, 2018, 16:50:22 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Ubacio sam komandu /artc koja respawna odredjena vozila(od org, rent, izlozbena..) ali kada pokrenem artc ono ispise "Rac je pokrenut vozila ce se respawn za 20 sec.." ali se ne respawnaju.
Dio skripte: Cmd
YCMD:artc(playerid, params[], help)
	{
	new target;
	if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,""CRVENA"[ERROR]"BELA" Morate se ulogovati!");
	if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid, -1, ""CRVENA"[ERROR]"BELA" Niste ovlasceni!");
	if(PlayerInfo[target][pARTC] == 1) return SCM(playerid,-1,""CRVENA"[ERROR]"BELA" Respawn je vec pokrenut.");
	new artc[224];
 	if(sscanf(params, "s[224]", artc))
	{
		SCM(playerid,-1,""CRVENA"[LG:RPG] "BELA"/artc [Vrsta]");
		SCM(playerid,-1,""CRVENA"[VRSTE] "BELA"1. Owanble | 2. Rent | 3. Organizacijska | 4. Vozila Posla | 5. Ostalo(Izlozbena/VIP/karting) | 6. Sva vozila");
		return 1;
	}
	if(!strcmp(artc, "1", true)){
	if(PlayerInfo[playerid][pAdmin] < 5) return SCM(playerid,-1,""CRVENA"[ERROR]"BELA" Niste ovlasceni!");
	SPD(playerid, 21426, DIALOG_STYLE_LIST, "Owanble", "Sve\nAuta\nMotori\nBicikle\nLetjelice\nBrodovi", "Izaberi", "Izlaz" );
	}
	else if(!strcmp(artc, "2", true)){
	SPD(playerid, 21425, DIALOG_STYLE_LIST, "Rent", "Sve\nAuta\nMotori\nBicikle", "Izaberi", "Izlaz" );
	}
	else if(!strcmp(artc, "3", true)){
	SPD(playerid, 21423, DIALOG_STYLE_LIST, "Organizacijska", "Sve\nLos Santos Police Department\nThe Vinci Family\nBlack Dragon Triads\nGrove Street Family\nBallas\nNovinari\nFBI\nParking Servis\nCondor\nHitman Agency\nBlue Lagoon\nBlue Terra\nTRM\nTaxi\nYakuza\nVagosGang\nBlack Cobra Corporation\nTSF\nDeathRow\nBloodyEagles\nLeft Coast Family", "Izaberi", "Izlaz" );
	}
	else if(!strcmp(artc, "4", true)){
	if(PlayerInfo[playerid][pAdmin] < 5) return SCM(playerid,-1,""CRVENA"[ERROR]"BELA" Niste ovlasceni!");
	SPD(playerid, 21424, DIALOG_STYLE_LIST, "Vozila Posla", "Sve\nBus Vozac\nKosac Trave\nMehanicar\nPostar\nKomunalac\nGradjevinar\nBolnicar\nGrobar\nDzeparos\nFarmer\nMasinovodja\nDostavljac\nKamiondzija\nPilot\nElektricar\nVodoinstalater\nRudar\nDrvoseca\nRibar", "Izaberi", "Izlaz" );
	}
 	else if(!strcmp(artc, "5", true)){
	SPD(playerid, 21429, DIALOG_STYLE_LIST, "Ostalo(Izlozbena/VIP/karging)", "Sve\nVip Vozila\nIzlozbena\nKarting", "Izaberi", "Izlaz" );
	}
	else if(!strcmp(artc, "6", true)){
	if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,-1,""CRVENA"[ERROR]"BELA" Niste ovlasceni!");
	SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
	SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
	SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Sva vozila.");
	SetTimerEx("RespawnARTC",20000,0,"i",playerid);
	}
	else return SCM(playerid,-1,""CRVENA"[ERROR] "BELA"Nepostojaca vrsta.");
	return 1;
}

Dialog: Dialog za org respawn(njega najj. koristim)
fDialog(21423)   ////
{
	if(response)
	{
		foreach(Player, i)
		{
			if(listitem == 0)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizaciska - Sve.");
				SetTimerEx("RespawnAll",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 1)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - LSPD.");
				SetTimerEx("RacPD",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 2)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - TVF.");
				SetTimerEx("TVFRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 3)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - BDT.");
				SetTimerEx("TBTRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 4)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - GSF.");
				SetTimerEx("GSFRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 5)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Ballas.");
				SetTimerEx("BallasRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 6)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Novinar.");
				SetTimerEx("NovinariRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 7)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - FBI.");
				SetTimerEx("FBIRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 8)
			{
    			SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Parking Serviser.");
				SetTimerEx("ParkingServisRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 9)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Condor.");
				SetTimerEx("CondorRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 10)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Hitman Agency.");
				SetTimerEx("HITMANRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 11)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Blue Lagoon.");
				SetTimerEx("BlueLagoonRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
   			if(listitem == 12)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - BlueTerra.");
				SetTimerEx("BTRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 13)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - TRM.");
				SetTimerEx("LVGRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
   			if(listitem == 14)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Taxi.");
				SetTimerEx("TaxiRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
   			if(listitem == 15)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Yakuza.");
				SetTimerEx("YakuzaRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 16)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - VG.");
				SetTimerEx("VGRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
   			if(listitem == 17)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - BCC.");
				SetTimerEx("RacBCC",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 18)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - The South Family.");
				SetTimerEx("TSFRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 19)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Death Row.");
				SetTimerEx("DeathRowRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 20)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Bloody Eagles.");
				SetTimerEx("BERac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
			if(listitem == 21)
			{
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Administrator je pokrenuo respawn vozila za 20 sekundi.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Udjite u vase vozilo kako bi ga sacuvali.");
				SendClientMessageToAll(-1, ""ORANGE"[!!!] Vrsta respana: Organizacija - Left Coast Family.");
				SetTimerEx("LCFRac",20000,0,"i",playerid);
				new play;
				PlayerInfo[play][pARTC] = 1;
			}
		}
	}
	return 1;
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): ///
Slika/video ingame problema(obavezno ako je ingame problem): http://prntscr.com/k2i0xp
                                                                                 
Legacy Gaming Since 2017 ©

Scripter and Founder
Scripting 3+ Years
https://www.facebook.com/LegacyGamingOGC/ (FB Stranica)
https://www.facebook.com/nikolaa.jovicic (FB Nalog)

                                                                                 

A zasto koristis SetTimerEx, koristi SetTimer umjesto njega istavi da ti se ta funkcija ne ponavlja.

http://wiki.sa-mp.com/wiki/SetTimer

Najveca mana tog sistema sto moras funkcije po funkcije....!!!! ORGANIZACIJSKO VOZILO 1 ITD
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]