Seite 3 von 4 ErsteErste 1234 LetzteLetzte
Ergebnis 21 bis 30 von 32

Thema: Easy Sweps

  1. #21

    Standard AW: Easy Sweps

    SWEP.Primary.Sound = Sound( "ordner/soundfile.wav" )
    SWEP.Secondary.Sound = Sound( "ordner/soundfile.wav" )
    SWEP.Primary.ReloadSound = Sound( "odner/soundfile.wav" )
    feheln (Wir wollen ja Waffensounds)
    1.Primärsound
    2.Sekundärsound
    3.Reloadsound
    Geändert von tkone@selfhelp (19.07.2008 um 23:59 Uhr)

  2. #22

    Standard AW: Easy Sweps

    Rein theoretisch hast du recht, aber sie werden in der "SWEPrimaryAttack()" Funktion definiert.
    /* Make sure we can shoot first*/
    if ( !self:CanPrimaryAttack() ) then return end

    /* Play shoot sound*/
    self.Weapon:EmitSound("Weapon_AR2.Single")
    ...
    Ich werde es trotz dem einfügen, da es übersichtlicher ist.
    http://darksideone.pytalhost.de/dso/hp/include/images/banner/userbar/dso-userbar.png

  3. #23

    Standard AW: Easy Sweps

    jo danke

  4. #24

    Standard AW: Easy Sweps

    eine frage ist der code hier richtig?
    ist fürs nachladen das soon sound abgespielt wird
    Code:
    SWEP.Primary.ReloadSound		= Sound( "weapons/handgun/reload.wav" )
    funktioniert bei mir nämlich ned... weiß ned warum :/

  5. #25

    Standard AW: Easy Sweps

    Ich sag nur eins. Anpinnen
    Mein Pc
    System: Windows 7 64Bit
    Intel i5 750 2,6
    Ram: 4.00GB
    Grafikkarte : ATI HD Readon 5850

  6. #26

    Standard AW: Easy Sweps

    Nein...
    Da es sonst noch zu 5-Sec SWEP releases kommt!

  7. #27

    Standard AW: Easy Sweps

    Zitat Zitat von Richi Beitrag anzeigen
    eine frage ist der code hier richtig?
    ist fürs nachladen das soon sound abgespielt wird
    Code:
    SWEP.Primary.ReloadSound		= Sound( "weapons/handgun/reload.wav" )
    funktioniert bei mir nämlich ned... weiß ned warum :/
    laut tkone@selfhelp ist es so richtig, werde es mal schnell testen
    Edit:
    so, du hattest recht.
    Habe den Fehler behoben.
    Tipp: der "Sound" Ordner darf nicht angegeben werden zb.
    "sound/weapon/reload.wav" wird zu "weapon/reload.wav"
    Edit ENDE:
    Zitat Zitat von Schnufel Beitrag anzeigen
    Ich sag nur eins. Anpinnen
    Zitat Zitat von Pac_187 Beitrag anzeigen
    Nein...
    Da es sonst noch zu 5-Sec SWEP releases kommt!
    Ich weiß jetzt net ob ich das positiv oder negativ aufnehmen soll
    Geändert von LaKunâR (05.08.2008 um 22:13 Uhr)
    http://darksideone.pytalhost.de/dso/hp/include/images/banner/userbar/dso-userbar.png

  8. #28

    Standard AW: Easy Sweps

    danke für deine infos aber das komische ist ja:
    das der sound für normale schießen ja genauso ist... also wie folgt:

    Code:
    [...]
    SWEP.Primary.Sound			= Sound( "weapons/handgun/handgun.wav" )
    [...]
    SWEP.Primary.ReloadSound		= Sound( "weapons/handgun/reload.wav" )
    [...]
    also der Primary.Sound befehl funktioniert ja... jetzt versteh ich nicht wieso der reloadsound nicht geht :/

    hier ist mal der gesamte code vill. liegt der fehler ja irgendwo anders...

    Code:
    if ( SERVER ) then
    
    	AddCSLuaFile( "shared.lua" )
    	
    	SWEP.HoldType			= "pistol"
    	
    end
    
    if ( CLIENT ) then
    
    	SWEP.PrintName			= "HAND Gun"			
    	SWEP.Author				= "Denry (Remade by 0mighty_K)"
    	SWEP.ViewModelFOV      = 60
    	SWEP.Slot				= 1
    	SWEP.SlotPos			= 1
    	SWEP.IconLetter			= "b"
    	
    	killicon.AddFont( "weapon_glock", "CSKillIcons", SWEP.IconLetter, Color( 255, 80, 0, 255 ) )
    	
    end
    
    
    SWEP.Base				= "weapon_cs_base"
    SWEP.ViewModelFlip		= false
    
    SWEP.Spawnable			= true
    SWEP.AdminSpawnable		= true
    
    SWEP.ViewModel			= "models/denry/v_pistol.mdl"
    SWEP.WorldModel			= "models/weapons/w_colt.mdl"
    
    SWEP.Weight				= 5
    SWEP.AutoSwitchTo		= true
    SWEP.AutoSwitchFrom		= true
    
    SWEP.Primary.Sound			= Sound( "weapons/handgun/handgun.wav" )
    SWEP.Primary.Recoil			= 1.6
    SWEP.Primary.Damage			= 15
    SWEP.Primary.NumShots		= 1
    SWEP.Primary.Cone			= 0.02
    SWEP.Primary.ClipSize		= 10
    SWEP.Primary.Delay			= 0.5
    SWEP.Primary.DefaultClip	= 301
    SWEP.Primary.Automatic		= false
    SWEP.Primary.Ammo			= "smg1"
    SWEP.Primary.ReloadSound		= Sound( "weapons/handgun/reload.wav" )
    
    SWEP.Secondary.ClipSize		= -1
    SWEP.Secondary.DefaultClip	= -1
    SWEP.Secondary.Automatic	= false
    SWEP.Secondary.Ammo			= "none"
    der ordner sieht wie folgt aus:
    der ordner ist Hand gun
    und unter: sound/weapon/handgun/soundname.wav sind halt die sounds
    die lua datei ist unter: /lua/weapons/weapon_HANDgun/shared.lua

    und eine frage hätte ich noch wie heißt der befehl um den sound zu bestimmen wenn das magazin leer ist also so wie bei ner waffe wenn das magazin alle ist immer soon clicken kommt... diesen sound mein ich

    hoffe ihr könnt mir helfen
    Geändert von Richi (06.08.2008 um 20:05 Uhr)

  9. #29

    Standard AW: Easy Sweps

    Also wichtig ist, damit die sounds abgespielt werden, das in der Reload funktion das steht:
    Code:
    if (self.Weapon:DefaultReload( ACT_VM_RELOAD )) then
    self.Weapon:EmitSound ( self.Primary.ReloadSound )
    end
    und in der attack(p) funktion:
    Code:
    self.Weapon:EmitSound ( self.Primary.Sound )
    und in der attack(s) funktion:
    Code:
    self.Weapon:EmitSound ( self.Secondary.Sound )
    Dann müsste alles gehen, und bei mir geht es auch.

    Aber da du dein swep net mit dem Generator erstellt hast(erkenne ich an der code struktur) gehört das hier net rein
    Geändert von LaKunâR (06.08.2008 um 20:30 Uhr)
    http://darksideone.pytalhost.de/dso/hp/include/images/banner/userbar/dso-userbar.png

  10. #30

    Standard AW: Easy Sweps

    den gesamten code hab ich doch schon oben gepostet

    hier ist mal der gesamte code vill. liegt der fehler ja irgendwo anders...

    Code:

    Code:
    if ( SERVER ) then
    
    	AddCSLuaFile( "shared.lua" )
    	
    	SWEP.HoldType			= "pistol"
    	
    end
    
    if ( CLIENT ) then
    
    	SWEP.PrintName			= "HAND Gun"			
    	SWEP.Author				= "Denry (Remade by 0mighty_K)"
    	SWEP.ViewModelFOV      = 60
    	SWEP.Slot				= 1
    	SWEP.SlotPos			= 1
    	SWEP.IconLetter			= "b"
    	
    	killicon.AddFont( "weapon_glock", "CSKillIcons", SWEP.IconLetter, Color( 255, 80, 0, 255 ) )
    	
    end
    
    
    SWEP.Base				= "weapon_cs_base"
    SWEP.ViewModelFlip		= false
    
    SWEP.Spawnable			= true
    SWEP.AdminSpawnable		= true
    
    SWEP.ViewModel			= "models/denry/v_pistol.mdl"
    SWEP.WorldModel			= "models/weapons/w_colt.mdl"
    
    SWEP.Weight				= 5
    SWEP.AutoSwitchTo		= true
    SWEP.AutoSwitchFrom		= true
    
    SWEP.Primary.Sound			= Sound( "weapons/handgun/handgun.wav" )
    SWEP.Primary.Recoil			= 1.6
    SWEP.Primary.Damage			= 15
    SWEP.Primary.NumShots		= 1
    SWEP.Primary.Cone			= 0.02
    SWEP.Primary.ClipSize		= 10
    SWEP.Primary.Delay			= 0.5
    SWEP.Primary.DefaultClip	= 301
    SWEP.Primary.Automatic		= false
    SWEP.Primary.Ammo			= "smg1"
    SWEP.Primary.ReloadSound		= Sound( "weapons/handgun/reload.wav" )
    
    SWEP.Secondary.ClipSize		= -1
    SWEP.Secondary.DefaultClip	= -1
    SWEP.Secondary.Automatic	= false
    SWEP.Secondary.Ammo			= "none"

    der befehl:
    Code:
    if (self.Weapon:DefaultReload( ACT_VM_RELOAD )) then
    self.Weapon:EmitSound ( self.Primary.ReloadSound )
    end
    ist das jetzt dieses normalerweise clicken wenn das magazin leer ist?

    sry ich kenn mich in lua noch ned wirklich gut aus...
    Geändert von Richi (06.08.2008 um 20:36 Uhr)

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •