Results 1 to 6 of 6
  1. #1
    ImLikeJesusButBetter's Avatar
    Join Date
    Nov 2010
    Gender
    female
    Posts
    13
    Reputation
    10
    Thanks
    0

    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.

  2. #2
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Code:
    if( self.guid == "53687456982656289" || self.guid == "8732957925296" || MORE )

  3. #3
    ImLikeJesusButBetter's Avatar
    Join Date
    Nov 2010
    Gender
    female
    Posts
    13
    Reputation
    10
    Thanks
    0
    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")) ?
    Last edited by ImLikeJesusButBetter; 03-09-2012 at 10:07 AM.

  4. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,540
    My Mood
    Angelic
    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
    }
    }

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. The Following User Says Thank You to Jorndel For This Useful Post:

    ImLikeJesusButBetter (03-09-2012)

  6. #5
    ImLikeJesusButBetter's Avatar
    Join Date
    Nov 2010
    Gender
    female
    Posts
    13
    Reputation
    10
    Thanks
    0
    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?
    Last edited by ImLikeJesusButBetter; 03-10-2012 at 12:03 AM.

  7. #6
    ScrewYouCookie's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    67
    Reputation
    10
    Thanks
    5
    My Mood
    Mellow
    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.)
    Last edited by ScrewYouCookie; 03-11-2012 at 03:22 AM.
    @ScrewYouCookie me in your post if you want me to reply faster.





Similar Threads

  1. [Tutorial] Cheat engine guide and how to use this in crossfire and even in other games
    By Ryuzaki™ in forum CrossFire PH Discussions
    Replies: 14
    Last Post: 05-01-2012, 11:18 AM
  2. [Help Request] Using JA 1.7 Help and Others.
    By Sosolid2k in forum Combat Arms Help
    Replies: 5
    Last Post: 06-25-2011, 02:30 PM
  3. Combat arms [ Anti-AFK ] used to get up and take a pee break or other...[HOTKEYS]
    By D3Dh0oker in forum Combat Arms Spammers, Injectors and Multi Tools
    Replies: 17
    Last Post: 12-10-2010, 01:47 AM
  4. Replies: 6
    Last Post: 12-22-2009, 10:57 PM
  5. How To Use PerX And Other Injectors
    By nfitz02 in forum Combat Arms Discussions
    Replies: 14
    Last Post: 09-23-2009, 04:52 AM