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

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 

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

Posted
does not work!

how can I do?

I do not know Scripting, can you help me?

Learn how to, https://wiki.multitheftauto.com/wiki/Main_Page

I gave you the required functions and a choice, you must continue from there. Good Luck

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

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

You want to take his weapons or spawn with the weapons you want?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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