SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 07/09/2009, 07:34 PM   #1
LuxurioN™
Gangsta
 
LuxurioN™'s Avatar
 
Join Date: Oct 2007
Posts: 908
Reputation: 137
Default [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1]


[anchor=menu]Menu
  • [iurl=#menu]Menu[/iurl]
  • [iurl=#inf]Info[/iurl]
  • [iurl=#func]Functions[/iurl]
  • [iurl=#htu]How to Use[/iurl]
  • [iurl=#ins]Installation[/iurl]
  • [iurl=#vab]Version & Bugs[/iurl]
  • [iurl=#dwn]Download[/iurl]


[anchor=inf]Info

This is a simple include, with the task of adding private vehicles in your server,
that can only be used by the specific player. And in just one line, you can create a
private vehicle! If the player enters a particular vehicle, it is automatically ejected
from the vehicle! Further, if it is the owner of the vehicle, you can use it normally!


[anchor=func]Functions

AddCarPerName(id,PlayerName,modelid,Float:X,Float:Y,Float:Z,Flo at:Rotation,color1,color2);


[anchor=htu]How To Use

pawn Code:
AddCarPerName(id,PlayerName,modelid,Float:X,Float:Y,Float:Z,Float:Rotation,color1,color2);

Id: Never place the same, or will not work:

pawn Code:
AddCarPerName(1,PlayerName,modelid,Float:X,Float:Y,Float:Z,Float:Rotation,color1,color2);
AddCarPerName(2,PlayerName,modelid,Float:X,Float:Y,Float:Z,Float:Rotation,color1,color2);

Or...

In Your script Top
pawn Code:
new vehid=0;

pawn Code:
AddCarPerName(vehid,"LuxurioN",modelid,Float:X,Float:Y,Float:Z,Float:Rotation,color1,color2)
AddCarPerName(vehid++,"PlayerName",modelid,Float:X,Float:Y,Float:Z,Float:Rotation,color1,color2)
AddCarPerName(vehid++,"PlayerName2",modelid,Float:X,Float:Y,Float:Z,Float:Rotation,color1,color2)
...

PlayerName: Name of the player-owner vehicle. Only the player with that name can use the vehicle!

pawn Code:
AddCarPerName(id,"LuxurioN",modelid,Float:X,Float:Y,Float:Z,Float:Rotation,color1,color2);

Modelid: Id of vehicle!

X,Y,Z,Rotation: Coordinates of the vehicle (Same coordinates AddStaticVehicle)

Color1,Color2: Colors of Vehicle! (3,3 or 0,0, or 0,3...)

An example:

pawn Code:
public OnGameModeInit()
{
LpC_OnGameModeInit();

AddCarPerName(1,"LuxurioN",411,-2118.9319,194.8274,35.7567,2.7513,3,3);
AddCarPerName(2,"PlayerName1",421,-2036.5212,305.6321,35.9090,359.8144,0,0);
AddCarPerName(3,"PlayerName2",400,-2087.8369,255.6416,37.0341,357.9168,2,1);

To Create a Command:

In Script Top
pawn Code:
vehid=0;

pawn Code:
AddCarPerName(vehid,"LuxurioN",411,-2118.9319,194.8274,35.7567,2.7513,3,3);
AddCarPerName(vehid++,"PlayerName1",421,-2036.5212,305.6321,35.9090,359.8144,0,0);
AddCarPerName(vehid++,"PlayerName2",400,-2087.8369,255.6416,37.0341,357.9168,2,1);
...

Make a Command (In OnPlayerCommandText)
pawn Code:
if(strcmp(cmdtext, "/YourCommand", true) == 0)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

new Float:X,Float:Y,Float:Z, Float:Angle;
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);

AddCarPerName(vehid++,PlayerName, 411,X+3,Y,Z, Angle, 0, 0);
//or AddCarPerName(playerid,PlayerName, 411,X+3,Y,Z, Angle, 0, 0);
return 1;
}

The above example creates a command that when the player types "/ YourCommand",
it will create a vehicle 411 (Infernus) in front of the player, and only that
player can use it!

[anchor=ins]Installation
  • Download the files!
  • Unzip the Files! (Recommended use Winrar)
  • Copy the file 'LpC.inc'
  • Open your server folder 'Pawno/Include
  • Paste the File!
  • Open your GameMode/FilterScript!
  • In your script top put '#include <LpC>'
  • Go to 'OnGameModeInit'
  • Put the line 'LpC_OnGameModeInit();'
  • And put 'AddCarPerName' in OnGameModeInit (See in 'How To Use')
  • Compile (F5)
  • Ready!


[anchor=vab]Version & Bugs

Old: 1.0

Current: 1.1

+Correct 1.0 version Bugs
+Changed "AddStaticVehicle" to "CreateVehicle"
+Now you can add "AddCarPerName" in your commands

Bug(s) in v1.1? Please, contact me!


[anchor=dwn]Download

Version 1.1New


Version 1.0:


LuxurioN™ is offline   Reply With Quote
Old 07/09/2009, 07:46 PM   #2
Mive
Huge Clucker
 
Join Date: Aug 2008
Posts: 343
Reputation: 1
Default Re: [INC]LpC - LuX Private Car (Simple create a Private Cars)


Really really nice
Mive is offline   Reply With Quote
Old 07/09/2009, 07:59 PM   #3
LuxurioN™
Gangsta
 
LuxurioN™'s Avatar
 
Join Date: Oct 2007
Posts: 908
Reputation: 137
Default Re: [INC]LpC - LuX Private Car (Simple create a Private Cars)

Quote:
Really really nice
Thank you!
LuxurioN™ is offline   Reply With Quote
Old 07/09/2009, 08:33 PM   #4
aspire5630
Huge Clucker
 
Join Date: Jul 2008
Posts: 284
Reputation: 0
Default Re: [INC]LpC - LuX Private Car (Simple create a Private Cars)

Very nice, Just what ive needed, instead of me struggling
aspire5630 is offline   Reply With Quote
Old 07/09/2009, 08:39 PM   #5
LuxurioN™
Gangsta
 
LuxurioN™'s Avatar
 
Join Date: Oct 2007
Posts: 908
Reputation: 137
Default Re: [INC]LpC - LuX Private Car (Simple create a Private Cars)

Quote:
Very nice, Just what ive needed, instead of me struggling
Oh!

Thank you
LuxurioN™ is offline   Reply With Quote
Old 07/09/2009, 09:31 PM   #6
DauerDicht
Huge Clucker
 
Join Date: May 2008
Posts: 435
Reputation: 0
Default Re: [INC]LpC - LuX Private Car (Simple create a Private Cars)

Cool - but is it possible that the owner can park the car?
DauerDicht is offline   Reply With Quote
Old 07/09/2009, 09:36 PM   #7
LuxurioN™
Gangsta
 
LuxurioN™'s Avatar
 
Join Date: Oct 2007
Posts: 908
Reputation: 137
Default Re: [INC]LpC - LuX Private Car (Simple create a Private Cars)

Quote:
Cool - but is it possible that the owner can park the car?
Is a simple system (version 1.0 yet), has only one function, only allow the specific player to use the specific vehicle. The vehicle is equal to one AddStaticVehicle, only changes that only that specific player can use it. If I create a new version, I will put more functions
LuxurioN™ is offline   Reply With Quote
Old 07/09/2009, 09:38 PM   #8
Naty
Little Clucker
 
Join Date: Aug 2009
Posts: 9
Reputation: 0
Default Re: [INC]LpC - LuX Private Car (Simple create a Private Cars)

Was what I needed. thank you very much luxurion
Naty is offline   Reply With Quote
Old 08/09/2009, 07:10 AM   #9
CaLaP
Little Clucker
 
Join Date: Nov 2008
Posts: 15
Reputation: 0
Default Re: [INC]LpC - LuX Private Car (Simple create a Private Cars)

good job
CaLaP is offline   Reply With Quote
Old 08/09/2009, 08:49 AM   #10
gszyclon
Big Clucker
 
Join Date: Aug 2009
Posts: 111
Reputation: 0
Default Re: [INC]LpC - LuX Private Car (Simple create a Private Cars)

nice
gszyclon 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
[Tutorial] [TUT] How to create Private Cars Torran Tutorials 13 28/10/2013 04:57 PM
[FilterScript] [FS]Private Cars sinbad Filterscripts 8 19/06/2010 06:57 PM
How do I create a private car? bL1nd3R Help Archive 2 18/12/2009 09:00 PM
how to make more private cars [HKS]dlegend Help Archive 1 29/09/2009 10:27 PM


All times are GMT. The time now is 11:11 PM.


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