Results 1 to 10 of 35

Thread: Quick questions thread

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private Lonsofore's Avatar
    Join Date
    Oct 2016
    Posts
    86
    Thanks
    82
    Thanked 38 Times in 25 Posts
    Quote Originally Posted by guiismiti View Post
    How can I print a precached string?
    In iprintln you can use only simple strings (like str="string").
    And as I know, strings with & (don't know a real name of this strings. somebody tell me, please) you can only precache and use for HUDs.

    So, you can:
    1. Make a simple string and use iprintln:
    Code:
    game["spawnprotection"] = "^2Spawn protection ^1OFF^7";
    self iprintln(game["spawnprotection"]);
    2. Make a HUD with your precached string:
    Code:
    game["spawnprotection"] = &"^2Spawn protection ^1OFF^7";
    precacheString(game["spawnprotection"]);
    self.hud = newClientHudElem(self);
    self.hud.x = x;
    self.hud.y = y;
    self.hud.label = game["spawnprotection"];

  2. The Following 2 Users Say Thank You to Lonsofore For This Useful Post:

    guiismiti (23rd March 2017),kung foo man (23rd March 2017)

  3. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Quote Originally Posted by Lonsofore View Post
    And as I know, strings with & (don't know a real name of this strings. somebody tell me, please) you can only precache and use for HUDs.
    You could refer to them as "configstring strings" or "precached strings" (sic) ^^

    guiismiti:

    Basically you need to track yourself which values your precached strings have. IzNoGoD compiled this post with basically all info's: https://killtube.org/showthread.php?...out-precaching
    timescale 0.01

  4. The Following User Says Thank You to kung foo man For This Useful Post:

    guiismiti (23rd March 2017)

Posting Permissions

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