[INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] -
LuxurioN™ - 07.09.2009
[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 Код:
AddCarPerName(id,PlayerName,modelid,Float:X,Float:Y,Float:Z,Float:Rotation,color1,color2);
Id: Never place the same, or will not work:
pawn Код:
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 Код:
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 Код:
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 Код:
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 Код:
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 Код:
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:
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
Mive - 07.09.2009
Really really nice
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
LuxurioN™ - 07.09.2009
Thank you!
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
aspire5630 - 07.09.2009
Very nice, Just what ive needed, instead of me struggling
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
LuxurioN™ - 07.09.2009
Quote:
Very nice, Just what ive needed, instead of me struggling
|
Oh!
Thank you
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
DauerDicht - 07.09.2009
Cool - but is it possible that the owner can park the car?
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
LuxurioN™ - 07.09.2009
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
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
Naty - 07.09.2009
Was what I needed. thank you very much luxurion
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
CaLaP - 08.09.2009
good job
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
gszyclon - 08.09.2009
nice
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
Evoturk - 08.09.2009
Very good.Thank.Good job Lux
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
pomogames - 08.09.2009
Very very very Nice!!!
Thank you mannn!
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
Norn - 08.09.2009
Pretty annoying changing the id's manually, most people like to copy and paste and simply edit the coords and modelid.
Fix for lazy people.
pawn Код:
new carid = 0;
AddCarPerName(carid,"LuxurioN",411,-2118.9319,194.8274,35.7567,2.7513,3,3);
AddCarPerName(carid++,"PlayerName1",421,-2036.5212,305.6321,35.9090,359.8144,0,0);
AddCarPerName(carid++,"PlayerName2",421,-2036.5212,305.6321,35.9090,359.8144,0,0);
Although this is only for under OnGameModeInit, for commands etc you would need a global variable.
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
LuxurioN™ - 08.09.2009
Quote:
Very good.Thank.Good job Lux
|
Quote:
Very very very Nice!!!
Thank you mannn!
|
Thanks!
Quote:
Originally Posted by Norn
Pretty annoying changing the id's manually, most people like to copy and paste and simply edit the coords and modelid.
Fix for lazy people.
pawn Код:
new carid = 0; AddCarPerName(carid,"LuxurioN",411,-2118.9319,194.8274,35.7567,2.7513,3,3); AddCarPerName(carid++,"PlayerName1",421,-2036.5212,305.6321,35.9090,359.8144,0,0); AddCarPerName(carid++,"PlayerName2",421,-2036.5212,305.6321,35.9090,359.8144,0,0);
Although this is only for under OnGameModeInit, for commands etc you would need a global variable.
|
exists so lazy people? Not to put a simple id?
More for those lazy, will serve. Good idea!
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
Norn - 08.09.2009
Quote:
Originally Posted by ► © The LuxurioN™
Quote:
Very good.Thank.Good job Lux
|
Quote:
Very very very Nice!!!
Thank you mannn!
|
Thanks!
Quote:
Originally Posted by Norn
Pretty annoying changing the id's manually, most people like to copy and paste and simply edit the coords and modelid.
Fix for lazy people.
pawn Код:
new carid = 0; AddCarPerName(carid,"LuxurioN",411,-2118.9319,194.8274,35.7567,2.7513,3,3); AddCarPerName(carid++,"PlayerName1",421,-2036.5212,305.6321,35.9090,359.8144,0,0); AddCarPerName(carid++,"PlayerName2",421,-2036.5212,305.6321,35.9090,359.8144,0,0);
Although this is only for under OnGameModeInit, for commands etc you would need a global variable.
|
exists so lazy people? Not to put a simple id?
More for those lazy, will serve. Good idea! 
|
Not really lazy, just for people that have huge scripts and need dynamicness.
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
LuxurioN™ - 08.09.2009
Really, I had not thought of it!
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
Takumi.WS - 12.09.2009
Код:
if(strcmp(cmdtext, "/cheetah", true) == 0) // To rent a car
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
AddCarPerName(1,sendername,415,1177.7605,-1308.3107,13.8395,258.3274,3,3);
SendClientMessage(playerid, RED, "You rentend a car ");
return 1;
}
What's wrong !? It's not working
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
ZxPwn420 - 12.09.2009
Should just link the carID with playerID.
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) -
DokerJr - 12.09.2009
Nice LuX
Now a test !!!
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] -
LuxurioN™ - 12.09.2009
Quote:
Originally Posted by Takumi[URP
]
Код:
if(strcmp(cmdtext, "/cheetah", true) == 0) // To rent a car
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
AddCarPerName(1,sendername,415,1177.7605,-1308.3107,13.8395,258.3274,3,3);
SendClientMessage(playerid, RED, "You rentend a car ");
return 1;
}
What's wrong !? It's not working 
|
Now you can add the function in your commands!.
Read tutorial in main post. And download a new version [v1.1].
Quote:
Originally Posted by ? DokerJr ?
Nice LuX
Now a test !!!
|
Thanks!