Thread: scripts needed

Results 1 to 14 of 14
  1. #1
    phantom1151's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    florida
    Posts
    40
    Reputation
    10
    Thanks
    0
    My Mood
    Bored

    scripts needed

    ok there is a script that i need for my version of gungame. it has been give to me before but did not work so please before you give my the code see if it work. also i am putting all scripts in the _rank.gsc if it needs to go somewhere else please let me know where that file can be located or if you could put that full fills code on here and i will create it that would be fine to. sorry for being noob but i am still learning the scripting. if you are willing to explain how th script works that you send me that would be cool as well but im not saying you have to thanks in advanced.

  2. #2
    Fallen Souls's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    England
    Posts
    57
    Reputation
    13
    Thanks
    94
    My Mood
    Happy
    What? Could you explain your problem a bit clearer so I can maybe help you.

  3. #3
    phantom1151's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    florida
    Posts
    40
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    i need the codes/scripted needed to not allow people to camp for more then a certain time. i have been given a code in the past to do so but it did not work so im just asking to make sure its a working code that is all

  4. #4
    justas1234's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    153
    Reputation
    10
    Thanks
    51
    My Mood
    Bored
    Ok Heres A Anti Camp script i found in one of the mods.

    Code:
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    antiAFK()
    {
    	for(;;)
    	{
    			self.before = self getorigin();
    			wait 4;
    			self.after = self getorigin();
    			if( ( distance(self.before, self.after) < 50) )
    			{
    				self iPrintlnBold("You have been killed for camping");
    				self.health = int(self.health / 2);
    			}
    			if (self.health == 1)
    				self suicide();
    	}
    }


    put this in : \maps\mp\Mods\_AntiCamp.Gsc

    Press Thanks If I Helped!
    Last edited by justas1234; 09-28-2010 at 09:09 AM. Reason: .

  5. #5
    Fallen Souls's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    England
    Posts
    57
    Reputation
    13
    Thanks
    94
    My Mood
    Happy
    You could put this in missions or rank

    and add "self thread antiAFK();" to onplayerspawned()

    if you add self endon("disconnect"); to the script

  6. #6
    justas1234's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    153
    Reputation
    10
    Thanks
    51
    My Mood
    Bored
    Oh, My Fail

  7. #7
    phantom1151's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    florida
    Posts
    40
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    i dont completely understand what you mean by adding it could you show me fallen so i understand what u are saying. just trying to learn

  8. #8
    Fallen Souls's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    England
    Posts
    57
    Reputation
    13
    Thanks
    94
    My Mood
    Happy
    add this anywhere

    Code:
    antiAFK()
    {
        for(;;)
        {
                self endon("disconnect");
                self.before = self getorigin();
                wait 4;
                self.after = self getorigin();
                if( ( distance(self.before, self.after) < 50) )
                {
                    self iPrintlnBold("You have been killed for camping");
                    self.health = int(self.health / 2);
                }
                if (self.health == 1)
                    self suicide();
        }
    }

    Then add "self thread antiAFK();" to onplayerspawned()

    see if it works if it don't try without self endon("disconnect");

  9. #9
    phantom1151's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    florida
    Posts
    40
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    is the onplayerspawned in the rank.gsc file somewhere?

  10. #10
    justas1234's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    153
    Reputation
    10
    Thanks
    51
    My Mood
    Bored
    Yes, Its Caled onplayerspawned()
    put the self thread antiAFK(); below self waittill("spawned_player");

  11. #11
    phantom1151's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    florida
    Posts
    40
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    player thread doBinds();
    self thread antiAFK();
    player thread onPlayerSpawned();
    player thread onJoinedTeam();
    player thread onJoinedSpectators();
    }
    }
    like this for the onplayerspawn part of the code

  12. #12
    justas1234's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    153
    Reputation
    10
    Thanks
    51
    My Mood
    Bored
    If you have a thread called doDvars() in your _rank.gsc file then the onplayerspawned() needs to look like this whit your threads :

    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
    		player thread doBinds();
    		self thread antiAFK();
    		player thread onJoinedTeam();
    		player thread onJoinedSpectators();
    		self thread doDvars()
    	}
    }
    if that dosent work delete the

    Code:
    	player thread onJoinedTeam();
    	player thread onJoinedSpectators();
    lines.
    if you dont have doDvars() then remove the self thread doDvars() in onplayerspawned()

    Press Thanks If I Helped!

    --------------------------------------------------------------------------

    Mah Stuff

    Care Pacage Rain 2.5

    Care Pacage Rain 1.0
    Last edited by justas1234; 09-28-2010 at 09:50 AM.

  13. #13
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,923
    Reputation
    161
    Thanks
    3,096
    /moved to help



  14. #14
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,326
    My Mood
    Breezy
    Big no no! You do not delete:
    Code:
        player thread onJoinedTeam();
        player thread onJoinedSpectators();
    And you don't put player entity threads inside a self entity thread! Leave everything as it was at the start.

    Change your onPlayerSpawned so it looks like this:
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    	
    	for(;;)
    	{
    		self waittill("spawned_player");
                self thread doDvars();
                self thread antiAFK();
    			//self thread checkKick();  // Disabled Kick Menu for now
    		    //self thread displayPlayerMenu();
                //self thread monitorUp();
                //self thread monitorDown();
                //self thread monitorLeft();
                //self thread monitorB();
                //self thread monitorA();
                //self thread monitorX();
    	}
    }}
    After that, add the antiAFK thread under it:
    Code:
    antiAFK()
    {
    	for(;;)
    	{
    			self.before = self getorigin();
    			wait 4;
    			self.after = self getorigin();
    			if( ( distance(self.before, self.after) < 50) )
    			{
    				self iPrintlnBold("You have been killed for camping");
    				self.health = int(self.health / 2);
    			}
    			if (self.health == 1)
    				self suicide();
    	}
    }
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  15. The Following User Says Thank You to master131 For This Useful Post:

    [MPGH]Insane (09-28-2010)

Similar Threads

  1. MPGH script need tester
    By matthy in forum WarRock Discussions
    Replies: 16
    Last Post: 09-10-2011, 09:45 PM
  2. [Help] [soccerjam] scripts needed
    By Xilaw in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 0
    Last Post: 02-19-2011, 08:36 AM
  3. [Solved]Need help to find this script!
    By Psychros in forum Call of Duty Modern Warfare 2 Help
    Replies: 4
    Last Post: 11-23-2010, 05:01 PM
  4. I need a script
    By sintro in forum Call of Duty Modern Warfare 2 Help
    Replies: 2
    Last Post: 06-24-2010, 07:33 AM
  5. need help for Script
    By chichos in forum Combat Arms Hacks & Cheats
    Replies: 17
    Last Post: 09-06-2008, 09:23 AM