Jump to content

HolyLight56

Member
  • Content Count

    6
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About HolyLight56

  • Rank
    Rookie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you for the help mrcurry and pierremgi, and sorry for the long wait. I've finalized the script (included below) and now it's working properly. initServer.sqf initPlayerLocal.sqf
  2. So i've done some more work on the code, and after changing it to hashmaps and their corresponding codes, i've gotten approximately what @mrcurry posted previously. Unfortunately, remoteExec can't target hashmaps so i've defaulted to using the above code. Which, while working on singleplayer perfectly fine, appears to not be working in multiplayer. I'm still tryin to find some way to use remoteExec with hashmaps, but again, i've hit a bit of a brick wall. The initServer file looks like this right now: I've added an if statement to only add the player's UID to the hashMap if it doesn't already exist there. Without being able to use remoteExec, i'm not sure how to go forward on making this work in a multiplayer environment.
  3. I'll be needing to add player's UIDs and set their ticket amounts throughout the mission. If it were a set list of players, i'd absoultely do as you said and use the hashmap. I'll keep looking into how to properly implement the code. @mrcurry Currently I'm having a hard time understanding how to get arrays and variables from global space, and then execute a function to change global variables and arrays. (updating the player array with a correct ticket count for each player). I'm sure there is an easy solution, the only problem is finding it. Thank you for pointing me towards hashmaps, they seem perfect this and i'll see if i might be able to implement them.
  4. Thank you for the reply pierremgi. I did some more testing with your code and I ended up with something that seems to work. Working Testing Code: I'll be posting the full code once it's been thoroughly tested. Again, thank you for the help. (Note: I was using ZEN, so '_this' worked rather than 'this'
  5. I'm trying to modify an array whenever a player respawns to lower their individual respawn tickets. The current issue I am facing is changing the second value of each pair to the desired number. (Note: some code may be placeholders, full code below) The array will look something like this: playerArray = [["Player1UID", X], ["Player2UID", X], ["Player3UID", X]] Code I'm trying to use: playerArray set [((playerArray select 0) select 1), X-1]; // Lowers the old value by 1 in the array Desired Result: playerArray = [["Player1UID", X-1], ["Player2UID", X], ["Player3UID", X]] Actual Result playerArray = [["Player1UID", X], ["Player2UID", X], ["Player3UID", X], X-1] Full script: Any help, comments, or suggestions would be amazing. Thank you and have a great day.
  6. I am currently attempting to make a script that assigns individual respawn pools based on a player's UID. I'm facing a few errors but it's mostly there. The thought is to tick down each player's respective respawn pools, using their UID whenever they respawn, and give them the spectator camera after they have lost their last life. I have an array setup in the init to hold their UIDs and their individual tickets. I'm grabbing/setting those values as they join the server and then holding them in the array to be modified upon respawning. Currently, I'm using the onPlayerRespawn.sqf to tick down the individual player pools. the current iteration of the onPlayerRespawn.sqf is giving me issues on line 5 when i try to update the array. It is also giving me issues on line one, as it returns null for the player's UID. onPlayerRespawn.sqf The rest of the sqfs (and the description) for anyone interested. init.sqf config.sqf initPlayerServer.sqf Description.ext None of the parameters passed by onPlayerRespawn.sqf have allowed me to get the player UID as they respawn, which has made this much more difficult. Any help, comments, or suggestions would be amazing. Thank you and have a great day.
×