[Pomoc] Event

Započeo master2210, Mart 27, 2013, 19:02:52 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Scripta koju koristim:NBE
Detaljan opis problema:Ovako ima eventi ali sam nacuo da je neko namerno dopisao nesto pa nece da rade, pa ja cu dati ceo event pa ako neko zna molim za pomoc.
if(strcmp(cmd, "/pokrenievent1", true) == 0)
	{
	    if(IsPlayerConnected(playerid) && (event1 == 0) && PlayerInfo[playerid][pHelper] >= 1)
	    {
			event1 = 0;
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string),"OSC %s je pokrenuo event Guranje monsterima sa zgrade,ukucaj /gotoevent ,da ucestvujes u eventu.", sendername);
			BroadCast(COLOR_LIGHTRED, string);
			BroadCast(COLOR_LIGHTRED, "<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>!");
			BroadCast(COLOR_LIGHTRED, "POCEO JE EVENT - /GOTOEVENT!");
			BroadCast(COLOR_LIGHTRED, "<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>!");
			JBC_SetPlayerPos(playerid, -1622.5671,1042.8180,69.8280);
		}
		else if(IsPlayerConnected(playerid) && (event1 == 1) && PlayerInfo[playerid][pHelper] >= 1)
		{
		    event1 = 1;
		    GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string),"OSC %s je iskljucio event ,ne mozete se vise portati!", sendername);
			BroadCast(COLOR_RED, string);
		}
		return 1;
	}

	if(strcmp(cmd, "/pokrenievent2", true) == 0)
	{
	    if(IsPlayerConnected(playerid) && (event2 == 0) && PlayerInfo[playerid][pHelper] >= 1)
	    {
			event2 = 1;
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string),"OSC %s je pokrenuo event Luna park sa zgrade,ukucaj /gotoevent ,da ucestvujes u eventu.", sendername);
			BroadCast(COLOR_LIGHTRED, string);
			BroadCast(COLOR_LIGHTRED, "<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>!");
			BroadCast(COLOR_LIGHTRED, "POCEO JE EVENT - /GOTOEVENT!");
			BroadCast(COLOR_LIGHTRED, "<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>!");
			JBC_SetPlayerPos(playerid, 1780.7184,-1898.3490,13.4688);
		}
		else if(IsPlayerConnected(playerid) && (event2 == 1) && PlayerInfo[playerid][pHelper] >= 1)
		{
		    event2 = 0;
		    GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string),"OSC %s je iskljucio event ,ne mozete se vise portati!", sendername);
			BroadCast(COLOR_RED, string);
		}
		return 1;
	}

	if(strcmp(cmd, "/pokrenievent3", true) == 0)
	{
	    if(IsPlayerConnected(playerid) && (event3 == 0) && PlayerInfo[playerid][pHelper] >= 1)
	    {
			event3 = 1;
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string),"OSC %s je pokrenuo event Kruzne trke,ukucaj /gotoevent ,da ucestvujes u eventu.", sendername);
			BroadCast(COLOR_LIGHTRED, string);
			BroadCast(COLOR_LIGHTRED, "<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>!");
			BroadCast(COLOR_LIGHTRED, "POCEO JE EVENT - /GOTOEVENT!");
			BroadCast(COLOR_LIGHTRED, "<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>!");
			JBC_SetPlayerPos(playerid, 2064.6401,1816.0283,10.6719);
		}
		else if(IsPlayerConnected(playerid) && (event3 == 1) && PlayerInfo[playerid][pHelper] >= 1)
		{
		    event3 = 0;
		    GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string),"OSC/Helper %s je iskljucio event ,ne mozete se vise portati!", sendername);
			BroadCast(COLOR_RED, string);
		}
		return 1;
	}
if(strcmp(cmd, "/pokrenievent4", true) == 0)
	{
	    if(IsPlayerConnected(playerid) && (event4 == 0) && PlayerInfo[playerid][pHelper] >= 1)
	    {
			event4 = 1;
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string),"OSC %s je pokrenuo event Hokej,ukucaj /gotoevent ,da ucestvujes u eventu.", sendername);
			BroadCast(COLOR_LIGHTRED, string);
			BroadCast(COLOR_LIGHTRED, "<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>!");
			BroadCast(COLOR_LIGHTRED, "POCEO JE EVENT - /GOTOEVENT!");
			BroadCast(COLOR_LIGHTRED, "<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>!");
			JBC_SetPlayerPos(playerid, 1370.3741, 2130.7910, 11.0156);
		}
		else if(IsPlayerConnected(playerid) && (event4 == 1) && PlayerInfo[playerid][pHelper] >= 1)
		{
		    event4 = 0;
		    GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string),"OSC/Helper %s je iskljucio event ,ne mozete se vise portati!", sendername);
			BroadCast(COLOR_RED, string);
		}
		return 1;
	}

	if(strcmp(cmd, "/gotoevent", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
            if(PlayerInfo[playerid][pJailTime] >= 1 || PlayerInfo[playerid][pRobijaTime] >= 1) return SCM(playerid,COLOR_GREY,"  Zatvoreni ste , ne mozete to !");
	        if(WantedLevel[playerid] >= 1) return SCM(playerid,COLOR_GREY,"  Imate wanted , ne mozete to !");
			if (event1 == 1)
			{
                JBC_SetPlayerPos(playerid, -1640.3408,1045.4467,69.8280);
                JBC_TogglePlayerControllable(playerid,1);
				SendClientMessage(playerid, COLOR_GRAD1, "   Teleportovani ste !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
				SetPlayerVirtualWorld(playerid,0);
			}
			else if (event2 == 1)
            {
                JBC_SetPlayerPos(playerid, 1780.7184,-1898.3490,13.4688);
                JBC_TogglePlayerControllable(playerid,1);
				SendClientMessage(playerid, COLOR_GRAD1, "   Teleportovani ste !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
				SetPlayerVirtualWorld(playerid,0);
			}
			else if (event3 == 1)
            {
                JBC_SetPlayerPos(playerid, 2064.6401,1816.0283,10.6719);
                JBC_TogglePlayerControllable(playerid,1);
				SendClientMessage(playerid, COLOR_GRAD1, "   Teleportovani ste !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
				SetPlayerVirtualWorld(playerid,0);
			}
			else if (event4 == 1)
            {
                JBC_SetPlayerPos(playerid, 1355.2581, 2129.7195, 11.0156);
                JBC_TogglePlayerControllable(playerid,1);
				SendClientMessage(playerid, COLOR_GRAD1, "   Teleportovani ste !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
				SetPlayerVirtualWorld(playerid,0);
				ApplyAnimation(playerid, "SKATE", "skate_sprint", 4.1, 1, 1, 1, 1, 1);
		        GivePlayerWeapon(playerid, 2, 1);
		        SendClientMessage(playerid, COLOR_GRAD1, "Kucaj /hockey da pocnes da igras!");
			}
		}
		return 1;
	}

	/*if(strcmp(cmd, "/gotoevent2", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
            if(PlayerInfo[playerid][pJailTime] >= 1 || PlayerInfo[playerid][pRobijaTime] >= 1) return SCM(playerid,COLOR_GREY,"  Zatvoreni ste , ne mozete to !");
	        if(WantedLevel[playerid] >= 1 || WantedPoints[playerid] >= 1) return SCM(playerid,COLOR_GREY,"  Imate wanted , ne mozete to !");
			if (event2 == 1)
            {
                JBC_SetPlayerPos(playerid, 1780.7184,-1898.3490,13.4688);
                JBC_TogglePlayerControllable(playerid,1);
				SendClientMessage(playerid, COLOR_GRAD1, "   Teleportovani ste !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
				SetPlayerVirtualWorld(playerid,0);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Event LUNA PARK nije trenutno ukljucen !");
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/gotoevent3", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
            if(PlayerInfo[playerid][pJailTime] >= 1 || PlayerInfo[playerid][pRobijaTime] >= 1) return SCM(playerid,COLOR_GREY,"  Zatvoreni ste , ne mozete to !");
	        if(WantedLevel[playerid] >= 1 || WantedPoints[playerid] >= 1) return SCM(playerid,COLOR_GREY,"  Imate wanted , ne mozete to !");
			if (event3 == 1)
            {
                JBC_SetPlayerPos(playerid, 2064.6401,1816.0283,10.6719);
                JBC_TogglePlayerControllable(playerid,1);
				SendClientMessage(playerid, COLOR_GRAD1, "   Teleportovani ste !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
				SetPlayerVirtualWorld(playerid,0);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Event KRUZNE TRKE nije trenutno ukljucen !");
			}
		}
		return 1;
	}*/

A da prvo pogledas da li rade ? :)
BIG RESPECT:Blaeks, SABO(T), |LG|Yui_Sang, Joey_

pa ne rade. proverio sam ja. pa nisam suntav  ;D ;D ;D ;D ;D

Brate NBE koji si skinuo sa neta je ubagan, niko nije lud da ti da nbe bez bugova...
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


Odakle si dobio ovo na kraju kod return  */ cemu ti to sluzi ?

bio je ubagovan sredio sam skoro sve bugove sa kolima i sve ostale. a neznam sta zanci to na kraju.

Citat: Francisco. poslato Mart 28, 2013, 15:11:07 POSLE PODNE
Odakle si dobio ovo na kraju kod return  */ cemu ti to sluzi ?

To je komentar  8)
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


pa jer zna neko gde je greska ili ne???

Ne razumijem kakvu ti tu grešku imaš ?
Poslednja Izmena: Mart 28, 2013, 18:25:04 POSLE PODNE od FlasH
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

pa kad udjem u igricu i kucam pokreni event 2, 3 ,4 nebitno kiji nista se ne desava...razumes sad? :)