Bug u OnPlayerStateChange

Započeo Jiky, April 14, 2020, 00:43:43 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): BUG
Dio skripte: [ pawn ]Bice dolje[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/cJ9EzNW

new copcar[12];
new gangcar[12];
new mafiacar[13];


////////////////////////////////////////////////////////////////////////////////
	copcar[0] = AddStaticVehicle(461,-2176.5295,-2369.8828,30.3461,142.8881,1,1); // copcar
	copcar[1] = AddStaticVehicle(596,-2178.8704,-2368.1467,30.3463,140.8017,1,1); // copcar
	copcar[2] = AddStaticVehicle(596,-2170.5442,-2359.1199,30.3578,49.0319,1,1); // copcar
	copcar[3] = AddStaticVehicle(596,-2140.3013,-2383.3933,30.3476,230.1130,1,1); // copcar
	copcar[4] = AddStaticVehicle(596,-2147.7207,-2377.1926,30.3449,230.1128,1,1); // copcar
	copcar[5] =	AddStaticVehicle(523,-2151.2798,-2395.8191,30.2088,139.3783,1,1); // copbike
	copcar[6] =	AddStaticVehicle(523,-2152.3027,-2395.0774,30.2100,139.5983,1,1); // copbike
	copcar[7] =	AddStaticVehicle(523,-2153.2534,-2393.8757,30.2084,139.9636,1,1); // copbike
	copcar[8] =	AddStaticVehicle(523,-2154.3506,-2393.1653,30.2086,140.4144,1,1); // copbike
	copcar[9] =	AddStaticVehicle(523,-2155.5986,-2392.3210,30.2073,139.7035,1,1); // copbike
	copcar[10] = AddStaticVehicle(497,-2165.9055,-2374.4033,37.9662,50.9700,1,1); // copheli
	copcar[11] = AddStaticVehicle(497,-2149.7896,-2387.6289,37.9648,230.9463,1,1); // copheli
////////////////////////////////////////////////////////////////////////////////
	gangcar[0] = AddStaticVehicle(412,-2051.6411,-2465.8118,30.3457,141.1588,6,6); // gangcar
	gangcar[1] = AddStaticVehicle(412,-2049.1655,-2467.7727,30.3465,140.1435,6,6); // gangcar
	gangcar[2] = AddStaticVehicle(419,-2054.0801,-2474.6079,30.2652,51.0212,6,6); // gangcar
	gangcar[3] = AddStaticVehicle(413,-2065.7703,-2457.3672,30.3460,141.3405,6,6); // gangwan
	gangcar[4] = AddStaticVehicle(413,-2062.2971,-2459.8716,30.3451,142.9717,6,6); // gangwan
	gangcar[5] = AddStaticVehicle(419,-2069.3088,-2462.5579,30.3488,52.0249,6,6); // gangcar
	gangcar[6] = AddStaticVehicle(471,-2062.7407,-2464.2932,30.2091,142.0455,6,6); // gangbike
	gangcar[7] = AddStaticVehicle(471,-2061.7983,-2464.9417,30.2088,142.2009,6,6); // gangbike
	gangcar[8] = AddStaticVehicle(468,-2049.6980,-2478.2415,30.1255,49.8260,6,6); // gangbike
	gangcar[9] = AddStaticVehicle(468,-2071.8853,-2457.7324,30.1995,50.2164,6,6); // gangbike
	gangcar[10] = AddStaticVehicle(471,-2057.4946,-2468.1482,30.2016,51.3484,6,6); // gangbike
	gangcar[11] = AddStaticVehicle(471,-2047.6237,-2471.2986,30.1936,88.7409,6,6); // gangbike
////////////////////////////////////////////////////////////////////////////////
	mafiacar[0] = AddStaticVehicle(445,-2237.7939,-2296.8516,30.2929,230.1713,0,0); // mafiacar
	mafiacar[1] = AddStaticVehicle(445,-2239.5854,-2299.8032,30.1903,231.9697,0,0); // mafiacar
	mafiacar[2] = AddStaticVehicle(507,-2242.2485,-2302.3169,29.9631,230.3257,0,0); // mafiacar
	mafiacar[3] = AddStaticVehicle(507,-2244.1138,-2305.1982,29.7837,229.6174,0,0); // mafiacar
	mafiacar[4] = AddStaticVehicle(579,-2219.1313,-2314.3440,30.3243,139.8287,0,0); // mafiacar
	mafiacar[5] = AddStaticVehicle(579,-2216.8665,-2316.6931,30.3260,142.0584,0,0); // mafiacar
	mafiacar[6] = AddStaticVehicle(405,-2214.0078,-2318.5901,30.3273,139.5692,0,0); // mafiacar
	mafiacar[7] = AddStaticVehicle(413,-2190.8599,-2322.7200,30.3452,50.9578,0,0); // mafiawan
	mafiacar[8] =	AddStaticVehicle(461,-2247.5227,-2306.3672,29.3718,224.4810,0,0); // mafiabike
	mafiacar[9] =	AddStaticVehicle(461,-2248.7263,-2307.7988,29.2631,226.6970,0,0); // mafiabike
	mafiacar[10] =	AddStaticVehicle(461,-2249.7214,-2309.3047,29.1678,226.6605,0,0); // mafiabike
	mafiacar[11] =	AddStaticVehicle(461,-2250.8037,-2310.0154,29.0736,230.9561,0,0); // mafiabike
	mafiacar[12] = AddStaticVehicle(487,-2232.9226,-2309.3154,30.7764,138.3789,0,0); // mafiaheli


public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(newstate == PLAYER_STATE_DRIVER)
	{
	   	new carid = GetPlayerVehicleID(playerid);
	   	if(carid == copcar[0] || copcar[1] || copcar[2] || copcar[3] || copcar[4] || copcar[5] || copcar[6] || copcar[7] || copcar[8] || copcar[9] || copcar[10] || copcar[11])
	   	{
	     	if(gTeam[playerid] == TEAM_COPS)
    	{

		}
	       	else
		{
	         	SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{33CCFF}Auto je namenjeno samo Policajcima!");
				RemovePlayerFromVehicle(playerid);
			}
		}
		if(carid == gangcar[0] || gangcar[1] || gangcar[2] || gangcar[3] || gangcar[4] || gangcar[5] || gangcar[6] || gangcar[7] || gangcar[8] || gangcar[9] || gangcar[10] || gangcar[11])
	   	{
	     	if(gTeam[playerid] == TEAM_VAGOS)
	     	{

	     	}
	       	else
	       	{
	          	SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{33CCFF}Auto je namenjeno samo Vagosima!");
				RemovePlayerFromVehicle(playerid);
			}
		}
		if(carid == mafiacar[0] || mafiacar[1] || mafiacar[2] || mafiacar[3] || mafiacar[4] || mafiacar[5] || mafiacar[6] || mafiacar[7] || mafiacar[8] || mafiacar[9] || mafiacar[10] || mafiacar[11] || mafiacar[12])
		{
		    if(gTeam[playerid] == TEAM_TRIADS)
		    {

		    }
		    else
		    {
		        SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{33CCFF}Auto je namenjeno samo Triadama!");
		        RemovePlayerFromVehicle(playerid);
			}
     	}
	}
	return 1;
}


Eo kod.. bug je na onplayerstatechange.. nema nikakih errora.. ako moze neko da mi helpa.. imate sliku bug-a gore!
Naime.. kad udjem u auto pd-a sa klasom PD-a .. izbaci mi da je auto namenjeno gangsterima :D  nemogu fixat 2 dana :(
Ako zna neko neka ostawi reply :)