Jump to content
Sign in to follow this  
HAILO

jip.sqf (Join In Progress Script)

Recommended Posts

Beta Release

More info at totaldamage.org

Quote[/b] ]

--------------------------------------------------------------------------------

·: join in progress v1.1 for ArmA :·

--------------------------------------------------------------------------------

Join in progress script for Armed Assault multiplayer mission designers.

This script lets you hook into two pre-defined event stubs to run any code

you want on the player, server or dedicated server computers when a player connects

or disconnects.

To use the join in progress script in your mission you will need to do the following:

- If you do not already have init.sqf file made for the mission then you can

just copy the contents of files directory directly to the mission directory.

Otherwise do the following:

- Copy the files\scripts and files\events directory into your mission directory (So

that the signal and events directory remains)

- Add the contents of files\init.sqf to your mission init.sqf file so that the

join in progress script init is run at the beginning of mission

It is important that you have the following gamelogic and trigger in your mission:

- ADD A GAMELOGIC NAMED "server"

The join in progress script should now launch whenever a player connects to the server.

You can now use the custom event scripts "onPlayerConnected.sqf" and "onPlayerDisconnected.sqf"

in the events directory.

Note! If you need to do any modifications in the join in progress script files for

your mission, please mark the modified files as modified by you to avoid

confusing them with the originals.

--------------------------------------------------------------------------------

credits

--------------------------------------------------------------------------------

Made by Hailo (www.totaldamage.org)

--------------------------------------------------------------------------------

license & disclaimer

--------------------------------------------------------------------------------

You are permitted to install and use this software for personal entertainment

purposes only. Any commercial, military or educational use is strictly forbidden

without permission from the author.

You are free to distribute this software as you wish, as long as it is kept 100%

free of charge, it is not modified in any way and this readme file is

distributed with it.

The author takes no responsibility for any damages this program may cause,

use at your own risk.

--------------------------------------------------------------------------------

change log

--------------------------------------------------------------------------------

Version 1.1

* Improved locality checks on event scripts and jip.sqf

* Stoped double server execution in the jip.sqf on dedicated servers

--------------------------------------------------------------------------------

The "events\onPlayerConnected.sqf" and "events\onPlayerDisconnected.sqf" event stubs have the following logic for you to use...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

switch (_locality) do {

case "player": {

if (_name == name player) then {

// This will be executed on the connecting player.

}

else

{

// This will be executed on all players excluding the connecting player

};

};

case "server": {

// This will be executed on the server

};

case "dedicatedserver": {

// This will be executed on the dedicated server

};

};

The event stubs support the following array. This is passed by the "scripts\jip.sqf" to then execute the code you want in the login shown in the sample above...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

// Supports: [_locality, _name, _id]

// _locality can be any of the following: player, server, dedicatedserver

Download: JoinInProgressScriptV1.1.zip

Share this post


Link to post
Share on other sites

Arf!

for those who don't understand this kinda language i believe they will not understand the meaning of this script.

does this script allow to:

- save slot (for determinate time) when player crash and reconnect picking the same slot, preventing other players in pool to get in that slot?

- person dies, can it prevent that player to join other slot in game by reconnecting? (respawn)

I think that these option would be importante to implement

can it be done?

Share this post


Link to post
Share on other sites

The script is designed as a simple framework for join in progress. It simply unifys the way someone might want to re-run custom scripts they have for a player then they connect or update server public variables when someone disconnects.

Here might be an example... I have a custom smoke and flares script that replaces the smoke effect of smoke granades and flares. When I add my script init code to a missions init.sqf or init.sqs file i would get the following issues...

Player connects after mission start: No special smoke or flare effects can be seen.

As you can see from the above example the init.sqs and init.sqf will not execute my custom smoke effects as the mission has already started. So to solve this problem the above "JIP" framework lets me use the "onPlayerConnected.sqf" to execute my effects code for the newly connected player.

So now when a player connects and throws a smoke granade they can see my replaced smoke effects.

I hope this makes some sence now crazy_o.gif

Quote[/b] ]

does this script allow to:

- save slot (for determinate time) when player crash and reconnect picking the same slot, preventing other players in pool to get in that slot?

- person dies, can it prevent that player to join other slot in game by reconnecting? (respawn)

Nice ideas bravo 6, I can certainly consider introducing that later on. The more ideas peeps have the more I can try to make something you will find usefull.

Let me know if you need further help wink_o.gif

Edit: For more info on the smoke stuff mentioned above here is the topic link signal.sqf (smoke and flare signals)

Share this post


Link to post
Share on other sites

v1.1 released, just some minor fixes....

Quote[/b] ]

--------------------------------------------------------------------------------

change log

--------------------------------------------------------------------------------

Version 1.1

* Improved locality checks on event scripts and jip.sqf

* Stoped double server execution in the jip.sqf on dedicated servers

--------------------------------------------------------------------------------

Share this post


Link to post
Share on other sites
Quote[/b] ]

--------------------------------------------------------------------------------

license & disclaimer

--------------------------------------------------------------------------------

You are permitted to install and use this software for personal entertainment

purposes only. Any commercial, military or educational use is strictly forbidden

without permission from the author.

You are free to distribute this software as you wish, as long as it is kept 100%

free of charge, it is not modified in any way and this readme file is

distributed with it.

The author takes no responsibility for any damages this program may cause,

use at your own risk.

This is a GREAT license. It's exactly the kind of thing that I asked modders to do in this thread.

There is one thing that I'm puzzled by, however. The restriction against using the script for educational purposes seems pretty harsh. For example, it means that a newbie like me can't read through the script to learn how you managed certain tasks and problem sets. Is that truly what you intended?

Did you have something else in mind? Possibly a restriction from educational institutions using the script for use in lectures or by re-publishing it on a Website? While I certainly endorse your right to make that particular statement, it still seems a bit harsh. Heck, I'd be flattered if someone used my material that way! As long as they gave the appropriate credit, that is. wink_o.gif

Your requirement to publish the license text with the script should cover that, I think, if you include whatever attribution you wished as part of the body of the license. It wouldn't have to be much, if you wish to remain semi-anonymous. For example, your nickname on this board would be enough, wouldn't it?

Share this post


Link to post
Share on other sites

Its the same license & disclaimer as Kegetys. I thought I should follow a master at work so thats the only reason for it.

I am happy for anyone to learn from what I have made and use if for non-profit wink_o.gif

Share this post


Link to post
Share on other sites

ZIP-file seems corrupt at above URL!? Anyone has any mirror for this JIP framework?

/KC

Share this post


Link to post
Share on other sites

Thanks Penaut, will try with 7-zip...

/KC

Share this post


Link to post
Share on other sites

Hi i only have a init.sqs and so if i put the code from the example init.sqf into my init.sqs, i get a error.

How to solve that?

solved:

Changed my init to sqf!!

Share this post


Link to post
Share on other sites

It is possible to make the code in init.sqs launch due to an addon or some other mission-independant function that the server runs? This would allow the JIP script to be run on all missions, not just those that had their init.sqs's suited for this mod.

Btw, mucho thanks to JIP Script for solving a lot of issues I was having with multiplayer compatibility with the RealM136 addon.

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  

×