Main Search
Delta Corp Forum Index
 
 
FAQ Members Groups Profile Private Messages

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact [email protected].
Teams getting different weapons.

 
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Akhenderson
Robloxian Shyguy


Joined: 30 Mar 2008
Posts: 209
Location: Corneria

PostPosted: Mon Jun 30, 2008 3:46 pm    Post subject: Teams getting different weapons. Reply with quote

I need a script that when someone spawns they get weapons
depending on what team they are on. I need it for my future places
where Elementals (Players) fight one another using different weapons.
I mean does a Fire player with the power of Nature make sence?
_________________
My INT score was lowered just by
being near those noobs who build
pointless places that instantly get
popular.
Back to top
View user's profile Send private message Visit poster's website
ultrameep
Newbie


Joined: 01 Jul 2008
Posts: 4

PostPosted: Wed Jul 02, 2008 5:37 am    Post subject: Reply with quote

Smile


--[[how to use
1) make a team in Teams
2) put all the tools you want in the team object
ex.

[+] Workspace
[+] Players
[+] Lighting
[-] Teams
----|[-] Team1
--------|- tool1
--------|- tool2
----|[-] Team2
--------|- tool3
--------|- tool4
[-] StarterPack
----|- Reset


that will give tool1 and tool2 to people on Team1, and tool3 and tool4 to people on Team2
note: you can put stuff in the StarterPack if you want everyone to get it still (ex. reset tool)
--]]

function getTeam(player)
local c = player.TeamColor
local teams = game.Teams:GetChildren()
for i = 1,#teams do
if teams[i].TeamColor == c then return teams[i] end
end
return nil
end

function giveWeps(player)
local team = getTeam(player)
if team ~= nil then
local weps = team:GetChildren()
for i = 1,#weps do
weps[i]:Clone().Parent = player.Backpack
end
end
end

function new(newPlayer)
newPlayer.Changed:connect(function (prop)
if prop == "Character" and newPlayer.Character ~= nil then
giveWeps(newPlayer)
end
end)
end

game.Players.PlayerAdded:connect(new)
Back to top
View user's profile Send private message
Akhenderson
Robloxian Shyguy


Joined: 30 Mar 2008
Posts: 209
Location: Corneria

PostPosted: Wed Jul 02, 2008 2:12 pm    Post subject: Reply with quote

say thanks! I can finish my elemental Battlefield now.
_________________
My INT score was lowered just by
being near those noobs who build
pointless places that instantly get
popular.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Back to Top              
Jenova Template © digital-delusion.com
Powered by phpBB © 2001, 2002 phpBB Group



For Support - http://forums.BizHat.com

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!