SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 08/01/2011, 01:14 PM   #1
pantelimonfl
Huge Clucker
 
Join Date: Jul 2010
Posts: 312
Reputation: 0
Default Vehicle Lock doesn't work

I want to lock some vehicles and i have this code but it doesn't work.
Code:
for(new i = 0; i < MAX_PLAYERS; i++)
         {
	        if (IsPlayerConnected(i))
		{
			SetVehicleParamsForPlayer(barracks,i,0,1);
		}
	 }
pantelimonfl is offline  
Old 08/01/2011, 01:29 PM   #2
Mike Garber
Banned
 
Join Date: Feb 2008
Location: Sweden
Posts: 1,506
Reputation: 6
Default Re: Vehicle Lock doesn't work

http://wiki.sa-mp.com/wiki/SetVehicleParamsForPlayer

Read this again. The answer is there.
Mike Garber is offline  
Old 08/01/2011, 01:34 PM   #3
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,742
Reputation: 1686
Default Re: Vehicle Lock doesn't work

omg I don't know what's wrong. It looks good.
Is the 'barracks' defined to an CreateVehicle / AddStaticVehicle or something else?
__________________
When the opportunity presents itself to flip-a da table, uh, you flip-a da table.

Discord: Kwarde#8009
Kwarde is offline  
Old 08/01/2011, 01:51 PM   #4
pantelimonfl
Huge Clucker
 
Join Date: Jul 2010
Posts: 312
Reputation: 0
Default Re: Vehicle Lock doesn't work

Yes it is.
pantelimonfl is offline  
Old 08/01/2011, 01:54 PM   #5
Mike Garber
Banned
 
Join Date: Feb 2008
Location: Sweden
Posts: 1,506
Reputation: 6
Default Re: Vehicle Lock doesn't work

I know what's wrong.
But I will not tell you as the very first thing you should do is to check the Wiki, BEFORE asking questions.
The answer is there, in my link i posted above.
Mike Garber is offline  
Old 08/01/2011, 01:55 PM   #6
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,742
Reputation: 1686
Default Re: Vehicle Lock doesn't work

Oyeah that was it

Quote:
Note: You will have to respawn the vehicle to properly remove the objective.
Quote:
Note: From 0.3 you will have to re-apply this function when OnVehicleStreamIn is called!
__________________
When the opportunity presents itself to flip-a da table, uh, you flip-a da table.

Discord: Kwarde#8009
Kwarde 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
How to lock a vehicle ? Matej_ Help Archive 9 25/09/2010 06:39 PM
How to lock my vehicle Blt950 Help Archive 0 23/01/2010 11:48 AM
[HELP] Vehicle lock Frankox Help Archive 2 05/04/2009 01:05 PM
vehicle lock & vehicle unlock SuperS0nic Help Archive 5 29/03/2009 06:33 AM


All times are GMT. The time now is 02:10 PM.


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