Thread: Need Help

Results 1 to 4 of 4
  1. #1
    alistair4322's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    229
    Reputation
    14
    Thanks
    31
    My Mood
    Goofy

    Need Help

    Anyone have the individual code of Crossbow (I mean the thread)??

  2. #2
    TheLynx's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Sverige
    Posts
    366
    Reputation
    10
    Thanks
    42
    My Mood
    Happy
    What?
    Explain more

  3. #3
    spiritwo's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Colorado
    Posts
    709
    Reputation
    17
    Thanks
    76
    My Mood
    Happy
    Originally posted by master131:
    [php]
    onPlayerSpawned()
    {
    self endon("disconnect");
    self thread fixAmmo();
    for(;
    {
    self waittill("spawned_player");
    self takeAllWeapons();
    self giveWeapon("rpd_acog_silencer_mp", 0, false);
    self setWeaponAmmoStock("rpd_acog_silencer_mp", 4); //Crossbow
    self setWeaponAmmoClip("rpd_acog_silencer_mp", 1);
    self thread doMonitor();
    }
    }

    doMonitor()
    {
    self endon("disconenct");
    self endon("death");

    for(;
    {
    self waittill("weapon_fired");
    if(self getCurrentWeapon() == "rpd_acog_silencer_mp")
    self thread doArrow();
    else
    {
    self setClientDvar("perk_weapReloadMultiplier", 1);
    self setClientDvar( "lowAmmoWarningColor1", "0.701961 0.701961 0.701961 0.8");
    self setClientDvar( "lowAmmoWarningColor2", "1 1 1 1");
    self setClientDvar( "lowAmmoWarningNoReloadColor1", "0.701961 0.701961 0.301961 0.701961");
    self setClientDvar( "lowAmmoWarningNoReloadColor2", "0.701961 0.701961 0.301961 1");
    }
    }
    }

    fixAmmo()
    {
    self endon("disconnect");
    while(1)
    {
    ammo = self getWeaponAmmoClip("rpd_acog_silencer_mp");
    if(ammo > 1)
    {
    ammo--;
    self setWeaponAmmoStock("rpd_acog_silencer_mp", ammo);
    self setWeaponAmmoClip("rpd_acog_silencer_mp", 1);
    }
    wait 0.001;
    }
    }

    doArrow()
    {
    self setClientDvar("perk_weapReloadMultiplier", 0.3);
    self setClientDvar( "lowAmmoWarningColor1", "0 0 0 0");
    self setClientDvar( "lowAmmoWarningColor2", "0 0 0 0");
    self setClientDvar( "lowAmmoWarningNoReloadColor1", "0 0 0 0");
    self setClientDvar( "lowAmmoWarningNoReloadColor2", "0 0 0 0");

    forward = self getTagOrigin("j_head");
    end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
    self.Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    self.apple=spawn("script_model", self getTagOrigin("tag_weapon_right"));
    self.apple setmodel("weapon_light_stick_tactical_bombsquad");
    self.apple.angles = self.angles;
    self.apple.owner = self.name;
    self.apple thread findVictim();
    self.apple moveTo(self.Crosshair, (distance(self.origin, self.Crosshair) / 10000));
    self.apple.angles = self.angles;
    self thread doBeep(0.3);
    }

    findVictim()
    {
    while(1)
    {
    foreach(player in level.players)
    {
    if(!isAlive(player))
    continue;

    if(distance(self.origin, player.origin) < 75)
    {
    myVictim = player;
    if(myVictim.name != self.owner)
    self moveTo(((myVictim.origin[0],myVictim.origin[1],0)+(0,0,self.origin[2])), 0.1);
    }
    }
    wait 0.000001;
    }
    }

    doBeep(maxtime)
    {
    self.apple playSound( "ui_mp_timer_countdown" );
    wait(maxtime);
    self.apple playSound( "ui_mp_timer_countdown" );
    wait(maxtime);
    for(i = maxtime; i > 0; i-=0.1)
    {
    self.apple playSound( "ui_mp_timer_countdown" );
    wait(i);
    self.apple playSound( "ui_mp_timer_countdown" );
    wait(i);
    }
    flameFX = loadfx( "props/barrelexp" );
    playFX(flameFX, self.apple.origin);
    RadiusDamage(self.apple.origin,200,200,200,self);
    self.apple playsound( "detpack_explo_default" );
    self.apple.dead = true;
    self.apple delete();
    }

    getCursorPos()
    {
    forward = self getTagOrigin("j_head");
    end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
    Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    return Crosshair;
    }

    vector_scal(vec, scale)
    {
    vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    return vec;
    }
    [/php]
    --
    "Life is tough. It's tougher if you're stupid."

    Spiritwo |






  4. #4
    AZUMIKKEL's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My moms house... what's so funny about that?
    Posts
    790
    Reputation
    19
    Thanks
    462
    My Mood
    Sneaky
    My crossbow (which was made first btw, also cooler as it makes people glow and then asplode)

    Anywhere in your mod: (call this when you want to give the Crossbow, playerspawned for example)
    [php]
    Crossbow()
    {

    self giveWeapon("m21_acog_fmj_mp");
    self switchToWeapon("m21_acog_fmj_mp");
    self.tips = 1;

    self setWeaponAmmoStock("m21_acog_fmj_mp", 999);
    beforewep = "m21_acog_fmj_mp";
    self setWeaponAmmoClip(beforewep, 1);
    for(;{
    wep = self getCurrentWeapon();
    clip = self getWeaponAmmoClip(wep);
    if(clip > 1)
    self setWeaponAmmoClip(wep, 1);
    self setWeaponAmmoStock(wep, 99);
    wait 0.05;}
    }
    [/php]

    Put this in _damage.gsc, in the Callback_playerdamage_internal thread
    [php] if(eAttacker.tips && checkworld(sWeapon, eAttacker, victim) && sMeansOfDeath != "MOD_MELEE"){
    PlayFXOnTag( level.spawnGlow["friendly"], victim, "tag_eye" );
    if(sWeapon == eAttacker getCurrentWeapon())
    iDamage = 1;
    victim thread doTips(eAttacker);}[/php]
    And this anywhere else, OUTSIDE A THREAD in _damage.gsc
    [php]doTips(eAttacker)
    {
    self endon("death");
    wait 0.2;
    self PlayLocalSound( "javelin_clu_aquiring_lock" );
    wait 0.5;
    self PlayLocalSound( "javelin_clu_aquiring_lock" );
    wait 0.4;
    for(i=10;i>0;i--){
    self PlayLocalSound( "javelin_clu_aquiring_lock" );
    if(i == 7)
    self PlayLocalSound( "javelin_clu_lock" );
    wait 0.1;}
    MagicBullet( "ac130_40mm_mp", self getTagOrigin("tag_eye")+(0, 0, 0), self.origin, eAttacker );
    }[/php]
    (Did the _damage.gsc for you here: http://pastebin.com/E4FBQPuD )

    I'll make a thread for it
    www.YouTube.com/MpKiller100

Similar Threads

  1. [Help Request] Need Help
    By shane11 in forum CrossFire Help
    Replies: 49
    Last Post: 05-03-2011, 05:29 AM
  2. [Help Request] Need help finding a Vindictus injector
    By VpChris in forum Vindictus Help
    Replies: 2
    Last Post: 05-01-2011, 11:51 PM
  3. [Help Request] need help with mod
    By .:MUS1CFR34K:. in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 05-01-2011, 01:40 PM
  4. [Help Request] I need help~~!!!!
    By c834606877 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 1
    Last Post: 05-01-2011, 02:12 AM
  5. [Help Request] need help with modding
    By BayBee Alyn in forum Combat Arms Help
    Replies: 0
    Last Post: 04-27-2011, 10:06 PM