[comfused] Un-Streamed Vehicles
#1

How is it possible to make Streamed in vehicles??

because i use CreateVehicles and in version RC7-2 for some reason the AttachTrailerToVehicle it really attaches for that side it work.... but
sometimes because of stream problems it gets like stucking the tow truck or disconnects and then after 2-3sec it comes straight to the tow truck like there is a person in it using a speed hack... but it wasn't someone else... ( tghou when i was alone in server it worked 100% fine no problems but when someone else came on and the player were passenger in the tow truck that i was driving. This is the code that i am using:

Код:
	if(strcmp(cmd, "/tow", true) == 0)
	{
	  if (IsTowTruck(GetVehicleModel(GetPlayerVehicleID(playerid))))
   	{
			new Float:pX,Float:pY,Float:pZ;
			GetPlayerPos(playerid,pX,pY,pZ);
			new Float:vX,Float:vY,Float:vZ;
			new Found=0;
			new vid=0;
			while ((vid<MAX_VEHICLES)&&(!Found))
			{
  				vid++;
  				GetVehiclePos(vid,vX,vY,vZ);
  				if((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
			  {
  				  Found=1;
  				  if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
			    {
  				    DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
			    }
          if(!VehicleToPoint(vid, VehicleInfo[vid][Xcar], VehicleInfo[vid][Ycar], VehicleInfo[vid][Zcar], 30))
          {
  				  	AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
  				  	SendClientMessage(playerid,COLOR_WHITE,"Towed, You can deliver it to the impound garage.");
  				  	SetPlayerCheckpoint(playerid,691.2448,-1570.8842,14.2422,5);
  				  	return 1;
					}
					else return SendClientMessage(playerid,COLOR_BRIGHTRED,"This vehicle is at its spawn, no need to tow it!");
				}
			}
			if(!Found)
  			{
			  SendClientMessage(playerid,COLOR_BRIGHTRED,"There is nothing to tow!");
		  }
  		}
		return 1;
	}
Reply
#2

this is the only thing i understand, get a vehicle streamer.

Quote:
Originally Posted by silvan
How is it possible to make Streamed in vehicles??
Reply
#3

Quote:
Originally Posted by V1ceC1ty
this is the only thing i understand, get a vehicle streamer.

Quote:
Originally Posted by silvan
How is it possible to make Streamed in vehicles??
SA-MP now uses one by default. You have to use OnVehicleStreamIn and OnVehicleStreamOut - check the wiki!
Reply
#4

but what to do... with the vehicles? i don't need to lock vehicles.... all i want is cars to work good....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)