SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 22/12/2010, 09:38 PM   #1
Vibrate17
Big Clucker
 
Join Date: Jul 2010
Posts: 89
Reputation: 0
Default Every car is locked. Why?

Hello. I have an role play server and I have a big problem. On my pc everything is fine ( all cars are unlocked ) but when I upload my gm on host ( linux ), every car are locked. This problem appear about 3 hours. I make an upgrade on my server. I use 0.3c rc6.
Vibrate17 is offline  
Old 22/12/2010, 09:52 PM   #2
piohh
Big Clucker
 
piohh's Avatar
 
Join Date: Apr 2008
Posts: 91
Reputation: 10
Default Re: Every car is locked. Why?

Use you OnVehicleStreamIn ?

Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
       for(new i = 0; i < MAX_PLAYERS; i++)
	{
    	       if(IsPlayerConnected(i))
	       {
			if(gCarLock[vehicleid]==1)
			{
				SetVehicleParamsForPlayer(vehicleid, i, 0, 1);
			}
		}
	}
}
__________________
piohh is offline  
Old 22/12/2010, 09:53 PM   #3
Vibrate17
Big Clucker
 
Join Date: Jul 2010
Posts: 89
Reputation: 0
Default Re: Every car is locked. Why?

yes. I use OnVehicleStreamIn and looks like this :

Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if (LightPwr[vehicleid] == 0)
	{
		new panels,doors,lights,tires;
		GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
		UpdateVehicleDamageStatus(vehicleid, panels, doors, 5, tires);
	}
 for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(gCarLock[vehicleid] != -1 && gCarLock[vehicleid] != forplayerid)
        {
            SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
        }
    }
	return 1;
}
Vibrate17 is offline  
Old 22/12/2010, 09:55 PM   #4
Gh0sT_
Gangsta
 
Join Date: Sep 2010
Location: Lithuania, Alytus
Posts: 776
Reputation: 0
Default Re: Every car is locked. Why?

Use SetVehicleParamsEx.
__________________
Includes
Player/Vehicle Control
Entrances system
Gh0sT_ is offline  
Old 22/12/2010, 10:01 PM   #5
Ash.
High-roller
 
Ash.'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,140
Reputation: 160
Default Re: Every car is locked. Why?

Quote:
Originally Posted by Gh0sT_ View Post
Use SetVehicleParamsEx.
In 0.3c (depending)
__________________
(AKA funky1234)

There are infinite possibilities


Think twice before you start programming or you will program twice before you start thinking.
Ash. is offline  
Old 22/12/2010, 10:03 PM   #6
Vibrate17
Big Clucker
 
Join Date: Jul 2010
Posts: 89
Reputation: 0
Default Re: Every car is locked. Why?

Thank you piohh ... your solution is the best.

Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
       for(new i = 0; i < MAX_PLAYERS; i++)
	{
    	       if(IsPlayerConnected(i))
	       {
			if(gCarLock[vehicleid]==1)
			{
				SetVehicleParamsForPlayer(vehicleid, i, 0, 1);
			}
		}
	}
}
Vibrate17 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Locked car Gforcez1337 Help Archive 3 17/08/2010 09:27 PM
This can be locked. Rzzr Help Archive 8 12/02/2010 11:09 PM
Got a question about a locked car.. dirkblok Help Archive 2 09/11/2009 04:19 PM
Car locked on a name adi360 Help Archive 0 12/08/2009 09:44 AM


All times are GMT. The time now is 02:16 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.