Stil Cant Fix The Rifle Mod :s

Discussion in 'Scripting' started by slimbips, Jul 11, 2012.

  1. slimbips Corporal

    Contributions:
    4
    Processing:
    Graphics:
    I getting sick of trying, please help me out of me miserie!!! :p

    I want to replace the m1 garand for the kar98..serverside, i spend days and nights
    and when i finaly thought i had it......i get also an kar98 when i choose sniper, help me please..:)
  2. slimbips Corporal

    Contributions:
    4
    Processing:
    Graphics:
    main:

    if(self.haskar == 1)
    end
    self.haskar = 1

    local.team = self.dmteam

    self take models/weapons/m1_garand.tik
    self give models/weapons/kar98.tik


    while(1)
    {

    if(self==NULL || self == NIL)
    {
    end
    }

    if(self.health == 0)
    {
    self.haskar = 0
    end
    }

    if(self.dmteam == spectator)
    {
    self.haskar = 0
    end
    }

    if(self.dmteam != local.team)
    {
    self.haskar = 0
    end
    }

    wait .2

    }

    end
  3. slimbips Corporal

    Contributions:
    4
    Processing:
    Graphics:
    i replaced the m1_garand to the kar98, but when i spawn i have to get the rifle from my pochket first....someone knows the key so i spawn with the weapon in my hand?
  4. zlatko Staff Sergeant

    Contributions:
    147
    Specialties:
    Mapper, Scripting, Pure Gamer
    Processing:
    Graphics:
    PREMIUM
    I Donated
    weapontrade.scr
    --------------------------
    waitframe
    local.n = randomint 99999
    self weaponcommand dual targetname ("w" + local.n)
    local.weap = $("w" + local.n).model

    if(self.dmteam == "allies")
    {
    switch(local.weap)
    {
    case " models/weapons/m1_garand.tik" : self take " models/weapons/m1_garand.tik"
    waitframe
    self give "models/weapons/kar98.tik"
    break
    }
    }
    self useweaponclass rifle
    end
    LeBabouin likes this.
  5. loeri loeri.tk

    Contributions:
    45
    Specialties:
    Mapper, Scripting, Programming, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    you should add self use "models/weapons/kar98.tik"
    under self give "models/weapons/kar98.tik"
    LeBabouin likes this.
  6. slimbips Corporal

    Contributions:
    4
    Processing:
    Graphics:
    @ loeri, if i use self use "models/weapons/kar98.tik"
    than i get every gun i take a kar98....

    and @ zlatko if i try that nothing happens....maybe im way to noobish and do i everything wrong
    but it seems in my eye an impossible mod, id never seen it btw lol
    u think its possible?
  7. slimbips Corporal

    Contributions:
    4
    Processing:
    Graphics:
    btw i dont want it rifle only, i just want get rid of m1 garand and replace it with kar98
  8. Herr Klugscheisser Drinking and Tanking. Perfect together.

    Contributions:
    331
    Specialties:
    Scripting, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    zlatko likes this.
  9. Nami Sergeant

    Contributions:
    63
    Specialties:
    Modeler, Scripting, Textures
    Graphics:
  10. Nami Sergeant

    Contributions:
    63
    Specialties:
    Modeler, Scripting, Textures
    Graphics:
    this is the part were Herr Klugscheisser was talking about.

    ////////////////////////////////////////////////////////////////////////

    // replace undesired weapon
    local.oldweapon = "models/weapons/m1_garand.tik" //the weapon you don't want
    local.newweapon = "models/weapons/delisle.tik" //replace it with this ///////////////////<------------------- replace it with the kar98.tik

    waitframe
    local.n = randomint 99999
    self weaponcommand dual targetname ("w" + local.n)
    local.weap = $("w" + local.n).model

    if(local.weap == local.oldweapon)
    {
    self take local.oldweapon
    wait .1 // works!
    self give local.newweapon
    waitframe

    // self useweaponclass grenade
    // self useweaponclass pistol
    self useweaponclass rifle
    // self useweaponclass smg
    // self useweaponclass mg
    // self useweaponclass heavy
    }
    end

    //////////////////////////////////////////////
    awsome invention this search button thingy
    Trinity and Spyke like this.
  11. guest Lance Corporal

    Contributions:
    2
    Specialties:
    Scripting
    Processing:
    Graphics:
    thats only works on bt i think try this one
  12. guest Lance Corporal

    Contributions:
    2
    Specialties:
    Scripting
    Processing:
    Graphics:
    self takeall
    waitframe
    self give "models/weapons/enfield.tik"
    waitframe
    self useweaponclass "rifle"
    end
  13. guest Lance Corporal

    Contributions:
    2
    Specialties:
    Scripting
    Processing:
    Graphics:
    you can edit like


    self takeall //// remove all and wont take handgun or nades
    waitframe
    self give "models/weapons/enfield.tik"
    waitframe
    self useweaponclass "rifle"
    end
  14. guest Lance Corporal

    Contributions:
    2
    Specialties:
    Scripting
    Processing:
    Graphics:
    hit me up if you need any more help :p
  15. guest Lance Corporal

    Contributions:
    2
    Specialties:
    Scripting
    Processing:
    Graphics:
    upload your mod and i will fix it for ya
  16. Trinity Sergeant

    Contributions:
    103
    Specialties:
    Scripting, Support
    Processing:
    Graphics:
    The method written by Lamron and posted by Nami is the best method.

    You have to execute that from the Raise_Weapon state or Raise_Rifle state in mike_torso
    zlatko and Nami like this.
  17. guest Lance Corporal

    Contributions:
    2
    Specialties:
    Scripting
    Processing:
    Graphics:
    state RAISE_SMG
    {
    movetype legs
    entrycommands
    {
    exec models/weapons/switchsmg.scr <=== *example*
    }
  18. Trinity Sergeant

    Contributions:
    103
    Specialties:
    Scripting, Support
    Processing:
    Graphics:
    If thats the path to where you put the script, then thats correct.
  19. slimbips Corporal

    Contributions:
    4
    Processing:
    Graphics:
    Tks Guys i finaly got rid of the m1_garand :), i didnt myself my but my friend -Gazi- Pacrac fixed it for me:)
    He putt it in the mefy ft mod, so if someone wants to see it or use it, post it here and i upload the file, tks all for the great replys!!

Share This Page