Results 1 to 7 of 7
  1. #1
    kerocs's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    65
    Reputation
    10
    Thanks
    3

    [help] Shooting solid crates

    I have the following code to shoot crates, but somehow there not solid (so u cant use it as baricade):

    Code:
    SpawnCrate()
    {
    	self endon("death");
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 2000, vec[1] * 2000, vec[2] * 2000), 0, self)[ "position" ];
                    obj = spawn("script_model", self gettagorigin("tag_eye"));
                    obj setModel( "com_plasticcase_friendly" );
    		obj CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    		obj Solid();
                    obj moveto(SPLOSIONlocation, distance(self gettagorigin("tag_eye"), SPLOSIONlocation)/1200);
                    obj.angles = self getplayerangles();
    		obj.health = 250;
                    self thread ObjManageHealth(obj);                
    			
    		
    	}
    }
    
    ObjManageHealth(obj)
    {
    	for(;;){
    		obj setcandamage(true);
    		obj.team = self.team;
    		obj.owner = self.owner;
    		obj.pers["team"] = self.team;
    		if(obj.health < 0){
    			level.chopper_fx["smoke"]["trail"] = loadfx ("fire/fire_smoke_trail_L");
    			playfx(level.chopper_fx["smoke"]["trail"], obj.origin);
    			obj delete();
    			}
    		wait 0.1;
    		}
    }
    What did i do wrong ?

  2. #2
    Josephlittle™'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    GSC Modding Section
    Posts
    1,345
    Reputation
    26
    Thanks
    560
    My Mood
    Devilish
    Quote Originally Posted by kerocs View Post
    I have the following code to shoot crates, but somehow there not solid (so u cant use it as baricade):

    Code:
    SpawnCrate()
    {
    	self endon("death");
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 2000, vec[1] * 2000, vec[2] * 2000), 0, self)[ "position" ];
                    obj = spawn("script_model", self gettagorigin("tag_eye"));
                    obj setModel( "com_plasticcase_friendly" );
    		obj CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    		obj Solid();
                    obj moveto(SPLOSIONlocation, distance(self gettagorigin("tag_eye"), SPLOSIONlocation)/1200);
                    obj.angles = self getplayerangles();
    		obj.health = 250;
                    self thread ObjManageHealth(obj);                
    			
    		
    	}
    }
    
    ObjManageHealth(obj)
    {
    	for(;;){
    		obj setcandamage(true);
    		obj.team = self.team;
    		obj.owner = self.owner;
    		obj.pers["team"] = self.team;
    		if(obj.health < 0){
    			level.chopper_fx["smoke"]["trail"] = loadfx ("fire/fire_smoke_trail_L");
    			playfx(level.chopper_fx["smoke"]["trail"], obj.origin);
    			obj delete();
    			}
    		wait 0.1;
    		}
    }
    What did i do wrong ?
    that will fail so hard because it will lag a lot...or make the code heavy and crash.

  3. #3
    kerocs's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    65
    Reputation
    10
    Thanks
    3
    nope it wont lagg cause ill limit the amount of cps one has per respawn and i make only usps spawn the cps. So u cant answer my question ?

  4. #4
    tank2800's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    23
    Reputation
    10
    Thanks
    3
    My Mood
    Fine
    Quote Originally Posted by kerocs View Post
    nope it wont lagg cause ill limit the amount of cps one has per respawn and i make only usps spawn the cps. So u cant answer my question ?
    y dont you just get spawn mod i would put attachment but idk how

  5. #5
    kerocs's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    65
    Reputation
    10
    Thanks
    3
    hmmm i couldnt find spawn mod do the spawned carepackages block in that mod ? I made it work but they dont block ...

  6. #6
    khcastro's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Location
    CALIFORNIA :D
    Posts
    261
    Reputation
    10
    Thanks
    147
    My Mood
    Inspired
    Quote Originally Posted by tank2800 View Post
    y dont you just get spawn mod i would put attachment but idk how
    go to advanced options when posting then scroll down to additional options click manage attachments then attach it make sure it is in a rar file and dont forget virus scans so it can be apporved. youll probly get told to make a new thread for it


    T͖̤̠̮̬̠̹̖̥͔̬͖̖͛̏͗͝͡Ḣ̸̵̰̲̖͚̘̹͎̫͈̫̗͖̅̉̐ͤ̏ͪ̾͢ͅẺ̷ͩ̐̚ ̸̴̷̢͎͇̤͇Ŕ̡̢̻̦̗̪̳̮̈́͊ͨ̆͐ͪ̈́̆̍͗̇͆͆ͯ͠͞E̷̷͔̰͍̻̭̟̖ͥ͋̅̽̈́̚ ͍̲̬͚̮̬ ̶̧̭̳̰̠͍̾̓̿̍I̼̟͕̝̽͛̄̂̓̚͘͜͡Ș̷̵̛̳̮̩̯̞̯͈͊ͦ̌͐̍̏́͆̃́̈̔͢ ̫͇…



    MEH


    If McDonalds sold hot dogs, could you, with a straight face, order a McWeiner...and tell them to supersize it?

    Quote Originally Posted by stoshy View Post
    But the thing that rly pisses me off is LAGGERS! Fukin teleporting all over the place. theres 1 guy running at me teleporting LEFT RIGHT LEFT RIGHT like fukin Dragon Ball Z then he fukin commandos my ass =.=
    /WIN

  7. #7
    Insane's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    9,055
    Reputation
    1007
    Thanks
    1,997
    Quote Originally Posted by khcastro View Post


    go to advanced options when posting then scroll down to additional options click manage attachments then attach it make sure it is in a rar file and dont forget virus scans so it can be apporved. youll probly get told to make a new thread for it
    All Major Attachments must be represented in their own separate thread.
    Insane
    Ex Middleman
    [
    PM|VM]
    |x|x|x|x|x|x|x|



    Quote Originally Posted by Boombox View Post
    Shut the fuck up insane you pussy bitch.
    Quote Originally Posted by arunforce View Post
    Shut the fuck up kid, everything that comes out of your mouth sounds retarded as fuck.

Similar Threads

  1. Need help regarding ZP crates.
    By Logical. in forum CrossFire Discussions
    Replies: 14
    Last Post: 08-01-2011, 04:25 AM
  2. [Help]Shoot Throwing Knives?
    By CainFool in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 14
    Last Post: 01-30-2011, 07:55 AM
  3. [Help]Shoot Nuclear Strikes
    By CainFool in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 09-09-2010, 03:54 AM
  4. help with gp crates
    By SUNY2 in forum CrossFire Hacks & Cheats
    Replies: 9
    Last Post: 12-03-2009, 01:56 AM
  5. How Shoot Through Wall PLEASE HELP!!!
    By jokuvaan11 in forum WarRock - International Hacks
    Replies: 14
    Last Post: 06-09-2007, 03:46 PM