The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
CStack
Posted by: Duno | January 5, 2011 @ 8:10pm
Other Code
[
Download
]
AddCSLuaFile( "shared.lua" ) AddCSLuaFile( "cl_init.lua" ) include( "shared.lua" ) --include( "teams/runners.lua" ) --include( "teams/gunners.lua" ) --include( "playermodel.lua" ) game.ConsoleCommand("cl_phys_timescale 0.2 \n") --slomo death effect function Assign( ply ) -- the probablity of being a gunner is 1/3 varRand = math.random( 1, 3 ) ply:UnSpectate() if varRand == 1 then run_team1( ply ) elseif varRand == 2 then run_team1( ply ) else run_team2( ply ) end Msg( "You, " .. ply:Nick() .. ", joined team " .. ply:Team() .. " \n") end function GM:PlayerSpawn( ply ) ply:SetMaxHealth( 100, true ) Assign( ply ) ply:SetWalkSpeed( 325 ) ply:SetRunSpeed( 325 ) end function run_team1( ply ) ply:SetTeam( 1 ) ply:Spawn() ply:PrintMessage( HUD_PRINTTALK, "Welcome to 'RUN!', " .. ply:Nick() .. ". You are on team runner.") end function run_team2( ply ) ply:UnSpectate() ply:SetTeam( 2 ) ply:Spawn() ply:PrintMessage( HUD_PRINTTALK, "Welcome to 'RUN!', " .. ply:Nick() .. ". You are on team gunner.") end function run_spectator( ply ) ply:Spectate( OBS_MODE_ROAMING ) ply:SetTeam( 3 ) ply:PrintMessage( HUD_PRINTTALK, "You are a spectater, " .. ply:Nick() .. ".") end function GM:DoPlayerDeath( victim, killer, dmginfo ) victim:CreateRagdoll() victim:AddDeaths( 1 ) run_spectator( victim ) if killer:IsValid() && killer:IsPlayer() then victim:PrintMessage( HUD_PRINTTALK, "You are DEAD, and you killed yourself, " .. victim:Nick() .. "! \n") killer:AddFrags( -1 ) else victim:PrintMessage( HUD_PRINTTALK, "You are DEAD, " .. victim:Nick() .. "! " .. killer:GetNick() .. " recieved +1 bullets \n") killer:GiveAmmo( 1, "smg1" ) killer:AddFrags( 1 ) end end function GM:PlayerNoClip( ply ) local oldstate = ply:GetMoveType() if oldstate != MOVETYPE_NOCLIP then return false end return true end function GM:PlayerDeath( ply ) local respawnloop = os.time end function GM:PlayerDeathThink( ply ) if ( respawnloop > respawnloop - 5 ) then ply:spawn() end end function WhatTeam( ply ) local teaminfo = ply:Team() local teaminfoname = team.GetName( teaminfo ) ply:PrintMessage(HUD_PRINTTALK, "Your are on team '" .. teaminfoname ) end function GM:PlayerLoadout( ply ) --what the player gets if ply:Team() == 2 then ply:Give( "weapon_pistol" ) ply:SetAmmo( 3, "Pistol" ) end end --group01 util.PrecacheModel( "models/player/Group01/Male_01.mdl" ) util.PrecacheModel( "models/player/Group01/male_02.mdl" ) util.PrecacheModel( "models/player/Group01/male_03.mdl" ) util.PrecacheModel( "models/player/Group01/Male_04.mdl" ) util.PrecacheModel( "models/player/Group01/Male_05.mdl" ) util.PrecacheModel( "models/player/Group01/male_06.mdl" ) util.PrecacheModel( "models/player/Group01/male_07.mdl" ) util.PrecacheModel( "models/player/Group01/male_08.mdl" ) util.PrecacheModel( "models/player/Group01/male_09.mdl" ) --group03 util.PrecacheModel( "models/player/Group03/Male_01.mdl" ) util.PrecacheModel( "models/player/Group03/male_02.mdl" ) util.PrecacheModel( "models/player/Group03/male_03.mdl" ) util.PrecacheModel( "models/player/Group03/male_04.mdl" ) util.PrecacheModel( "models/player/Group03/male_05.mdl" ) util.PrecacheModel( "models/player/Group03/male_06.mdl" ) util.PrecacheModel( "models/player/Group03/male_07.mdl" ) util.PrecacheModel( "models/player/Group03/male_08.mdl" ) util.PrecacheModel( "models/player/Group03/male_09.mdl" ) --gunners util.PrecacheModel( "models/player/Combine_Super_soldier.mdl" ) Plymodels={} Plymodels[1]= "models/player/Group01/Male_01.mdl" Plymodels[2]= "models/player/Group01/male_02.mdl" Plymodels[3]= "models/player/Group01/male_03.mdl" Plymodels[4]= "models/player/Group01/Male_04.mdl" Plymodels[5]= "models/player/Group01/Male_05.mdl" Plymodels[6]= "models/player/Group01/male_06.mdl" Plymodels[7]= "models/player/Group01/male_07.mdl" Plymodels[8]= "models/player/Group01/male_08.mdl" Plymodels[9]= "models/player/Group03/male_09.mdl" Plymodels[10]= "models/player/Group03/Male_01.mdl" Plymodels[11]= "models/player/Group03/male_02.mdl" Plymodels[12]= "models/player/Group03/male_03.mdl" Plymodels[13]= "models/player/Group03/male_04.mdl" Plymodels[14]= "models/player/Group03/male_05.mdl" Plymodels[15]= "models/player/Group03/male_06.mdl" Plymodels[16]= "models/player/Group03/male_07.mdl" Plymodels[17]= "models/player/Group03/male_08.mdl" Plymodels[18]= "models/player/Group03/male_09.mdl" function GM:PlayerSetModel( ply ) if ply:Team() == 1 then ply:SetModel( table.Random( Plymodels ) ) -- elseif ply:SteamID() == "STEAM_0:0:19655882" -- ply:SetModel( "models/player/Group01/Male_01.mdl" ) else ply:SetModel( "models/player/Combine_Super_soldier.mdl" ) --DO NOT CHANGE end end concommand.Add( "run_team1", run_team1 ) concommand.Add( "run_team2", run_team2 ) concommand.Add( "run_spectate", run_spectator ) concommand.Add( "run_whatteam", WhatTeam ) concommand.Add( "roundtype", DRoundType )
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.48 / 8
66 Votes
http://codebin.yi.org/1040
page generated in 0.01 seconds