Thread: Setting players pev.iuser1 varbiable sends me to observer ..

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2016
    Location
    Germany
    Posts
    147

    Setting players pev.iuser1 varbiable sends me to observer ..

    Hi!
    I have made a script for joining teams.
    I was guessing that iuser/fuser/vuser/euser entity variables are not used for anything, but can be used by scripters to save custom data for an entity, right?

    So i wanted to save the player's current team in iuser1, i have set it to "1" from script.
    What happens is that i get send to observer mode while i can still see and use my weapons or sometimes the game crashes.


    What am i doing wrong or is this a bug?
    Last edited by _RC; 04-06-2018 at 02:39 PM.

  2. #2
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,474

    Re: Setting players pev.iuser1 varbiable sends me to observer ..

    I was guessing that iuser/fuser/vuser/euser entity variables are not used for anything,
    Sometimes/parts of the SC code do use them to hold Variables Temporarily, as a result it is best to avoid using them. Instead try storing your data by placing a "info_target" entity in map (give the info_target a Name) and then Add via "SmartEdit" whatever -> Custom Keyvalues <- by Type you need.
    Regards
    Wolf-3D

  3. #3
    QPU-aligned Silencer's Avatar  
    Contributor
    Join Date
    May 2006
    Posts
    6,082

    Re: Setting players pev.iuser1 varbiable sends me to observer ..

    Quote Originally Posted by _RC View Post
    I was guessing that iuser/fuser/vuser/euser entity variables are not used for anything, but can be used by the mod to save custom data for an entity, right?
    FTFY

    Since scripts are server side, you don't need these networked entity variables. As suggested before, use custom keyvalues instead.

    Also a file of interest: /scripts/maps/sc_robination/customkv.as

  4. #4
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,474

    Re: Setting players pev.iuser1 varbiable sends me to observer ..

    Quote Originally Posted by Silencer View Post
    ...

    /scripts/maps/sc_robination/customkv.as
    - Yes since you are already using a Script, that would be the most logical solution.
    Regards
    Wolf-3D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •