Jump to content
Sign in to follow this  
OberSchutze

Using XML to allow use of vehicle

Recommended Posts

I was wondering if there was a way to use the PID from the squad xml file to restrict access to say like a helicopter. Right now I have to manually add the PID to each mission.

Share this post


Link to post
Share on other sites

Well, you can use everything that this command returns: https://community.bistudio.com/wiki/squadParams

Sadly it doesn't return the location of the squad.xml so you can't really verify that data.

Still should be enough for some basic access restrictions for everyone who isn't part of a certain squad. Just don't expect it to be super secure as someone could still re-create that squad.xml and fake it.

However, you can also make a server-side addon/script that handles this and runs on every mission. Or atleast always load the PIDs from a central file that is not in the missionfolder but instead in the main directory of the server. Makes changing the PIDs easier and also has the advantage that others don't get to see them. (which they can, when they're included in the mission)

Share this post


Link to post
Share on other sites
Well, you can use everything that this command returns: https://community.bistudio.com/wiki/squadParams

Sadly it doesn't return the location of the squad.xml so you can't really verify that data.

Still should be enough for some basic access restrictions for everyone who isn't part of a certain squad. Just don't expect it to be super secure as someone could still re-create that squad.xml and fake it.

However, you can also make a server-side addon/script that handles this and runs on every mission. Or atleast always load the PIDs from a central file that is not in the missionfolder but instead in the main directory of the server. Makes changing the PIDs easier and also has the advantage that others don't get to see them. (which they can, when they're included in the mission)

With a simple check he should be able to verify that the squad.xml is part of the group he is in, using Squadnick or Squadname as reference or even one of the other parameters from the squadParams function. The odds that someone will copy the exact squad.xml and use it in his mission seems fairly unlikely.

Additionally, as Tajin mentioned you can use squadParams, and take the value from memberId, which I think is the same thing as PID, although never tested.

You'll have to see for yourself.

Kind regards,

Sanchez

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  

×