SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/08/2012, 12:19 PM   #1
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,940
Reputation: 185
Default Vehicle lock function

Well.. it won't work, don't know why.. I need to check that near what vehicle player is.. because one player can own three vehicles..

Definition: "OwnedVeh"
Code:
#define     OwnedVeh(%0)					PlayerInfo[%0][pPlayerVehicle]

Variable: "pPlayerVeh" is just an enum of PlayerInfo.

Code:
		for(new i = 0; i < MAX_BUYABLE_VEH; i++)
		{
		    if(strmatch(VehicleInfo[i][vVehOwner], PlayerName(playerid)))
		    {
				new Float:X, Float:Y, Float:Z;
		    	GetVehiclePos(VehicleInfo[OwnedVeh(playerid)][vVehOwner], X, Y, Z);
			    if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
			    {
					ToggleVehicleStatus(VehicleInfo[i][vVehOwner], DOOR_STATUS);
					ApplyAnimation(playerid, "BD_FIRE", "wash_up", 4.1, 0, 0, 0, 0, 0, 1);
				}
			}
		}

ToggleVehicleStatus works fine..
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone
Riddick94 is offline   Reply With Quote
Old 10/08/2012, 03:14 PM   #2
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,940
Reputation: 185
Default Re: Vehicle lock function

Anyone?
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone
Riddick94 is offline   Reply With Quote
Old 10/08/2012, 05:00 PM   #3
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,940
Reputation: 185
Default Re: Vehicle lock function

Fixed by myself, -_-

"/lock thread".
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone
Riddick94 is offline   Reply With Quote
Reply

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 this vehicle handerson Help Archive 2 01/07/2011 12:46 PM
How to lock car/vehicle in 0.3c ? Matej_ Help Archive 7 19/06/2011 07:09 PM
[help] lock vehicle igalsok Help Archive 3 17/05/2010 08:12 AM
[HELP] Vehicle lock Frankox Help Archive 2 05/04/2009 02:05 PM
vehicle lock & vehicle unlock SuperS0nic Help Archive 5 29/03/2009 07:33 AM


All times are GMT. The time now is 04:57 PM.


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