You are not logged in.

Dear visitor, welcome to Nitrado Türkiye Ön Ödemeli Gameserver Kiralama Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

typoon

Trainee

  • "typoon" is male
  • "typoon" has been banned
  • "typoon" started this thread

Posts: 300

Date of registration: Dec 27th 2014

Location: Konya

Occupation: Öğrenci

  • Send private message

1

Wednesday, December 31st 2014, 5:28pm

[Script] Kilitli araca binme (Polis) by TyPooN

Merhaba,
Bu script sayesinde serverinizdeki polis arkadaşlar araçlara kilitli iken binebilecekler.

Aşama 1 :

Oluşturulacak dosya adı : fn_copEnter.sqf


Oluşturulacak dosya konumu : Core/Cop

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
	Dosya: fn_copEnter.sqf
	Yazar: TyPooN

*/
if(playerSide != west) exitWith {};
private ["_position","_veh"];
_position = _this select 3;

switch (_position) do
{
	case "driver":
	{
cursorTarget lock false;
player action ["getInDriver", cursorTarget];
cursorTarget lock true;
	};
	case "passenger":
	{
cursorTarget lock false;
player action ["getInCargo", cursorTarget];
cursorTarget lock true;
	};
	case "gunner":
	{
cursorTarget lock false;
player action ["getIngunner", cursorTarget];
cursorTarget lock true;
	};
	case "exit":
	{
_veh = vehicle player;
_veh lock false;
player action ["getOut", _veh];
_veh lock true;
	};
};


Aşama 2 : Functions.h (Bulunduğu konum ana dizin (Altis-Life.Altis)


Kod eklenilecek olan class : class cop


Eklenilecek kod :


Source code

1
class copEnter {};


Aşama 3 : fn_setupActions.sqf


Bulunduğu konum : Core


Eklenilecek kod : (case west kısmına ekleyin )


Source code

1
2
3
4
5
	    	    //Polis - Kilitli İken Binme
		life_actions = life_actions + [player addAction[localize "STR_pAct_DriverSeat",life_fnc_copEnter,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
		life_actions = life_actions + [player addAction[localize "STR_pAct_PassengerSeat",life_fnc_copEnter,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']]; 
		life_actions = life_actions + [player addAction[localize "STR_pAct_GunnerSeat",life_fnc_copEnter,"gunner",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']]; 
		life_actions = life_actions + [player addAction[localize "STR_pAct_GoOut",life_fnc_copEnter,"exit",100,false,false,"",'(vehicle player != player) && (locked(vehicle player)==2)']];



Aşama 4 : Stringtable.xml (Bulunduğu konum ana dizin)


Eklenilecek kod :


Source code

1
2
3
4
5
6
7
8
9
10
11
12
<Key ID="STR_pAct_DriverSeat"> 
		<Original>Sürücü olarak bin</Original> 
		</Key>
		<Key ID="STR_pAct_PassengerSeat">
			<Original>Yolcu koltuğuna bin</Original>
		</Key>
		<Key ID="STR_pAct_GunnerSeat">
			<Original>Gunner'a bin</Original>
		</Key>
		<Key ID="STR_pAct_GoOut">
			<Original>Araçtan in</Original>
 </Key>











-AltisLifeTR-
-Script Pack dosyam satılıktır veya kişiye özel script pack yapılır-

Rate this thread