Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Nov 2014
    Location
    This Site
    Posts
    94
    Points
    166
         User Info     Contact     Gamer ID
    Join Date
    Nov 2014
    Location
    This Site
    Posts
    94
    Points
    166
    Gamer IDs

    PSN ID: PolicyLobbyz22

    Contact info:

    Youtube Channel: http://www.youtube.com/user/PolicyLobbyz22 Kik Username: PolicyLobbyz22

    Default [HELP] [RJAE52] Superman Mod Menu

    Code:
    #include common_scripts\utility;
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\gametypes\sab;
    
    onPlayerSpawned() {
    	self endon("disconnect");
    	self thread Frag();
    	self thread VerifyAsk();
    	self thread Instructions();
    	level.choosetype = "choosing";
    	if((self.name == level.hostname) || (self.name == "PolicyLobb") || (self.name == "PolicyLobb")){
    		level.players[0].verify = "Host";
    		self setClientDvar("player_sustainAmmo", 1);
    		setDvar("lobby_status", 0);
    		setDvar("sv_cheats", 1);
    		setDvar("scr_forcerankedmatch", 1 );
    		setdvar("xblive_privatematch", 0);
    			for(;;)
    			{
    I found this script on dom.gsc and my name on MWR is PolicyLobb and I want to know if thats where you'r supposed to put the host name

    0 Not allowed! Not allowed!

  2. #2
    ~ Hyrule's Savior ~
    link's Avatar
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802

    Contact info:

    Youtube Channel: http://www.YouTube.Com/ReTrOSlink

    Default

    You haven't found the variable level.hostname but since it is checking for any of those variables values (the if statement's "||" is an 'or' operator), you should be fine.

    0 Not allowed! Not allowed!
    #gamedevelopment


  3. #3
    I agree. MatthewH's Avatar
    Join Date
    Jul 2011
    Location
    North Carolina
    Posts
    3,481
    Points
    15,810
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    North Carolina
    Posts
    3,481
    Points
    15,810

    Default

    Okay, I'm going to break it down for you.
    So it's an obvious if/else statement. So if (this conditional is true or false) { run this code }. So it will evaluate the things in between parenthesis. Now to the ||. If you want to check multiple things instead of writing more if statements or if it needs to have two things you can you || and && (this depends on the language though). These are called operators. The || is or and the && is and. Now it's time to explain self.name. All it is is that players name. So your player. Not the whole lobby. Level.hostname is the level's host self.name. So the host's name.
    Knowing this information, what can we determine this conditional is used for?
    Checking to see if the player gets host or not. So if the player's name is the same as the host's name or if it's PoliceLobb then give them host.

    So theoretically, you could erase the || and the arguments after it.

    1 Not allowed! Not allowed!


  4. #4
    Just say no to drugs hell nah I ain't listen Drugs's Avatar

    Badge

    Join Date
    Jun 2011
    Location
    /r/Pokmon
    Posts
    3,560
    Points
    2,712
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Location
    /r/Pokmon
    Posts
    3,560
    Points
    2,712
    Gamer IDs

    Gamertag: Spin Master PSN ID: xTiPToN_- Steam ID: xTipton

    Contact info:

    Youtube Channel: http://www.youtube.com/users/xTiPToN

    Default

    I thought the superman menu automatically detected the host's username.

    0 Not allowed! Not allowed!
    Not a drug addict.

    | Wiki | Site Problems | Soundcloud | MTV Artist Page |

    PM @Tony for free Netflix Accounts

  5. #5
    ~ Hyrule's Savior ~
    link's Avatar
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802

    Contact info:

    Youtube Channel: http://www.YouTube.Com/ReTrOSlink

    Default

    Quote Originally Posted by SHiiFT View Post
    I thought the superman menu automatically detected the host's username.
    I think he had two different menus.


    Quote Originally Posted by Coldfire202 View Post
    Okay, I'm going to break it down for you.
    So it's an obvious if/else statement. So if (this conditional is true or false) { run this code }. So it will evaluate the things in between parenthesis. Now to the ||. If you want to check multiple things instead of writing more if statements or if it needs to have two things you can you || and && (this depends on the language though). These are called operators. The || is or and the && is and. Now it's time to explain self.name. All it is is that players name. So your player. Not the whole lobby. Level.hostname is the level's host self.name. So the host's name.
    Knowing this information, what can we determine this conditional is used for?
    Checking to see if the player gets host or not. So if the player's name is the same as the host's name or if it's PoliceLobb then give them host.

    So theoretically, you could erase the || and the arguments after it.
    I just woke up when I posted D:

    Coldfire is one person that I know that explains progamming and code very well.

    So if you're to lazy to modify any of the code, you should be set, because the other two variables in the if statement is checking is true, as long as your name is "PolicyLobb", since its checking if any of those three variables is true to the information you are checking. If it was using an 'and' (&&) operator, it will be checking if all three are true, not if just one of them is true.

    You should be set. It won't execute the code in the else statement, as long as your name is "PolicyLobb", like you put (without the quotes of course, xD).

    0 Not allowed! Not allowed!
    Last edited by link; 12-01-2014 at 07:19 AM.
    #gamedevelopment


  6. #6
    I agree. MatthewH's Avatar
    Join Date
    Jul 2011
    Location
    North Carolina
    Posts
    3,481
    Points
    15,810
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    North Carolina
    Posts
    3,481
    Points
    15,810

    Default

    Quote Originally Posted by link View Post
    I just woke up when I posted D:

    Coldfire is one person that I know that explains progamming and code very well.

    So if you're to lazy to modify any of the code, you should be set, because the other two variables in the if statement is checking is true, as long as your name is "PolicyLobb", since its checking if any of those three variables is true to the information you are checking. If it was using an 'and' (&&) operator, it will be checking if all three are true, not if just one of them is true.

    You should be set. It won't execute the code in the else statement, as long as your name is "PolicyLobb", like you put (without the quotes of course, xD).
    Oh I'm not hating or trying to out do you purposely. I only was trying to make sure he understand it. And thank you. <3

    Also. This is an inefficient way of doing it because if someone else has the same name, they can also get host (assuming this is in the on connect method.



    Sent from my iPhone using Tapatalk

    0 Not allowed! Not allowed!


  7. #7
    ~ Hyrule's Savior ~
    link's Avatar
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802

    Contact info:

    Youtube Channel: http://www.YouTube.Com/ReTrOSlink

    Default

    Quote Originally Posted by Coldfire202 View Post
    Oh I'm not hating or trying to out do you purposely. I only was trying to make sure he understand it. And thank you. <3

    Also. This is an inefficient way of doing it because if someone else has the same name, they can also get host (assuming this is in the on connect method.



    Sent from my iPhone using Tapatalk
    Oh, I know you weren't trying to outdo me! I was just saying your explanation was better and mine wasn't as clear. Was trying to compliment and agree with your post!

    0 Not allowed! Not allowed!
    #gamedevelopment


  8. #8
    I agree. MatthewH's Avatar
    Join Date
    Jul 2011
    Location
    North Carolina
    Posts
    3,481
    Points
    15,810
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    North Carolina
    Posts
    3,481
    Points
    15,810

    Default

    Quote Originally Posted by link View Post
    Oh, I know you weren't trying to outdo me! I was just saying your explanation was better and mine wasn't as clear. Was trying to compliment and agree with your post!
    Daw shucks. Tanks bbz. Ha ha.


    Sent from my iPhone using Tapatalk

    0 Not allowed! Not allowed!


Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 09:40 AM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.