Jullul7000 Posted January 28, 2013 Share Posted January 28, 2013 (edited) Whats the script for: typing: /resign Getting: Skin id: 239 and team Unemployed And how to save weapon stats?? Edited January 28, 2013 by Guest Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 you can do it using : setElementModel createTeam setPlayerTeam addCommandHandler And i think what you are going to do should to be like that? : Server Side -- local Unemployed = createTeam ( Unemployed ) function SetSkinAndTeam(player) setElementModel ( player, 239 ) setPlayerTeam ( player, Unemployed ) end addCommandHandler ( "resign", SetSkinAndTeam ) https://forum.multitheftauto.com/viewtopic.php?f=91&t=53366 Link to comment
Jullul7000 Posted January 28, 2013 Author Share Posted January 28, 2013 I tried to make it: But it doenst work.... addCommandHandler( "resign", setPlayerTeam ( source, Unemployed ) setElementModel ( Skin theElement, 239 model ) end ) Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 I tried to make it:But it doenst work.... addCommandHandler( "resign", setPlayerTeam ( source, Unemployed ) setElementModel ( Skin theElement, 239 model ) end ) Try This Server Side! : local Unemployed = createTeam ( Unemployed ) function SetSkinAndTeam(player) setElementModel ( player, 239 ) setPlayerTeam ( player, Unemployed ) end addCommandHandler ( "resign", SetSkinAndTeam ) And It seems you forgot to create a team? Not Tested But Should To Work ** Link to comment
Jullul7000 Posted January 28, 2013 Author Share Posted January 28, 2013 Doenst work EDIT: i get the skin but not the team ... Link to comment
Castillo Posted January 28, 2013 Share Posted January 28, 2013 local Unemployed = createTeam ( "Unemployed", 255, 255, 255 ) function SetSkinAndTeam ( player ) setElementModel ( player, 239 ) setPlayerTeam ( player, Unemployed ) end addCommandHandler ( "resign", SetSkinAndTeam ) Link to comment
Jullul7000 Posted January 28, 2013 Author Share Posted January 28, 2013 local Unemployed = createTeam ( "Unemployed", 255, 255, 255 ) function SetSkinAndTeam ( player ) setElementModel ( player, 239 ) setPlayerTeam ( player, Unemployed ) end addCommandHandler ( "resign", SetSkinAndTeam ) Again skin. No team.. Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 local Unemployed = createTeam ( "Unemployed", 255, 255, 255 ) function SetSkinAndTeam ( player ) setElementModel ( player, 239 ) setPlayerTeam ( player, Unemployed ) end addCommandHandler ( "resign", SetSkinAndTeam ) I have a question!What's wrong with the create of the team have?I have learned this from the wiki!Supposed to work I try to change the way the create of the team was working properly!Damn! my fault I'm sorry ,Thank you anyway! try : Unemployed = createTeam ( "Unemployed", 0, 255, 0 ) function SetSkinAndTeam(player) setElementModel ( player, 239 ) setPlayerTeam ( player, Unemployed ) end addCommandHandler ( "resign", SetSkinAndTeam ) Link to comment
Castillo Posted January 28, 2013 Share Posted January 28, 2013 local Unemployed = createTeam ( "Unemployed", 255, 255, 255 ) function SetSkinAndTeam ( player ) setElementModel ( player, 239 ) setPlayerTeam ( player, Unemployed ) end addCommandHandler ( "resign", SetSkinAndTeam ) Again skin. No team.. Works perfect here. Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 local Unemployed = createTeam ( "Unemployed", 255, 255, 255 ) function SetSkinAndTeam ( player ) setElementModel ( player, 239 ) setPlayerTeam ( player, Unemployed ) end addCommandHandler ( "resign", SetSkinAndTeam ) Again skin. No team.. Works perfect here. I try it now and it works correctly ^ ^ i think he is use it @ client side maybe | show you,r meta.xml and Castillo please answer my question up ^ Link to comment
Castillo Posted January 28, 2013 Share Posted January 28, 2013 At createTeam you put Unemployed, which is not a string, you should've put "Unemployed", also, you had forgot to define the color arguments. Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 At createTeam you put Unemployed, which is not a string, you should've put "Unemployed", also, you had forgot to define the color arguments. also, you had forgot to define the color arguments. Hmm.. So, Who put this example?Does this mean that wrong example? function gimmeATeam ( source, commandName, teamName ) local newTeam = createTeam ( teamName ) -- create a new team with the specified name if newTeam then -- if it was successfully created setPlayerTeam ( source, newTeam ) -- add the player to the new team end end addCommandHandler("giveteam", gimmeATeam) Link to comment
Castillo Posted January 28, 2013 Share Posted January 28, 2013 No, that one works, seems like color arguments aren't required, whoever made that wiki page for createTeam, should have set the color argments as optional. Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 No, that one works, seems like color arguments aren't required, whoever made that wiki page for createTeam, should have set the color argments as optional. So Why My Script ^ Up , Not Working? local Unemployed = createTeam ( Unemployed ) Link to comment
Castillo Posted January 28, 2013 Share Posted January 28, 2013 You're not using a string. Should be. local Unemployed = createTeam ( "Unemployed" ) Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 You're not using a string.Should be. local Unemployed = createTeam ( "Unemployed" ) Ah,Thank You Castillo . Link to comment
3NAD Posted January 28, 2013 Share Posted January 28, 2013 also, you had forgot to define the color arguments. Hmm.. So, Who put this example?Does this mean that wrong example? function gimmeATeam ( source, commandName, teamName ) local newTeam = createTeam ( teamName ) -- create a new team with the specified name if newTeam then -- if it was successfully created setPlayerTeam ( source, newTeam ) -- add the player to the new team end end addCommandHandler("giveteam", gimmeATeam) Not important to add Colors, And at The Wiki Example, You can do this : /giveteam PrestigeTeam Link to comment
iPrestege Posted January 29, 2013 Share Posted January 29, 2013 also, you had forgot to define the color arguments. Hmm.. So, Who put this example?Does this mean that wrong example? function gimmeATeam ( source, commandName, teamName ) local newTeam = createTeam ( teamName ) -- create a new team with the specified name if newTeam then -- if it was successfully created setPlayerTeam ( source, newTeam ) -- add the player to the new team end end addCommandHandler("giveteam", gimmeATeam) Not important to add Colors, And at The Wiki Example, You can do this : /giveteam PrestigeTeam Thanks. 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