Jump to content
Djavu

addRespawnInventory

Recommended Posts

Hello. I am using CfgRoles, addRespawnInventory, with two slots for instructor and some for students. I would like to know if it is possible to prevent the student from entering as an instructor (RespawnInventory). For the slots in the Lobby, I'm filtering with getPlayerUID.

Share this post


Link to post
Share on other sites

Hello Djavu,

init.sqf :

instructorUID = ["STEAM_UID1","STEAM_UID2","STEAM_UID3"];    // UID OF PLAYER WHO CAN PLAY INSTRUCTOR

 

initPlayerLocal.sqf :

_UID = getPlayerUID player; // GET UID OF PLAYER

 

waitUntil{!(isNil "instructorUID")};   // WAIT LOADING OF instructorUID

if(  (typeOf player == "CLASS_OF_UNIT_INSTRUCTOR") && !( _UID in instructorUID) ) then {  endMission "Loser"; };  // IF TYPE OF PLAYER = instructor class and his UID is not in instructorUID then the player is kick

 

Sorry for my bad english.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hello Friend. Thanks for listening. Searching a little more today, I found this topic that satisfies my needs.

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

×