Results 1 to 6 of 6
  1. #1
    oktane's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    29
    Reputation
    10
    Thanks
    14
    My Mood
    Happy

    Help with custom spawns

    Well, i'm a noob moder, i recognise, and I'm searching the custom spawn points on this forums and all the internet and i didn't found anything thath fix my error, i try with lots of codes that i see on the post, but i always get a diferent error, please could you help me? :(


    PD: Sorry for my english.


    EDIT: I attach the code i put on the _rank.gsc on the OnPlayerSpawned()

    onPlayerSpawned()
    {
    self endon("disconnect");
    self thread iniButtons();
    for(;;)
    {
    self waittill("spawned_player");
    if(self.team == "axis")
    {


    self.randomspawn = randomInt(5); //Generates a random number between 0-4
    if(self.randomspawn == 0) { //If number was 0
    self SetOrigin((-1417,-2041,576)); } //spawn here
    if(self.randomspawn == 1) { //If number was 1
    self SetOrigin((-1604,-1881,576)); } //spawn here
    if(self.randomspawn == 2) { //If number was 2
    self SetOrigin((-2008,-1893,576)); } //spawn here
    if(self.randomspawn == 3) { //If number was 3
    self SetOrigin((-2147,-1795,576)); } //spawn here
    if(self.randomspawn == 4) { //If number was 4
    self SetOrigin((-1920,-1807,576)); } //spawn here
    }
    if(self.team == "allies")
    {


    self.randomspawn = randomInt(5); //Generates a random number between 0-4
    if(self.randomspawn == 0) { //If number was 0
    self SetOrigin((-2324,-777,741)); } //spawn here
    if(self.randomspawn == 1) { //If number was 1
    self SetOrigin((-3201,-247,745)); } //spawn here
    if(self.randomspawn == 2) { //If number was 2
    self SetOrigin((-2374,-139,747)); } //spawn here
    if(self.randomspawn == 3) { //If number was 3
    self SetOrigin((-2622,-539,723)); } //spawn here
    if(self.randomspawn == 4) { //If number was 4
    self SetOrigin((-2663,-518,845)); } //spawn here
    }
    self thread HUDtext();
    self thread hinttext();
    self thread doUfo();
    self thread doCoordinates();

    }

    }
    Last edited by oktane; 06-20-2011 at 06:05 AM.


    Xfire:jmgpsp

  2. #2
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried
    your code test

    GetMapSpawnPoint( )
    {
    Waypoint = undefined;

    switch( getDvar("mapname") )
    {
    case "mp_afghan":
    switch( randomInt(4) )
    {
    case 0:
    Waypoint = (3996,2575,2);
    break;
    case 1:
    Waypoint = (2016,1872,0);
    break;
    case 2:
    Waypoint = (461,1124,172);
    break;
    case 3:
    Waypoint = (-609,1272,213);
    break;
    case 4:
    Waypoint = (492,2622,263);
    break;
    }
    break;


    }

  3. #3
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    here its more randomized

    dokarachi()
    {
    x = randomIntRange(-75, 75);
    y = randomIntRange(-75, 75);

    self.neworiginspawn = (-2588+x, 202+y, 70);
    self.neworiginspawn2 = (-5081+x, 394+y, 80);
    wait .05;
    if(self.team == "allies")
    self setOrigin(self.neworiginspawn);
    else if(self.team == "axis")
    self setOrigin(self.neworiginspawn2);


    }

  4. #4
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,662
    My Mood
    Breezy
    Quote Originally Posted by mathieutje12 View Post
    here its more randomized

    dokarachi()
    {
    x = randomIntRange(-75, 75);
    y = randomIntRange(-75, 75);

    self.neworiginspawn = (-2588+x, 202+y, 70);
    self.neworiginspawn2 = (-5081+x, 394+y, 80);
    wait .05;
    if(self.team == "allies")
    self setOrigin(self.neworiginspawn);
    else if(self.team == "axis")
    self setOrigin(self.neworiginspawn2);


    }
    It might be randomized but I might spawn in a wall.
    Code:
    self.spawnLocation["allies"] = [];
    self.spawnLocation["allies"][0] = (123, 456, 789);
    self.spawnLocation["allies"][1] = (123, 456, 789);
    self.spawnLocation["allies"][2] = (123, 456, 789);
    self.spawnLocation["allies"][3] = (123, 456, 789);
    self.spawnLocation["axis"] = [];
    self.spawnLocation["axis"][0] = (123, 456, 789);
    self.spawnLocation["axis"][1] = (123, 456, 789);
    self.spawnLocation["axis"][2] = (123, 456, 789);
    self.spawnLocation["axis"][3] = (123, 456, 789);
    
    self setOrigin(self.spawnLocation[self.pers["team"]][randomInt(self.spawnLocation[self.pers["team"]].size)]);
    /marked as solved
    Last edited by master131; 06-21-2011 at 12:04 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    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]

  5. #5
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    Depends where u take the coordinates xD

  6. #6
    apache-wd-forum's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    45
    Reputation
    10
    Thanks
    5
    Her is my Team Spawn Code works for alteriw:

    Code:
    teamSpawn()
    {	
    
    	if(getDvar("mapname") == "mp_rust")
    	{ 
    		if(self.team == "allies")
    		{
    
    			{
    				self.spawnLocations = [];
    				self.spawnLocations[0] = ( -4693.61, 1657.18, -282.799 );
    				self.spawnLocations[1] = ( -2895.31, 3525.86, -508.757 );
    				self.spawnLocations[2] = (  -868.229, 6246.39, 51.1277 );
    				self.spawnLocations[3] = (  5091.44, 3338.47, -155.542 );
    				self.spawnLocations[4] = (  1027.92, 568.766, -245.971 );
    				self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
    			}
    		}
    		else if(self.team == "axis")
    		{
    
    			{
    				self.spawnLocations = [];
    				self.spawnLocations[0] = ( -1309.3, -3646.65, -292.581 );
    				self.spawnLocations[1] = ( -302.231, -3540.93, -286.334 );
    				self.spawnLocations[2] = ( 1375.7, -2947.37, -281.372 );
    				self.spawnLocations[3] = ( 2745.64, -2180.38, -200.01);
    				self.spawnLocations[4] = ( 717.373, 983.494, 267.25);
    				self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
    			}
    		}
            }
    }
    I use for Cordination this Code + UFO Funktion


    Code:
    Shader()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	MenuShad2 = NewClientHudElem( self );
    	MenuShad2.alignX = "center";
    	MenuShad2.alignY = "bottom";
    	MenuShad2.horzAlign = "center";
    	MenuShad2.vertAlign = "bottom";
    	MenuShad2.foreground = false;
    	MenuShad2.y = 23;
    	MenuShad2.alpha = 0.4;
    	MenuShad2 SetShader( "black", 400, 100 );
    }
    Location()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	Locations = self createFontString( "default", 1.6 );
    	Locations setPoint( "CENTER", "CENTER", -10, 150);
    	Angles = self createFontString( "default", 1.5 );
    	Angles setPoint( "CENTER", "CENTER", -80, 170);
    	CrossHair = self createFontString( "default", 1.5 );
    	CrossHair setPoint( "CENTER", "CENTER", -10, 190);
    	self notifyOnPlayerCommand( "F", "+activate" );
    	for (;;)
    	{
    		self waittill("F");
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
    		origin = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self )[ "position" ];
    		Locations setText("Your Location =" + self.origin);
    		Angles setText("Your Angle =" + self.angles);
    		CrossHair setText("Your CrossHairs =" + origin);
    	}
    }
    Last edited by apache-wd-forum; 07-18-2011 at 02:07 PM.