[POMOC]Auta gTeam-a

Započeo Arnel_Bp, Mart 11, 2014, 17:09:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: moja
Detaljan opis problema: Pa napravio sam 3 gTeam-a u pawno, i napravio CARS ali trebaju mi odredjena auta koja sam stavio pod ArmyVozilo
  • do ArmyVozilo [35] treba mi kako samo to sto sam stavio mogu da stavim da samo TEAM_ARMY moze da ga vozi, ako udje TEAM_COP ILI TEAM_SWAT da ga izbaci iz auta, trazio sam ovo ali nikako ne mnogu da shvatim kako se ovo radi, ako bi neko mogao ovo da mi uradi, lakse cu shvatiti kako posle da uradim za admin vozila/cop/swat :) Hvala
    Dio skripte:

    Evo vozila

    new ArmyVozilo[36];
    


    ArmyVozilo [0] = AddStaticVehicleEx(425, 2827.3567, -2511.2375, 17.6339, -50.0000, 149,149, 120);
    	ArmyVozilo [1] =AddStaticVehicleEx(425, 2827.1699, -2527.6560, 17.6339, -50.0000, 149,149, 120);
    	ArmyVozilo [2] =AddStaticVehicleEx(425, 2827.3176, -2544.6189, 17.6339, -50.0000, 149,149, 120);
    	ArmyVozilo [3] =AddStaticVehicleEx(425, 2831.7776, -2564.5037, 17.6339, 0.0000, 149,149, 120);
    	ArmyVozilo [4] =AddStaticVehicleEx(432, 2823.4468, -2413.3616, 9.9063, -90.0000, 149,149, 120);
    	ArmyVozilo [5] =AddStaticVehicleEx(432, 2823.5957, -2404.9746, 9.9063, -90.0000, 149,149, 120);
    	ArmyVozilo [6] =AddStaticVehicleEx(432, 2823.5122, -2396.9883, 9.9063, -90.0000, 149,149, 120);
    	ArmyVozilo [7] =AddStaticVehicleEx(432, 2823.8765, -2422.0730, 9.9063, -90.0000, 149,149, 120);
    	ArmyVozilo [8] =AddStaticVehicleEx(470, 2841.2358, -2529.4829, 9.8245, 0.0000, 149,149, 120);
    	ArmyVozilo [9] =AddStaticVehicleEx(470, 2835.8459, -2529.3464, 9.8245, 0.0000, 149,149, 120);
    	ArmyVozilo [10] =AddStaticVehicleEx(470, 2830.2883, -2529.0569, 9.8245, 0.0000, 149,149, 120);
    	ArmyVozilo [11] =AddStaticVehicleEx(471, 2820.6484, -2520.1533, 9.3163, -90.0000, 149,149, 120);
    	ArmyVozilo [12] =AddStaticVehicleEx(471, 2820.6179, -2517.8655, 9.3163, -90.0000, 149,149, 120);
    	ArmyVozilo [13] =AddStaticVehicleEx(471, 2820.6411, -2515.2754, 9.3163, -90.0000, 149,149, 120);
    	ArmyVozilo [14] =AddStaticVehicleEx(468, 2820.5522, -2512.7834, 9.5168, -90.0000, 149,149, 120);
    	ArmyVozilo [15] =AddStaticVehicleEx(468, 2820.5732, -2511.0635, 9.5168, -90.0000, 149,149, 120);
    	ArmyVozilo [16] =AddStaticVehicleEx(468, 2820.6565, -2509.4102, 9.5168, -90.0000, 149,149, 120);
    	ArmyVozilo [17] =AddStaticVehicleEx(470, 2821.3721, -2385.6226, 16.6457, -90.0000, 149,149, 120);
    	ArmyVozilo [18] =AddStaticVehicleEx(470, 2821.4417, -2391.0120, 16.6457, -90.0000, 149,149, 120);
    	ArmyVozilo [19] =AddStaticVehicleEx(433, 2823.0105, -2397.2395, 17.3534, -90.0000, 149,149, 120);
    	ArmyVozilo [20] =AddStaticVehicleEx(433, 2822.8284, -2380.8079, 17.3534, -90.0000, 149,149, 120);
    	ArmyVozilo [21] =AddStaticVehicleEx(520, 2800.8269, -2546.0010, 14.2705, 0.0000, 149,149, 120);
    	ArmyVozilo [22] =AddStaticVehicleEx(520, 2781.9058, -2546.0273, 14.2705, 0.0000, 149,149, 120);
    	ArmyVozilo [23] =AddStaticVehicleEx(520, 2763.3464, -2546.0217, 14.2705, 0.0000, 149,149, 120);
    	ArmyVozilo [24] =AddStaticVehicleEx(469, 2762.0962, -2343.7761, 13.6391, -180.0000, 149,149, 120);
    	ArmyVozilo [25] =AddStaticVehicleEx(469, 2774.7000, -2343.1660, 13.6391, -180.0000, 149,149, 120);
    	ArmyVozilo [26] =AddStaticVehicleEx(469, 2787.2393, -2342.8333, 13.6391, -180.0000, 149,149, 120);
    	ArmyVozilo [27] =AddStaticVehicleEx(469, 2800.1309, -2342.3215, 13.6391, -180.0000, 149,149, 120);
    	ArmyVozilo [28] =AddStaticVehicleEx(433, 2746.7212, -2462.5127, 14.1609, -90.0000, 149,149, 120);
    	ArmyVozilo [29] =AddStaticVehicleEx(433, 2746.6338, -2469.8428, 14.1609, -90.0000, 149,149, 120);
    	ArmyVozilo [30] =AddStaticVehicleEx(432, 2745.3445, -2447.0378, 13.6992, -90.0000, 149,149, 120);
    	ArmyVozilo [31] =AddStaticVehicleEx(432, 2745.4456, -2438.7363, 13.6992, -90.0000, 149,149, 120);
    	ArmyVozilo [32] =AddStaticVehicleEx(469, 2763.7959, -2375.9614, 13.6391, -90.0000, 149,149, 120);
    	ArmyVozilo [33] =AddStaticVehicleEx(469, 2763.4204, -2361.9587, 13.6391, -90.0000, 149,149, 120);
    	ArmyVozilo [34] =AddStaticVehicleEx(469, 2798.3994, -2376.3604, 13.6391, 90.0000, 149,149, 120);
    	ArmyVozilo [35] = AddStaticVehicleEx(469, 2798.3870, -2361.9993, 13.6391, 90.0000, 149,149, 120);
    

    Neke slike/video za lakse dobivanje pomoci(neobavezno):

    Hvala jos jednom unaprije, nadam se da cete mi pomoci.

pa Pod OnPlayerStateChange dodaj:

if(newstate == PLAYER_STATE_DRIVER) 
{
new v = GetPlayerVehicleID(playerid);
if(v >= ArmyVozilo[0] && v <= ArmyVozilo[35])
		{
		    if(gTeam[playerid] == TEAM_ARMY) { }
		    else {
		        SCM(playerid, GRAD2, "{07C1F5}{FFFFFF}Niste Team Army.");
		        RemovePlayerFromVehicle(playerid);
		        return 1; }
		}
}

My Bike KTM 450 SXF 2008

Citat: LS|Vuzimir poslato Mart 11, 2014, 17:14:37 POSLE PODNE
pa Pod OnPlayerStateChange dodaj:

if(newstate == PLAYER_STATE_DRIVER) 
{
new v = GetPlayerVehicleID(playerid);
if(v >= ArmyVozilo[0] && v <= ArmyVozilo[35])
		{
		    if(gTeam[playerid] == TEAM_ARMY) { }
		    else {
		        SCM(playerid, GRAD2, "{07C1F5}{FFFFFF}Niste Team Army.");
		        RemovePlayerFromVehicle(playerid);
		        return 1; }
		}
}


ovako sam stavio

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newstate == PLAYER_STATE_DRIVER)
	{
	new v = GetPlayerVehicleID(playerid);
	if(v >= ArmyVozilo[0] && v <= ArmyVozilo[35])
	{
 	if(gTeam[playerid] == TEAM_ARMY) { }
  	else {
   	SendClientMessage(playerid, 0xFF0000FF, "This is Army's vehicle. You can't drive this.");
    RemovePlayerFromVehicle(playerid);
		        return 1;
				 }
		}
}


ima preko 20 errora nesto mi izbacuje da je nepoznat newstate i jos nesto evo slike http://www.zaslike.com/viewer.php?file=qc9hmo9j3ejhebpylc7.png sta mu je problem ?

if(newstate == PLAYER_STATE_DRIVER)
{
	new v = GetPlayerVehicleID(playerid);
	if(v >= ArmyVozilo[0] && v <= ArmyVozilo[35])
	{
 	if(gTeam[playerid] == TEAM_ARMY) { }
  	else {
   	SendClientMessage(playerid, 0xFF0000FF, "This is Army's vehicle. You can't drive this.");
    RemovePlayerFromVehicle(playerid);
	}
	}
}
69

Citat: [UG]C++ poslato Mart 11, 2014, 17:33:48 POSLE PODNE
if(newstate == PLAYER_STATE_DRIVER)
{
	new v = GetPlayerVehicleID(playerid);
	if(v >= ArmyVozilo[0] && v <= ArmyVozilo[35])
	{
 	if(gTeam[playerid] == TEAM_ARMY) { }
  	else {
   	SendClientMessage(playerid, 0xFF0000FF, "This is Army's vehicle. You can't drive this.");
    RemovePlayerFromVehicle(playerid);
	}
	}
}


izbacuje mi sad error na newstate sta cu mu tu staviti ? :)
Poslednja Izmena: Mart 11, 2014, 17:39:03 POSLE PODNE od Arnel_Bp

Ovo radi ali kad mi TEAM_Army udje isto ga izbaci iz auta? Sta mu je problem ? druga auta rade normalno ?

Citat: Arnel_Bp poslato Mart 11, 2014, 17:50:45 POSLE PODNE
Ovo radi ali kad mi TEAM_Army udje isto ga izbaci iz auta? Sta mu je problem ? druga auta rade normalno ?

pa najverovatnije ne postavi team_army kada izaberes army pa te izbaci provjeri kada biras klasu i kada izaberes dali army dali ima tu onda gTeam[playerid] = TEAM_ARM; ?

to ti se nalazi pod OnPlayerRequestClass
Poslednja Izmena: Mart 11, 2014, 18:18:56 POSLE PODNE od LS|Vuzimir

My Bike KTM 450 SXF 2008