Posebna auta za posebne klase mali problemi.. xd

Započeo Jiky, April 13, 2020, 19:04:56 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Error?(BUG)
Kod ce biti dolje..
Ne treba slika
Ne treba srw log

copcar1	= AddStaticVehicle(596,-2176.5295,-2369.8828,30.3461,142.8881,1,1); // copcar
	copcar2 = AddStaticVehicle(596,-2178.8704,-2368.1467,30.3463,140.8017,1,1); // copcar
	copcar3 = AddStaticVehicle(596,-2170.5442,-2359.1199,30.3578,49.0319,1,1); // copcar
	copcar4 = AddStaticVehicle(596,-2140.3013,-2383.3933,30.3476,230.1130,1,1); // copcar
	copcar5 = AddStaticVehicle(596,-2147.7207,-2377.1926,30.3449,230.1128,1,1); // copcar
	gangcar1 = AddStaticVehicle(412,-2051.6411,-2465.8118,30.3457,141.1588,6,6); // gangcar
	gangcar2 = AddStaticVehicle(412,-2049.1655,-2467.7727,30.3465,140.1435,6,6); // gangcar
	gangcar3 = AddStaticVehicle(419,-2054.0801,-2474.6079,30.2652,51.0212,6,6); // gangcar
	gangcar4 = AddStaticVehicle(413,-2065.7703,-2457.3672,30.3460,141.3405,6,6); // gangwan
	gangcar5 = AddStaticVehicle(413,-2062.2971,-2459.8716,30.3451,142.9717,6,6); // gangwan
	gangcar6 = AddStaticVehicle(419,-2069.3088,-2462.5579,30.3488,52.0249,6,6); // gangcar


new copcar1;
new copcar2;
new copcar3;
new copcar4;
new copcar5;
new gangcar1;
new gangcar2;
new gangcar3;
new gangcar4;
new gangcar5;
new gangcar6;


public OnPlayerStateChange(playerid, newstate, oldstate)
	{
	if(newstate == PLAYER_STATE_DRIVER)
	{
	   new carid = GetPlayerVehicleID(playerid);
	   if(carid == copcar1 || copcar2 || copcar3 || copcar4 || copcar5)
	   {
	     if(gTeam[playerid] == TEAM_COPS) 
	     {

	     }
	       else
	       {
	         SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{33CCFF}Auto je namenjeno samo policajcima!");
	         RemovePlayerFromVehicle(playerid);
	       }
	   }
	   if(carid == gangcar1 || gangcar2 || gangcar3 || gangcar4 || gangcar5 || gangcar6)
	   {
	     if(gTeam[playerid] == TEAM_GANGSTER)
	     {

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



Znaci.. Kad sam pd i udjem u copcar mi kaze da moram biti gangster, a isto tako samo obrnuto mi kaze kad sam gangster... Kako da to sredim? i kako da dodam jos klasa u owaj onplayerstatechange?