[Include] [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1]
#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 Код:
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 Код:
new vehid=0;
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 Код:
vehid=0;
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:


Reply


Messages In This Thread
[INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by LuxurioN™ - 07.09.2009, 19:34
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by Mive - 07.09.2009, 19:46
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by LuxurioN™ - 07.09.2009, 19:59
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by aspire5630 - 07.09.2009, 20:33
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by LuxurioN™ - 07.09.2009, 20:39
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by DauerDicht - 07.09.2009, 21:31
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by LuxurioN™ - 07.09.2009, 21:36
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by Naty - 07.09.2009, 21:38
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by CaLaP - 08.09.2009, 07:10
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by gszyclon - 08.09.2009, 08:49
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by Evoturk - 08.09.2009, 08:58
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by pomogames - 08.09.2009, 09:12
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by Norn - 08.09.2009, 16:14
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by LuxurioN™ - 08.09.2009, 16:22
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by Norn - 08.09.2009, 16:26
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by LuxurioN™ - 08.09.2009, 16:29
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by Takumi.WS - 12.09.2009, 13:08
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by ZxPwn420 - 12.09.2009, 13:38
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) - by DokerJr - 12.09.2009, 13:46
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by LuxurioN™ - 12.09.2009, 15:45
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by HACKHERS - 15.09.2009, 16:04
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by [HKS]dlegend - 29.09.2009, 21:05
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by daniboi229 - 01.10.2009, 13:48
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by [HKS]dlegend - 01.10.2009, 17:59
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by DokerJr - 01.10.2009, 18:33
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by Ritchie999 - 16.11.2009, 01:27
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by daaan - 04.02.2010, 16:20
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by daaan - 07.02.2010, 19:01
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by LuxurioN™ - 07.02.2010, 19:13
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by caribe88 - 01.03.2010, 03:10
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by Noredine - 01.03.2010, 06:48
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by [Hun]SnicKerS - 01.03.2010, 19:25
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by LuxurioN™ - 01.03.2010, 19:30
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by SamyRomafia - 27.11.2010, 10:04
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by X360 - 22.11.2011, 15:43
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by Mr.R - 24.11.2011, 14:30
Re: [INC]LpC - LuX Private Car (Simple create a Private Cars) [v1.1] - by tomsalmon - 24.11.2011, 14:57

Forum Jump:


Users browsing this thread: 1 Guest(s)