07.09.2009, 19:34
[anchor=menu]Menu
[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
Id: Never place the same, or will not work:
Or...
In Your script Top
PlayerName: Name of the player-owner vehicle. Only the player with that name can use the vehicle!
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:
To Create a Command:
In Script Top
Make a Command (In OnPlayerCommandText)
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
[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:
- [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);
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);
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)
...
pawn Код:
AddCarPerName(id,"LuxurioN",modelid,Float:X,Float:Y,Float:Z,Float:Rotation,color1,color2);
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);
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);
...
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;
}
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: