|
| 19 Nov 2013 12:31 PM |
kills.Name = "KOs" kills.Value = 0 local deaths = Instance.new("IntValue") deaths.Name = "Wipeouts" deaths.Value = 0 kills.Parent = stats deaths.Parent = stats local cash = Instance.new("IntValue") cash.Name = "Credits" cash.Value = 10 while true do if newPlayer.Character ~= nil then break end wait(5) end table.insert(Adders,cash) stats.Parent = newPlayer end function Add() players = game.Players:GetChildren() for i=1, #players do if (players[i]:findFirstChild("leaderstats")) then if (players[i]:IsInGroup(782871)==true) then -----This group will Recieve Bonus cash players[i].leaderstats.Credits.Value = players[i].leaderstats.Credits.Value + 26 else players[i].leaderstats.Credits.Value = players[i].leaderstats.Credits.Value + 13 end end end end
game.Players.ChildAdded:connect(onPlayerEntered)
while true do wait(70) Add() end local humanoid = newPlayer.Character.Humanoid humanoid.Died:connect(function() onHumanoidDied(humanoid, newPlayer) end ) newPlayer.Changed:connect(function(property) onPlayerRespawn(property, newPlayer) end ) stats.Parent = newPlayer function Send_DB_Event_Died(victim, killer) local killername = "no one" if killer ~= nil then killername = killer.Name end if shared["deaths"] ~= nil then shared["deaths"](victim, killer) end end function Send_DB_Event_Kill(killer, victim) if shared["kills"] ~= nil then shared["kills"](killer, victim) end end function onHumanoidDied(humanoid, player) local stats = player:findFirstChild("leaderstats") if stats ~= nil then local deaths = stats:findFirstChild("Wipeouts") deaths.Value = deaths.Value + 1 local killer = getKillerOfHumanoidIfStillInGame(humanoid) Send_DB_Event_Died(player, killer) handleKillCount(humanoid, player) end end function onPlayerRespawn(property, player) if property == "Character" and player.Character ~= nil then local humanoid = player.Character.Humanoid local p = player local h = humanoid humanoid.Died:connect(function() onHumanoidDied(h, p) end ) end end function getKillerOfHumanoidIfStillInGame(humanoid) local tag = humanoid:findFirstChild("creator") if tag ~= nil then local killer = tag.Value if killer.Parent ~= nil then return killer end end return nil end function handleKillCount(humanoid, player) local killer = getKillerOfHumanoidIfStillInGame(humanoid) if killer ~= nil then local stats = killer:findFirstChild("leaderstats") if stats ~= nil then local kills = stats:findFirstChild("KOs") if killer ~= player then kills.Value = kills.Value + 1 else kills.Value = kills.Value - 1 end Send_DB_Event_Kill(killer, player) end end end game.Players.ChildAdded:connect(onPlayerEntered)
Mind showing me what I did wrong and help me fix it >_< |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2013 12:34 PM |
| Can you specify the problem? |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2013 12:35 PM |
| Well that is the problem I don't what's wrong with it lol.Leaderboard won't show up,nothing besides my team names show up and I have the rank script for the rank part of the leaderboard to detect ranks. |
|
|
| Report Abuse |
|
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
| |
|
| |
|
|
| 19 Nov 2013 12:38 PM |
| People could see the problem clearly and see if other things are set alright if they had the game. |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2013 12:41 PM |
| Oded you just want my script. bruen I forgot how to use output >_<, Studio then test mode? |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2013 12:45 PM |
DeathByChina, I don't. I can't even fix it, I'm just saying. |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2013 12:46 PM |
| MainBar > View > Output Window |
|
|
| Report Abuse |
|
|
| |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Nov 2013 06:47 PM |
Test in Start Server->Start Player and in the server window, click view->output And post any "red" you see |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2013 06:52 PM |
| Tried got nothing. All was good, I think I don't have everything in right spot. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Nov 2013 06:54 PM |
So the problem is only certain players show up on the leaderboard? Do the values work themselves? (Make sure you aren't testing in Play Solo) |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2013 06:55 PM |
| Oh I think I tested in play solo. |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2013 07:09 PM |
| There is no errors for the script. |
|
|
| Report Abuse |
|
|
| |
|