Shazzimal Posted February 15, 2013 Share Posted February 15, 2013 Hey guys, I want to create a script that will show up a GUI when the player logs in to choose a skin. And always when a player gets alive. Couse everytime when someone dies on my server, they will get another skin automaticaly. What i always want in my script is that every admin wil get this skin: ID 286. Which contents must contain in my script? Thanks Link to comment
iPrestege Posted February 15, 2013 Share Posted February 15, 2013 (edited) setElementModel isObjectInACLGroup triggerServerEvent "onPlayerLogin" "onClientGUIClick" "onPlayerWasted" Edited February 15, 2013 by Guest Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 Ok, i am going to try to make one. Link to comment
iPrestege Posted February 15, 2013 Share Posted February 15, 2013 Hmm.. Read My Post Again Add onPlayerWasted . Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 oops, that wasn't what i wanted Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 I mean, that i don't want to post "oke" 3 times. Link to comment
iPrestege Posted February 15, 2013 Share Posted February 15, 2013 Ok No Problem That From The Forum . Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 I am now going to script, see you in some miNutes! Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 Sorry for waiting, but this is my 1st part: client-sided? function setAdminSkin() if hasObjectPermissionTo(thePlayer, "command.ban", true) then setPlayerSkin(thePlayer, 286) outputChatBox("Welcome admin, your skin has been set to: Admin server skin.",thePlayer) end end meta.xml <meta> <info author="Shazzimal" name="SkinChooser" disc="When you log on, you can select a skin, admin does automaticaly get skin ID286." Version="1.0.0"/> <script src="client.lua" type=client/> </meta> Link to comment
50p Posted February 15, 2013 Share Posted February 15, 2013 <script src="client.lua" type="client" /> Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 ooh, good that you say that, i didn't recognized that. HAHA, that was a fail! Link to comment
iPrestege Posted February 15, 2013 Share Posted February 15, 2013 Sorry for waiting, but this is my 1st part:client-sided? function setAdminSkin() if hasObjectPermissionTo(thePlayer, "command.ban", true) then setPlayerSkin(thePlayer, 286) outputChatBox("Welcome admin, your skin has been set to: Admin server skin.",thePlayer) end end meta.xml <meta> <info author="Shazzimal" name="SkinChooser" disc="When you log on, you can select a skin, admin does automaticaly get skin ID286." Version="1.0.0"/> <script src="client.lua" type=client/> </meta> the Player is not defined server side . Link to comment
iPrestege Posted February 15, 2013 Share Posted February 15, 2013 <script src="client.lua" type="client" /> Are Sure It,s Client Side ? hasObjectPermissionTo ?? Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 But my script is written client side, couse of fthe gui i am going to make!? Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 ok i understand i think! Link to comment
iPrestege Posted February 15, 2013 Share Posted February 15, 2013 You Can Do It Use TriggerServerEvent .! Link to comment
iPrestege Posted February 15, 2013 Share Posted February 15, 2013 And If You Want To Do It On Player Login With Out Gui Or What Ever Server Side : function setAdminSkin() if hasObjectPermissionTo(source, "command.ban", true) then setElementModel(source,268) outputChatBox("Welcome admin, your skin has been set to: Admin server skin.",source,255,0,0) end end addEventHandler("onPlayerLogin",root,setAdminSkin) Have Fun Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 Just some add about the gui: I am goint=g to make a gui to select a skin as non-admin, you know? Link to comment
iPrestege Posted February 15, 2013 Share Posted February 15, 2013 It,s The Same Just Remove The Admin Func . Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 Yes, but i want that the player can choose which skin they want, they can choose that when they login and when they get allive (or die) Link to comment
Shazzimal Posted February 15, 2013 Author Share Posted February 15, 2013 can someone send me the GUI layout, so i can learn how to make GUI's? 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