Jump to content

Infection for TDMA


Recommended Posts

Posted

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

Posted

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 ) 

Posted
Basically when you go to the team zombies, do not have the skins and weapons that I set for the zombies but they have the skins and weapons of the human

Can you help me???

Thanx!

Use:

setElementModel 
giveWeapon 

Posted

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?

Posted (edited)
-- 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
Posted
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 

Posted

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 ) 

Posted
don't work, it happens that when you spawn with the skin 280 and when you die with the normal skin of humans.

setElementModel ( source, 280 )

Change the "280" to the skin id of the zombies.

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