Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.15 KB | None | 0 0
  1. -- init.lua
  2.  
  3. AddCSLuaFile( "cl_init.lua" )
  4. AddCSLuaFile( "shared.lua" )
  5.  
  6. include( 'shared.lua' )
  7.  
  8.  
  9. -- Serverside only stuff goes here
  10.  
  11. function GM:PlayerInitialSpawn( pl ) -- This is when the player spawns the first time, you can do this to take away weapons after death, etc.
  12.  
  13.     pl:GiveAmmo( 255,   "Pistol",       true ) -- This gives the amount of ammo you get and to what weapon respectively, 255 = 255 ammo, pistol = pistol
  14.     pl:Give( "weapon_crowbar" ) -- this gives the player a weapon, specifically crowbar
  15.     pl:SetGravity( 1 ) -- This integer is a multiplyer, the default gravity is 60, so if you want to decrease it, use a decimal, for example 50% would be ( 0.5 ) and 200% would be ( 2 )
  16.     pl:SetWalkSpeed( "300" ) -- You will use a string here to define how many units per second you walk, 250 is the default so using 300 will show a difference.
  17.     pl:SetRunSpeed( "600" ) -- I don't remember the default run speed, but this is an exaggerated amount.
  18. end
  19.  
  20. function GM:PlayerSpawn( pl ) -- pl is a variable, when you are writing your code, if you are writing a function, you will want to include the variable in your code.
  21.     pl:Give( "weapon_ar2" )
  22.    
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement