Author Topic: What is &&1?  (Read 282 times)

0 Members and 1 Guest are viewing this topic.

Offline Rex109

  • - Original Poster (OP) -
  • Fresh Corpse
  • Posts: 3
  • Country: it
  • Respect: 0
  • DAPHUCK?!
    • View Profile

What is &&1?

« on: May 13, 2018, 12:57:04 pm »
Hi guys! I'm really new to the forum so forgive me if i am in the wrong section. so... i found a sample script that contains "&&1" in a string, what does it means?
for example:

Code: [Select]
self.secretTimer.label = &"Time in left: &&1";

or

Code: [Select]
trig sethintstring("Press ^1&&1^7 to select Music");

Please help! i couldn't find nothing on internet.

Offline MZslayer11

  • *
  • Zombie Colossus
  • Posts: 1,185
  • Country: us
  • Respect: 154
    • MZslayer11
    • MZslayer11's YouTube Channel
    • View Profile
  • Skype: skype:Ask Me?chat
  • CoD: WaW: MZslayer11

Re: What is &&1?

« Reply #1 on: May 14, 2018, 04:45:30 pm »
&&1 is the keybinding for the 'use' key. You need to keep that in there.

Offline Harry Bo21

  • *
  • Immortal
  • Posts: 6,856
  • Country: gb
  • Respect: 960
    • HarryBo21
    • View Profile
  • Skype: skype:[email protected]?chat
  • CoD: WaW: HarryBo000

Re: What is &&1?

« Reply #2 on: May 14, 2018, 05:18:22 pm »
It’s not always the keybind- depends on the context

[{+activate}] is the use button

Top one is a localised string - &””
« Last Edit: May 14, 2018, 05:25:55 pm by Harry Bo21 »
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)

Offline MZslayer11

  • *
  • Zombie Colossus
  • Posts: 1,185
  • Country: us
  • Respect: 154
    • MZslayer11
    • MZslayer11's YouTube Channel
    • View Profile
  • Skype: skype:Ask Me?chat
  • CoD: WaW: MZslayer11

Re: What is &&1?

« Reply #3 on: May 14, 2018, 06:22:02 pm »
Yeah what he said

Offline Rex109

  • - Original Poster (OP) -
  • Fresh Corpse
  • Posts: 3
  • Country: it
  • Respect: 0
  • DAPHUCK?!
    • View Profile

Re: What is &&1?

« Reply #4 on: May 15, 2018, 03:31:00 am »
It’s not always the keybind- depends on the context

[{+activate}] is the use button

Top one is a localised string - &””

Is there anything that i can read to learn about it? Like an online handbook or smth like that

Offline gympie6

  • Pack-a-Puncher
  • Posts: 165
  • Country: nl
  • Respect: 35
  • I love skulls
    • Distenc5
    • View Profile
  • CoD: WaW: Teffrie

Re: What is &&1?

« Reply #5 on: May 15, 2018, 08:26:45 am »
Is there anything that i can read to learn about it? Like an online handbook or smth like that

Have you checked this page?:
https://confluence.ugx-mods.com/display/UGXMODS/Scripting+Guide

This is a wiki for making cod mods
The official game when it comes out, maybe.  As long as it isn't just passed call of duties copied.  But wait, Black ops 4 is a complete copy of the Chinese Call Of Duty Online.

You wot dude!

Offline Rex109

  • - Original Poster (OP) -
  • Fresh Corpse
  • Posts: 3
  • Country: it
  • Respect: 0
  • DAPHUCK?!
    • View Profile

Re: What is &&1?

« Reply #6 on: May 15, 2018, 09:36:44 am »
Have you checked this page?:
https://confluence.ugx-mods.com/display/UGXMODS/Scripting+Guide

This is a wiki for making cod mods

No, don't worry 'bout that, i know how to script, i wasn't sure about the &&1 thingy.

Btw, i found something about localized string, BUT as you can see from this line of code it refers to a numeric value that is dynamic and changes every second.

Code: [Select]
    self endon("secret_done");
    if(isdefined(self.secretTimer))
    self.secretTimer destroy();
    self.secretTimer=newclienthudelem(self);
    self.secretTimer.foreground = true;
    self.secretTimer.alignX = "center";
    self.secretTimer.alignY = "bottom";
    self.secretTimer.horzAlign = "center";
    self.secretTimer.vertAlign = "bottom";
    self.secretTimer.x = 0;
    self.secretTimer.y = -7;
    self.secretTimer.sort = 5;
    self.secretTimer.fontScale = 1.6;
    self.secretTimer.font = "default";
    self.secretTimer.glowAlpha = 1;
    self.secretTimer.hidewheninmenu = true;
       self.secretTimer.label = &"Time in left: &&1";
 
    if(isdefined(level.randomcolor))
        self.secretTimer.glowColor=level.randomcolor;
    else
        self.secretTimer.glowColor=(1,0,0);
    time=120;
    for(i=0;i<time;i++)
    {
        self.secretTimer setvalue(time-i);
        wait 1;
    }
    self.secretTimer setvalue(0);
    self suicide();
    if(isdefined(self.secretTimer))
    self.secretTimer destroy();

I repeat i DIDN'T WROTE THIS CODE