hi Leute wie der titel schon sagt..
wie kann man adminwaffen per steamid auth auswählen?..
mfg
Druckbare Version
hi Leute wie der titel schon sagt..
wie kann man adminwaffen per steamid auth auswählen?..
mfg
auswählen wie die Kick&Ban gun oder selbst eine machen?...
ich hab noch keien kickban gun gehabt und ja ich meine die selber gemachten
aber vorher muss der code noch rein
ich denke des sollte der code seinCode:_OpenScript( "mods/Terror-Squad/settings/entities/lua/admins.lua" )
Code:- Called every frame
function onThink( )
if (_PlayerInfo(Owner, "networkid") ~= admin) then
_PlayerKill(Owner); end
end
erm und was soll man damit machen? ^^
bitte etwas mehr darüber sagen zb wohin wo soll die steamid rein ect ^^
edit mach doch einer mal ne mod wo man admins eingragen kann und in nem kleinen etra ordner einfach alle waffen reinpacken kann und die immer gleich automatisch bekommt
nagut also ich fang dann mal an : Wenn du eine Selbst erstellte Waffe hast sieht der code in etwa so aus (ausschnitt aus der LUA Standart Waffe):dann oben bei der zeile woCode:MyIndex = 0; -- Weapon's entity index.
Owner = 0; -- The player that owns this weapon
CurrentTime = 0; -- The current game time
-- This is called when the weapon is given to player
function onInit( )
_SWEPSetSound( MyIndex, "single_shot", "Weapon_M249.Single" )
end
-- This is called every frame
function onThink( )
end
-- This is called when the player presses his primary fire button. This does nothing in this
-- implementation, as gmod takes care of simple fire routines. You'll only need to implement
-- this if you wish to do something more exciting (i.e. fire a rocket, launch a grenade...)
function onPrimaryAttack( )
end
-- Same as above
function onSecondaryAttack( )
end
-- Return true if you want it to reload successfully
function onReload( )
return true;
end
-- Set this to true if you want the gun on the right side of your view.
-- False if you want it on the left.
function getWeaponSwapHands()
return true;
end
-- Sets the player's Field of View while using this weapon.
function getWeaponFOV()
return 100;
end
-- Slot number for the new weapon
-- 0 = crowbar/grav gun
-- 1 = pistol/357
-- 2 = smg/pulse rifle
-- 3 = shotgun/crossbow
-- 4 = genade/rpg
-- 5 = bugbait
function getWeaponSlot()
return 1;
end
-- Position of weapon in the slot. If it is in the same slot position of another gun it will
-- not show up.
function getWeaponSlotPos()
return 3;
end
-- Just guess what this does.
function getFiresUnderwater()
return false;
end
-- Reload after every shot? (like the crossbow)
function getReloadsSingly()
return false;
end
-- how much damage the bullet does
function getDamage()
return 5;
end
-- Delay between shots (in seconds)
function getPrimaryShotDelay()
return 0.5;
end
-- Delay between shots for secondary fire (in seconds)
function getSecondaryShotDelay()
return 0.3;
end
-- Automatic weapon
function getPrimaryIsAutomatic()
return true;
end
-- Automatic weapon for secondary fire
function getSecondaryIsAutomatic()
return true;
end
-- Ammo type for primary fire
function getPrimaryAmmoType()
return "pistol";
end
-- Ammo type for secondary fire
function getSecondaryAmmoType()
return "pistol";
end
-- Max Clip size. -1 if no clip
function getMaxClipPrimary()
return 250;
end
-- Max Clip size for secondary fire. -1 if no clip
function getMaxClipSecondary()
return 250;
end
-- Primary Ammo given to player when given the gun
function getDefClipPrimary()
return 200;
end
-- Secondary Ammo given to player when given the gun
function getDefClipSecondary()
return 200;
end
-- 0 = Don't override, shoot bullets, make sound and flash
-- 1 = Don't shoot bullets but do make flash/sounds
-- 2 = Only play animations
-- 3 = Don't do anything
function getPrimaryScriptOverride()
return 0;
end
-- see above
function getSecondaryScriptOverride()
return 0;
end
-- Higher the # the bigger the spread
function getBulletSpread()
return vector3( 0.01, 0.01, 0.01 );
end
-- amount of view kick
function getViewKick()
return vector3( 0, 0.0, 0.0);
end
-- same as above only random values (set to 0.0 , 0.0, 0.0 for no random kick)
function getViewKickRandom()
return vector3( 2.0, 1.0, 1.0 );
end
-- Defines the first person model
function getViewModel( )
return "models/weapons/v_pist_p228.mdl";
end
-- Defines what it looks like from 3rd person view
function getWorldModel( )
return "models/weapons/w_pist_p228.mdl";
end
-- Classname of wep. So you can use "give" for this
function getClassName()
return "weapon_lua_pistol";
end
-- getAnimPrefix - the animation prefix. one of the following:
-- pistol, smg, ar2, shotgun, rpg, phys, crossbow, melee, slam, grenade
function getAnimPrefix()
return "pistol";
end
-- Text you see when choosing the weapon
function getPrintName()
return "LUA Pistol";
end
steht mussCode:MyIndex = 0; -- Weapon's entity index.
Owner = 0; -- The player that owns this weapon
CurrentTime = 0; -- The current game time
rein ( Das ist jetzt von meiner mod also du kannst den pfad verändern)Code:_OpenScript( "mods/Terror-Squad/settings/entities/lua/admins.lua" )
jetzt felht uns der code wenn jemand anderes die Waffe aufhebt das er dann getötet wird also kommt beimuss nur noch das hier reinCode:-- This is called every frame
function onThink( )
so jetzt machst du noch ein ne .lua datei die benenst du in admins.lua umCode:function onInit( )
_SWEPSetSound( MyIndex, "single_shot", "Weapon_G3SG1.Single" )
end
und da muss dies hier stehen
so ich hoffe es ist etwas verständlich gewordenCode:admin = "DEINESTEAMUSERID"
kannst du das net einfach alles fertig machen und als mod zum download releasen ? :D
jop kann ich auch ^^ xD hät ich mir nit die arbeit machen müssen xD
Edit: mach ich morgen Freitag den 17.11.05 nicht mehr heut is zu Spät!