Results 1 to 2 of 2
  1. #1
    Josephlittle™'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    GSC Modding Section
    Posts
    1,345
    Reputation
    26
    Thanks
    560
    My Mood
    Devilish

    Thumbs up [How to]Create a Weapon Thread

    Well, since im bored and i wanna help choobs out there who have almost no idea how to do weapon threads, here it goes.

    First, we gonna near a name for your thread, lets just call it doWeapon

    Code:
    doWeapon()
    {
    self endon("disconnect")
    self endon("death")
    }
    First, u always need self endon and take all weapons, or else u will get snytax error

    Now, lets get started on giving weapon. Lets say i wanna give the person a RPG, so what i do is first i put the give weapon code, then i just fill in the blanks

    Code:
    self giveWeapon("<weapon>", 0, false );// You always need ; after every line, and also don forget quotes when u put weapon
    
    self giveWeapon("rpg_mp", 0, false );


    Ok, so now in our thread we are going to need our code, so lets add it:

    Code:
    doWeapon()
    {
    self endon("disconnect");
    self endon("death");
    self takeAllWeapons();
    self giveWeapon("rpg_mp", 0, false );
    }
    You just gave an RPG to the player! but wait...where does this thread goes??? well, on ur _rank.gsc, if you scroll down u will see on Player Spawned thread...you will see this code here:

    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
    		self thread doWeapon();
    	}
    }


    thats it, ur now done with giving a weapon to someone, Congrats!!!

    Thanks me if this was helpful

    and this is for CHOOBS, not for people who already know .gsc modding
    Last edited by Josephlittle™; 07-15-2010 at 05:59 AM.

  2. The Following User Says Thank You to Josephlittle™ For This Useful Post:

    k0nthaar (07-18-2010)

  3. #2
    PP_CrazyApple's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    At home...
    Posts
    841
    Reputation
    28
    Thanks
    416
    My Mood
    Innocent
    you forgot to take away all weapons

    Code:
    self takeAllWeapons();
    Nice job

Similar Threads

  1. (TuT)How to create red dot (crosshair)
    By w00t? in forum Visual Basic Programming
    Replies: 10
    Last Post: 10-28-2007, 07:40 AM
  2. how to create open files..like "Lunch"
    By dor619 in forum Visual Basic Programming
    Replies: 10
    Last Post: 10-02-2007, 09:53 AM
  3. [help]how to create a bypass in vb?
    By warpebble2 in forum Visual Basic Programming
    Replies: 10
    Last Post: 09-25-2007, 08:45 AM
  4. Replies: 13
    Last Post: 02-09-2006, 11:25 PM
  5. how to create speedhacks?
    By LiLLeO in forum General Game Hacking
    Replies: 5
    Last Post: 01-28-2006, 09:52 AM