2nd47 10 Posted August 1, 2009 (edited) I'm not very experienced with scripting and am trying to respawn players as a sort of scout class and replace their default loadout with this one. I've tried the following but it doesn't seem to work. I've made onPlayerRespawn.sqf and set this inside of it "_this execVM "spawn.sqf";". Then in the spawn.sqf I've done a if (_this playerside == west) then {removeallweapons this; this addweapon "m16a2GL"; this addmagazine "flarered_m203"}; to give the players flares and a rifle. When I tried it out myself I still respawned with the regular loadout of M4 and whatnot. If anyone could help me out with this it would be much appreciated. Edited August 1, 2009 by 2nd47 Share this post Link to post Share on other sites
R34P3R 11 Posted August 1, 2009 (edited) You need to add the Killevent for every player... in this wait the playerrespawntime.. then exec your weapon Script... in this make sure you add the magazines FIRST ! if you want to add different Weapons for the Playerclasses you need to readout the Class with: typOf player Edited August 1, 2009 by R34P3R Share this post Link to post Share on other sites
2nd47 10 Posted August 1, 2009 You need to add the Killevent for every player... in this wait the playerrespawntime.. then exec your weapon Script... in this make sure you add the magazines FIRST !if you want to add different Weapons for the Playerclasses you need to readout the Class with: typOf player I'm understanding what you mean but I have no clue how to implement it into what I have now. Share this post Link to post Share on other sites
R34P3R 11 Posted August 1, 2009 i will post you a sample later... Share this post Link to post Share on other sites
2nd47 10 Posted August 1, 2009 i will post you a sample later... Thanks Share this post Link to post Share on other sites
splatsh 10 Posted August 4, 2009 it is later now :P Share this post Link to post Share on other sites
Cellus 10 Posted August 5, 2009 Call respawn.sqf from init.sqf Have within it a killed event handler player addEventHandler ["killed", { [] spawn { waitUntil { alive player }; execVM "weapons.sqf"; }; }]; With weapons containing the loadout if (side=west) then { removeallweapons this; et cetera;}; Or something similar... Share this post Link to post Share on other sites