Jump to content

Infection for TDMA


Recommended Posts

Hello to all

I'm here to ask you how can I do that in TDMA (Team deathmach Team) where there is a team that if someone dies passes to the other team.

For example, I put in TDMA that there are two teams: one Humans and Zombies another, and I would like Humans in the team if there is a person who dies or is killed team takes Zombies.

Is there a way to do it?

Thanks for the replies!

Sorry for my bad inglish

Link to comment

Sinse its simple script, ill make it for you (dont get used to this)

addEventHandler ( "onPlayerWasted", root, function ( ) 
    local humans = getTeamFromName ( "Humans" ) 
    if ( getTeamName ( getPlayerTeam ( source ) ) == "Humans" ) then 
        setPlayerTeam ( source, getTeamFromName ( "Zombies" ) ) 
    else return end 
end ) 

Link to comment
-- Not tested 
addEventHandler ( "onPlayerSpawn", root, function ( ) 
    if ( getTeamName ( getPlayerTeam ( source ) ) == "Zombies" ) then 
        setElementModel ( source, 280 ) 
        outputChatBox ( "You are now a zombie.", source, 255, 0, 0 ) 
    else return end 
end ) 

Edited by Guest
Link to comment
i have created this script for the skin :

addEventHandler ( "onPlayerWasted", root, function ( )

setPedSkin ( source, 280 )

outputChatBox ( "You are now a Zombie.", source, 255, 0, 0 )

end )

but this script is that when you're dead on the ground are of the skin.

as I do that when you're respawn skin that I want?

addEventHandler ( "onPlayerWasted", root, 
    function ( ) 
        setElementModel ( source, 280 ) 
        outputChatBox ( "You are now a Zombie.", source, 255, 0, 0 ) 
    end 
) 

^^ Fixed up a bit, and your problem must be that the ped changes it's skin then respawns with another skin or such, just set a timer or change the event handler to "onPlayerSpawn".

setTimer 

or

onPlayerSpawn 

Link to comment

I think it didn't work because I forgot the "s" try this:

-- Not tested 
addEventHandler ( "onPlayerSpawn", root, function ( ) 
    if ( getTeamName ( getPlayerTeam ( source ) ) ~= "Zombies" ) then 
        setElementModel ( source, 280 ) 
        outputChatBox ( "You are now a zombie.", source, 255, 0, 0 ) 
    else return end 
end ) 

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...