Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 25/11/12 - Oringinally for Ban-Hammer.net
- -- Some basic TTT scripts for the non lua coders out there.
- -- Jason2010, Ollie, Q4-Bi.
- -- Custom chat bar friendly.
- if SERVER then
- util.AddNetworkString("TTTChatText")
- local white = Color(255,255,255)
- local grey = Color(150,150,150)
- local dgrey = Color(200,200,200)
- -- Donater Weapons
- function weaponStart( ply )
- local primaryWep = {"weapon_ttt_m16","Pistol",20,"an M16","weapon_zm_mac10","smg1",30,"a MAC10","weapon_zm_sledge","AirboatGun",0,"an M249 SAW","weapon_zm_shotgun","Buckshot",16,"a Shotgun","weapon_zm_rifle","357",10,"a Rifle"}
- local secondaryWep = {"weapon_zm_pistol","Pistol",20,"a Pistol","weapon_zm_revolver","AlyxGun",16,"a Desert Eagle","weapon_ttt_glock","Pistol",20,"a Glock"}
- local grenadeWep = {"weapon_tttbasegrenade","an Incendiary Grenade","weapon_ttt_confgrenade","a Discombobulator","weapon_ttt_smokegrenade","a Smoke Grenade"}
- if ply:Team() == 1 then
- if(ply:IsUserGroup("donator") or ply:IsUserGroup("moderator") or ply:IsAdmin() or ply:IsSuperAdmin()) then
- -- Primary Weapon Start
- pDisplay = math.random(1,5)*4
- pAmmo,pType,pName = primaryWep[pDisplay-1],primaryWep[pDisplay-2],primaryWep[pDisplay-3]
- pDisplay = primaryWep[pDisplay]
- ply:Give(pName)
- ply:GiveAmmo(pAmmo,pType)
- -- Secondary Start
- sDisplay = math.random(1,3)*4
- sAmmo,sType,sName = secondaryWep[sDisplay-1],secondaryWep[sDisplay-2],secondaryWep[sDisplay-3]
- sDisplay = secondaryWep[sDisplay]
- ply:Give(sName)
- ply:GiveAmmo(sAmmo,sType)
- -- Grenade Start
- gDisplay = math.random(1,3)*2
- gName = grenadeWep[gDisplay-1]
- gDisplay = grenadeWep[gDisplay]
- ply:Give(gName)
- net.Start("TTTChatText")
- net.WriteTable({grey,"[",white,"DonatorWeps",grey,"]",white,": ",dgrey,"You received ".. pDisplay .. " with " .. sDisplay .. " and " .. gDisplay .. "!"})
- net.Send(ply)
- end
- local knifeFun = true
- end
- end
- hook.Add("PlayerSpawn", "weaponStart", weaponStart )
- -- Donater Weapons Finished
- end
- if CLIENT then
- net.Receive("TTTChatText",function()
- local tbl = net.ReadTable()
- if tbl != nil then
- chat.AddText(unpack(tbl))
- else
- print("Empty table received!")
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement