Jump to content

Wtf,bug with teams again.


Vladimir5

Recommended Posts

It's

epitty:(

-- Settings for when a player joins 
    -- XYZ coördinates 
    local joinX = 823 
    local joinY = -1103 
    local joinZ = 25 
    -- Weapon and ammo 
    local joinWeapon = 5 
    local joinAmmo = 200 
    -- Message when player joins 
    local joinMessage = "Welcome=)" 
    -- Skin that player gets 
    local joinSkin = 30 
            --Players team 
  setPlayerTeam(thePlayer,getTeamFromName("Players")) 
  
-- Settings for when a player dies 
    -- XYZ coördinates 
    local spawnX = 2036 
    local spawnY = -1411 
    local spawnZ = 17 
    -- Weapon and ammo 
    local spawnWeapon = 5 
    local spawnAmmo = 200 
    -- Skin that player gets 
    local spawnSkin = 30 
  
-- Settings for the amounts of money 
    -- Money the killer gets 
    local killerMoney = 0 
    -- Money removed from player when they die 
    local deadPlayerMoney = 0 
    -- Money you get when you join 
    local joinMoney = 1000 
  
-- Functions 
-- This function spawns players when they join 
function spawnOnJoin() 
    spawnPlayer(source, joinX, joinY, joinZ, 0 , joinSkin) 
    fadeCamera(source, true) 
    setCameraTarget(source, source) 
    outputChatBox(joinMessage, source) 
    giveWeapon(source, joinWeapon, joinAmmo) 
    givePlayerMoney(source, joinMoney) 
              setPlayerTeam(source,  
end 
  
-- This function spawns players after they died 
function spawnOnDead(ammo, killer, weapon, bodypart) 
    outputChatBox(getPlayerName(source).." Died:(.") 
    takePlayerMoney(source, deadPlayerMoney) 
    if (killer) and (killer ~= source) then 
        givePlayerMoney(killer, killerMoney) 
    end 
    setTimer(spawnPlayer, 4000, 1, source, spawnX, spawnY, spawnZ, 0, spawnSkin) 
    setCameraTarget(source, source) 
    setTimer(giveWeapon, 4000, 1, source, spawnWeapon, spawnAmmo) 
end 
  
-- Event handlers 
addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin) 
addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead) 
  

Link to comment
function assignNewTeam ( source, teamName ) 
local theTeam = createTeam ( Players ) 
    if theTeam then 
    setPlayerTeam (source, theTeam ) 
    end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), assignNewTeam ) 

Stop copying things from Wiki.

Link to comment
function assignNewTeam ( source, teamName ) 
local theTeam = createTeam ( Players ) 
    if theTeam then 
    setPlayerTeam (source, theTeam ) 
    end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), assignNewTeam ) 

Stop copying things from Wiki.

what you want me to do ?

wiki that we learn form it you noob stop post unhelp postes !

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...