☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Share Posted June 28, 2013 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
xXMADEXx Posted June 28, 2013 Share Posted June 28, 2013 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
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 (edited) This code where should I enter? Sorry,I'm not good in Scripting OKOK, works Thanx!! Edited June 28, 2013 by Guest Link to comment
xXMADEXx Posted June 28, 2013 Share Posted June 28, 2013 This code where should I enter?Sorry,I'm not good in Scripting Dosn't matter where it goes, as long as its on the server side. Link to comment
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 Ok, works Thanx how do I do that if you die, you are reborn as another skin and weapons ?? Link to comment
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 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! Link to comment
xXMADEXx Posted June 28, 2013 Share Posted June 28, 2013 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 humanCan you help me??? Thanx! Use: setElementModel giveWeapon Link to comment
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 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? Link to comment
xXMADEXx Posted June 28, 2013 Share Posted June 28, 2013 (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 June 28, 2013 by Guest Link to comment
Ab-47 Posted June 28, 2013 Share Posted June 28, 2013 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
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 does not work! how can I do? I do not know Scripting, can you help me? Link to comment
Ab-47 Posted June 28, 2013 Share Posted June 28, 2013 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 Link to comment
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 sorry, but i am italian, I do not know English well Can you help me for a script?? Link to comment
xXMADEXx Posted June 28, 2013 Share Posted June 28, 2013 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
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 don't work, it happens that when you spawn with the skin 280 and when you die with the normal skin of humans. Link to comment
xXMADEXx Posted June 28, 2013 Share Posted June 28, 2013 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. Link to comment
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 I know, but it does not work always appears with the skin from human and weapons from human Link to comment
xXMADEXx Posted June 28, 2013 Share Posted June 28, 2013 Try delaying it using setTimer by like a half a second. Link to comment
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 ok, but I do not know how to do Link to comment
xXMADEXx Posted June 28, 2013 Share Posted June 28, 2013 Better start learning: https://wiki.multitheftauto.com/wiki/SetTimer Link to comment
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted June 28, 2013 Author Share Posted June 28, 2013 how do I do that after you die you respawns without a weapon I choose? Link to comment
Castillo Posted June 28, 2013 Share Posted June 28, 2013 You want to take his weapons or spawn with the weapons you want? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now