[POMOC] Checkpoint

Započeo L.U.X, April 05, 2012, 21:58:22 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Raven's edit
Detaljan opis problema:Kad napravim vise ruta za razlicite poslove neki mi nerade a neke odem do prvog cp i odma mi da novce,sve sam uredi napravio i nezma u cemu je proglem.
Dio skripte:    
if(Buslinija1[playerid] == 1)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
				TogglePlayerControllable(playerid, 0);
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Morate cekati 10 sekundi.");
        		DisablePlayerCheckpoint(playerid);
  		 		SetPlayerCheckpoint(playerid, 2227.6953,-2201.9053,13.5164, 5.0);
				Buslinija1[playerid] = 2;
	        }
	    }
	    return 1;
	}
	if(Buslinija1[playerid] == 2)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
				TogglePlayerControllable(playerid, 0);
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Morate cekati 10 sekundi.");
        		DisablePlayerCheckpoint(playerid);
				SetPlayerCheckpoint(playerid, 2719.9419,-2030.2104,13.5076, 5.0);
	    		Buslinija1[playerid] = 3;
	        }
	    }
	    return 1;
	}
	if(Buslinija1[playerid] == 3)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
				TogglePlayerControllable(playerid, 0);
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Morate cekati 10 sekundi.");
        		DisablePlayerCheckpoint(playerid);
				SetPlayerCheckpoint(playerid, 2470.8059,-1926.7136,13.5125, 5.0);
	    		Buslinija1[playerid] = 4;
	        }
	    }
	    return 1;
	}
	if(Buslinija1[playerid] == 4)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
				TogglePlayerControllable(playerid, 0);
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Morate cekati 10 sekundi.");
        		DisablePlayerCheckpoint(playerid);
				SetPlayerCheckpoint(playerid, 2348.0249,-1695.8247,13.5286, 5.0);
        		Buslinija1[playerid] = 5;
	        }
	    }
	    return 1;
	}
	if(Buslinija1[playerid] == 5)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
				TogglePlayerControllable(playerid, 0);
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Morate cekati 10 sekundi.");
        		DisablePlayerCheckpoint(playerid);
				SetPlayerCheckpoint(playerid, 2422.4092,-1251.1915,23.9176, 5.0);
        		Buslinija1[playerid] = 6;
	        }
	    }
	    return 1;
	}
	if(Buslinija1[playerid] == 6)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
				TogglePlayerControllable(playerid, 0);
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Morate cekati 10 sekundi.");
        		DisablePlayerCheckpoint(playerid);
				SetPlayerCheckpoint(playerid, 2717.7463,-1218.8141,64.9276, 5.0);
        		Buslinija1[playerid] = 7;
	        }
	    }
	    return 1;
	}
	if(Buslinija1[playerid] == 7)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
				TogglePlayerControllable(playerid, 0);
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Morate cekati 10 sekundi.");
        		DisablePlayerCheckpoint(playerid);
				SetPlayerCheckpoint(playerid, 2173.1165,-1114.3069,25.4259, 5.0);
				Buslinija1[playerid] = 8;
	        }
	    }
	    return 1;
	}
	if(Buslinija1[playerid] == 8)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
				TogglePlayerControllable(playerid, 0);
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Morate cekati 10 sekundi.");
        		DisablePlayerCheckpoint(playerid);
				SetPlayerCheckpoint(playerid, 2028.4354,-1259.1379,23.9287, 5.0);
				Buslinija1[playerid] = 9;
	        }
	    }
	    return 1;
	}
	if(Buslinija1[playerid] == 9)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
				TogglePlayerControllable(playerid, 0);
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Morate cekati 10 sekundi.");
        		DisablePlayerCheckpoint(playerid);
				SetPlayerCheckpoint(playerid, 1799.8242,-1890.6355,13.5032, 5.0);
				Buslinija1[playerid] = 10;
	        }
	    }
	    return 1;
	}
	if(Buslinija1[playerid] == 10)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        if(IsABus(carid))
	        {
				new money = (random(300-10)+50);
	  			SafeGivePlayerMoney(playerid, money);
				format(string, sizeof(string),"~w~Ruta zavrsena, Zarada:~g~$%d", money);
	            GameTextForPlayer(playerid, string, 5000, 1);
	    		DisablePlayerCheckpoint(playerid);
	        }
	    }
	    return 1;
	}


MODERATOR: Stavljaj kodove u [ code ] [ /code ]
Poslednja Izmena: April 05, 2012, 22:01:08 POSLE PODNE od Joey_