Jump to content
Sign in to follow this  
migueldarius

Respawn with pistol

Recommended Posts

Hi all, I need a script that in respawn = 3 your spawn in MP will be with a pistol maybe a Tokarev and not with the M16 or ak47, please help me :)

Share this post


Link to post
Share on other sites

hi,

init.sqs

;-----------------------------------------------------------------------------------------
; Alive check
;-----------------------------------------------------------------------------------------
[] exec "alive_check.sqs"

exit

alive_check.sqs

;************************************************************
;Alive Check Script By Nikiller v0.9b
;Check if the player is alive in rewpawn missions
;NOTE: Only executed for the player to save performance in MP
;Contact: nikillerofp@hotmail.fr
;[] exec "alive_check.sqs"
;************************************************************

if (local player) then {} else {goto "ende"}

#b
@ alive player
titleCut ["","BLACK IN", 5]
[] exec "init_respawn.sqs"
@ not alive player
~4
titleCut ["","BLACK OUT", 5]
goto "b"

#ende

exit

init_respawn.sqs

;****************************************************
;Respawn Init Script By Nikiller v0.9b
;Initialize player after respawn
;NOTE: Only local to player to save performance in MP
;Contact: nikillerofp@hotmail.fr
;[] exec "init_respawn.sqs"
;****************************************************

if (local player) then {} else {goto "ende"}

;give custom weapon loadout to player after respawn

_m=magazines player
_w=weapons player

{player removeMagazine _x} forEach _m
{player removeWeapon _x} forEach _w

;mags
_hg="HandGrenade"
_rv="IngramMag"

;weapons
_in="Ingram"

;equipment
_bino="Binocular"
_nvg="NVGoggles"

_m=[]
_w=[]

_m=[_hg,_hg,_rv,_rv]
_w=[_in,_bino,_nvg]

{player addMagazine _x} forEach _m
{player addWeapon _x} forEach _w

#ende

exit

cya.

Nikiller.

Share this post


Link to post
Share on other sites

hi, i used these .sqs and they work great, but all players spawn with the same weapon regardless of side. is there any way to set it so that west and east players spawn with different loadouts? also is there any way to set it so that a specific player spawns with a custom loadout? thanks

Share this post


Link to post
Share on other sites

You can add side check:

;****************************************************
;Respawn Init Script By Nikiller v0.9b
;Initialize player after respawn
;NOTE: Only local to player to save performance in MP
;Contact: nikillerofp@hotmail.fr
;[] exec "init_respawn.sqs"
;****************************************************

if (local player) then {} else {goto "ende"}

;give custom weapon loadout to player after respawn

_m=magazines player
_w=weapons player

{player removeMagazine _x} forEach _m
{player removeWeapon _x} forEach _w

;mags
_hg="HandGrenade"
_rv="IngramMag"
_rve="SkorpionMag"
;weapons
_in="Ingram"
_sk="Skorpion"
;equipment
_bino="Binocular"
_nvg="NVGoggles"

_m=[]
_w=[]

_m=[_hg,_hg,_rv,_rv]
_w=[_in,_bino,_nvg]
_me=[_hg,_hg,_rve,_rve]
_we=[_sk,_bino,_nvg]

? (side player==west): _m=_m
? (side player==east): _m=_me
? (side player==west): _w=_w
? (side player==east): _w=_we

{player addMagazine _x} forEach _m
{player addWeapon _x} forEach _w

#ende

exit

Edited by guziczek101
mistake with weapon

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×