HelpUsing multiple GUID's and other conditions

Posts 1–6 of 6 · Page 1 of 1
Using multiple GUID's and other conditions
I currently run a mod that activates special custom classes based on the weapons you spawn with, but I'm looking for a way to make it so that some of them are only available to certain people.

What I'm after is something like this

If GUID = person1's GUID, or person2's GUID or person3's GUID AND they have a AUG-HBAR (Or any gun, obviously) then do something.


Any help is appreciated.
Code:
if( self.guid == "53687456982656289" || self.guid == "8732957925296" || MORE )
Quote Originally Posted by Yamato View Post
Code:
if( self.guid == "53687456982656289" || self.guid == "8732957925296" || MORE )
I'm not that familiar with coding in GSC so how would I go about adding that into something like this?

if(isSubStr(self getCurrentWeapon(), "at4_mp"))

Would it look like

if(self.guid == "53687456982656289" || self.guid == "8732957925296" || self getCurrentWeapon(), "at4_mp")) ?
Quote Originally Posted by ImLikeJesusButBetter View Post
I'm not that familiar with coding in GSC so how would I go about adding that into something like this?

if(isSubStr(self getCurrentWeapon(), "at4_mp"))

Would it look like

if(self.guid == "53687456982656289" || self.guid == "8732957925296" || self getCurrentWeapon(), "at4_mp")) ?
Long times since I coded but:
Code:
if(self.guid == "53687456982656289")
{
if(self getCurrentWeapon() == "at4_mp")
{
//Do something here
}
}
Quote Originally Posted by Jorndel View Post
Long times since I coded but:
Code:
if(self.guid == "53687456982656289")
{
if(self getCurrentWeapon() == "at4_mp")
{
//Do something here
}
}

Alright, thanks. I'll try it, and let you know how it goes.

Another couple of questions.

First, I thought I knew how to get GUID's, apparently not. How do I go about acquiring them?

Secondly, does doing it like that require you to fulfill each condition before the effect triggers? I want multiple GUID's to be able to activate the same thing.

Code:
if(self.guid == "53687456982656289" || self.guid == "8732957925296")
{
if self getCurrentWeapon() == "at4_mp"))
Would that work something like this: If GUID = 53687456982656289 or 8732957925296 and weapon = AT4, then do stuff?
Quote Originally Posted by ImLikeJesusButBetter View Post
Alright, thanks. I'll try it, and let you know how it goes.

Another couple of questions.

First, I thought I knew how to get GUID's, apparently not. How do I go about acquiring them?

Secondly, does doing it like that require you to fulfill each condition before the effect triggers? I want multiple GUID's to be able to activate the same thing.

Code:
if(self.guid == "53687456982656289" || self.guid == "8732957925296")
{
if self getCurrentWeapon() == "at4_mp"))
Would that work something like this: If GUID = 53687456982656289 or 8732957925296 and weapon = AT4, then do stuff?
To get the GUID's type in status in console and should appear close/next to their names.

Code:
aa121() //Thread name, have this go on playerspawned/connect
{	
	if(self.GUID == "Enter GUID here" || self.GUID == "Enter GUID here") /* || = more than one, so you don't have to double thread it, meaning you dont have to thread it twice to get the same result, saving space, you can also use && instead of || */ 
        {
		self.blabla = true;
                
	} else {
		self.blablar = false;
                // you can make another thread here like self thread notBlaBla();
}

notBlaBla()
{
self text("you are not blabla so you will be punished");
}
Or simply:
Code:
aa121()
{	
	if(self.GUID == "Enter GUID here" || self.GUID == "Enter GUID here")
        self/player thread a();
}
If you only wish to use one GUID, use =, not ==, == equals to being more than one, = means just one. (Not too sure about this one either, but if you get a syntax error you know what the cause is, lol.)
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?