JasperRieken Posted January 20, 2011 Posted January 20, 2011 i want to have a scipt if you join the Xuju Crew team you will not be able to be killed and yuo will get skin 217 but i really can't get it don't know how tryed mta wiki didn't work Thank you for helping me
JasperRieken Posted January 20, 2011 Author Posted January 20, 2011 already did but didn't work please help me
JasperRieken Posted January 20, 2011 Author Posted January 20, 2011 ok function xujuCrew() onTeamJoin setSkin( 217 ) if team == "Xuju Crew" then no damage addEventHandler("onRecourceStart",xujuCrew)
MaddDogg Posted January 20, 2011 Posted January 20, 2011 That's a complete mess. I think you should first learn how to script properly, because your script makes absolutely no sense. Dont take that personally, but you just won't get far, when you don't know the basics. https://wiki.multitheftauto.com/wiki/Scr ... troduction
JasperRieken Posted January 20, 2011 Author Posted January 20, 2011 yes i know got some good scripts to but i really want this one can you help me please?
Arran Posted January 20, 2011 Posted January 20, 2011 function checkIfTeamRight() local team = --check my message at bottom if (team and getTeamName(source) == "Xuju Crew") then cancelEvent() end end addEventHandler("onClientPlayerDamage", getLocalPlayer(), checkIfTeamRight) Atleast have a real attempt before asking for help... --check my message at bottom Is suppost be local team = getPlayerTeam(source) but for some reason when sumbitting this message this happens... local team = getPlayerTeam" class="kw2">getPlayerTeam (source)
JasperRieken Posted January 20, 2011 Author Posted January 20, 2011 One more question how can i set team like if they join make them get the 217 skin
JasperRieken Posted January 20, 2011 Author Posted January 20, 2011 When they join in the Xuju Crew witht this script function checkIfTeamRight() local team = getPlayerTeam(source) if (team and getTeamName(source) == "Xuju Crew") then cancelEvent() end end addEventHandler("onClientPlayerDamage", getLocalPlayer(), checkIfTeamRight)
JasperRieken Posted January 20, 2011 Author Posted January 20, 2011 no you need to be set to a team by admin but i need it to be like when i set it to Xuju Crew that they will have skin 217
JasperRieken Posted January 20, 2011 Author Posted January 20, 2011 ow yeah extra function checkIfTeamRight() local team = getPlayerTeam(source) if (team and getTeamName(source) == "Xuju Crew") then cancelEvent() end end addEventHandler("onClientPlayerDamage", getLocalPlayer(), checkIfTeamRight) it doesn't do anyting only thing he sais is bad playerpointer
JasperRieken Posted January 21, 2011 Author Posted January 21, 2011 i got this so far but doesn't work function skinStaff() if getElementType(source) == "player" then -- check if a player element hit the marker local team = getPlayerTeam(source) --Getting player's team if team and getTeamName(team) == "Xuju Crew" then -- if player is in team and team name is "Xuju Crew" setElementModel(source,217) end end end addEventHandler("onTeamJoin",skinStaff)
Castillo Posted January 21, 2011 Posted January 21, 2011 There is no such event named "onTeamJoin", also the addEventHandler isn't even right.
JasperRieken Posted January 21, 2011 Author Posted January 21, 2011 but i could find the good one can you help me?
Castillo Posted January 21, 2011 Posted January 21, 2011 maybe you should explain us how you want it to work? like when the player spawns?
JasperRieken Posted January 21, 2011 Author Posted January 21, 2011 no when player get set to Xuju Crew team that's what i want
Castillo Posted January 21, 2011 Posted January 21, 2011 there is no event to detect when a player joins a team, you could make your own event when you set him to the team.
JasperRieken Posted January 21, 2011 Author Posted January 21, 2011 i don't know how can you please make one
Castillo Posted January 21, 2011 Posted January 21, 2011 Post the code you use to set the player to team.
JasperRieken Posted January 21, 2011 Author Posted January 21, 2011 i don't use a code i set with admin panel
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