Jump to content

Scotty123

Member
  • Content Count

    10
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Scotty123

  • Rank
    Private
  1. I am thinking the first part works as that is set up for you, before you execute anything. When you choose an option, the expression executes. It's not created with code until then. _x has been destroyed hence is nil. If we use your method, it's at its last value, hence why I get the last item.
  2. I find that only spawns the last item in the array.
  3. This is the code in full. The work around so far is to use [format["%1", getText(configFile >> "Cfgweapons" >> uniformClasses select 0 >> "displayName")], [12], "", -5, [["expression", "player adduniform (uniformClasses select 0)" ]], "1", "1"] Spam that however many times needed, increasing the index by one. It's just messy and I think there must be a more elegant way of producing it using loops.
  4. I have an array of classnames for various uniforms, eg uniformClasses = ["U_O_GhilleSuit",.....]; I use the following below for "_x" from 0 to count uniformClasses - 1 do { _array = [format["%1", getText(configFile >> "Cfgweapons" >> uniformClasses select _x >> "displayName")], [12], "", -5, [["expression", "player adduniform (uniformClasses select _x)"]], "1", "1"]; testMenu set [_x + 2, _array]; }; showcommandingmenu "#USER:testMenu"; This doesn't work. I see the list of uniforms, but selecting one does nothing. I used a hint instead to see what value was being received - [["expression", "hint format[""%1"",(uniformClasses select _x)]"]]. Result is any and obviously just the same with the loop variable. Now I could just write everything out manually, but I would rather not. Having the array allows the insertion and removal of items easily, without having to enter in new menu lines. Any ideas or work arounds? Thanks!
  5. There has been no problem before when simply displaying a name. It's only when I start dealing with wanting to add the prefixes/titles. Before that, I wasn't using cursor target. I was getting the positions of near entities of type man. Then using drawIcon3D for the names. That was working fine. Added the bit about the rankLevel. Some time after the server being up, no names would show on certain players. This wasn't universal. For example I could see player B's name, but player C would not see player B's name.
  6. dbNumber is just an integer, let's say 0. It exists on the database, and it's assigned to the player in say rankLevel (I used title before, but I think this demonstrates its purpose better). So player setVariable["rankLevel", dbNumber, true];. This number is then used to determine a player's prefix to their name (multiplayer here). So _otherPlayerRankLevel = cursorTarget getVariable "rankLevel"; I then use this number to give them the appropriate prefix using drawIcon3D. As I said this initially worked fine (multiplayer test server with some friends). When we moved it to our live server, it seems to be fine initially but as time goes by, more and more people are without titles. Relogging and reconnecting doesn't fix it. Everytime you respawn, I use the above setVariable to ensure rankLevel is attached to the player object. The values in the database are not modified, they are set manually to certain integers and that's it. They never change throughout gameplay.
  7. I have some values that are assigned to players as they spawn in, from a database. These numbers are used to determine players' titles. So when they spawn player setVariable["title",dbNumber,true]; This generally works, but sometimes it doesn't, and I see the word "any" instead. For example, "any John", instead of "Sgt. John". I thought maybe some clients were missing the variable being assigned (too far away for example). So I set up the setVariable command to happen every X minutes. Seems the problem still persists though. What am I missing? Thanks!
  8. I'm trying to make an addAction option that only appears if the person trying to interact with the car is not the owner. It doesn't show if it's the owner, but it also doesn't show if the person is not the owner! I'm using !((cursorTarget getVariable "vehicle_info_owners") == (name player)) I've used cursorTarget getVariable "vehicle_info_owners" in other scripts and it's displayed the car owner fine. I'm not sure what's going on here though. Thanks!
  9. Scotty123

    Altis Life RPG

    You can't see the names of other players when you're on top of a building with them eg hospital in Kavala. Any idea why that is?
  10. Scotty123

    Altis Life RPG

    There is a variable local to the user called "life_coplevel", which as it suggests, gives you your cop rank. Is there a way to get the "life_coplevel" of a player near you?
×