how to make this command work faster in game?
#1

how i can make this code work faster in game ? because than I get in car(pizzaboy1) i can drive for while, and after around 3-10seconds i get out from car, how i can make it for get out from car in 1sec ?

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new VehicleID = GetPlayerVehicleID(playerid);
	if(newstate == PLAYER_STATE_DRIVER)
	{
	//Policininkas
	if(VehicleID == motociklas1 || VehicleID == motociklas2 || VehicleID == motociklas3 || VehicleID == motociklas4 || VehicleID == motociklas5 || VehicleID == motociklas6 || VehicleID == motociklas7 || VehicleID == motociklas8 || VehicleID == motociklas9 || VehicleID == motociklas10 || VehicleID == motociklas11 || VehicleID == motociklas12 || VehicleID == motociklas13 || VehicleID == motociklas14 || VehicleID == motociklas15 || VehicleID == motociklas16)
	{
		if(Policininkas[playerid] == 1)
		{
			return 1;
		}
		else
		{
			RemovePlayerFromVehicle(playerid);
			SendClientMessage(playerid,COLOR_RED, "Љis transportas priklauso policijai");
		}
	}
	//Picų iљveћiotojas
	if(VehicleID == pizzaboy1 || VehicleID == pizzaboy2 || VehicleID == pizzaboy3 || VehicleID == pizzaboy4 || VehicleID == pizzaboy5 || VehicleID == pizzaboy6 || VehicleID == pizzaboy7 || VehicleID == pizzaboy8 || VehicleID == pizzaboy9 || VehicleID == pizzaboy10 || VehicleID == pizzaboy11 || VehicleID == pizzaboy12 || VehicleID == pizzaboy13 || VehicleID == pizzaboy14 || VehicleID == pizzaboy15 || VehicleID == pizzaboy16 || VehicleID == pizzaboy17)
	{
			if(Picerijus[playerid] == 1)
			{
				return 1;
			}
			else
			{
				RemovePlayerFromVehicle(playerid);
			    SendClientMessage(playerid,COLOR_RED, "Љis transportas priklauso picų iљveћiotojams");
			}
		}
	}
	return 1;
}
Reply
#2

It may be because of your lag. Anyway. YCMD is the fastest command proccesor.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)