Shazzimal Posted February 15, 2013 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
iPrestege Posted February 15, 2013 Posted February 15, 2013 (edited) setElementModel isObjectInACLGroup triggerServerEvent "onPlayerLogin" "onClientGUIClick" "onPlayerWasted" Edited February 15, 2013 by Guest
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 Ok, i am going to try to make one.
iPrestege Posted February 15, 2013 Posted February 15, 2013 Hmm.. Read My Post Again Add onPlayerWasted .
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 I mean, that i don't want to post "oke" 3 times.
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 I am now going to script, see you in some miNutes!
Shazzimal Posted February 15, 2013 Author 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>
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 ooh, good that you say that, i didn't recognized that. HAHA, that was a fail!
iPrestege Posted February 15, 2013 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 .
iPrestege Posted February 15, 2013 Posted February 15, 2013 <script src="client.lua" type="client" /> Are Sure It,s Client Side ? hasObjectPermissionTo ??
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 But my script is written client side, couse of fthe gui i am going to make!?
iPrestege Posted February 15, 2013 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
Shazzimal Posted February 15, 2013 Author 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?
iPrestege Posted February 15, 2013 Posted February 15, 2013 It,s The Same Just Remove The Admin Func .
Shazzimal Posted February 15, 2013 Author 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)
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 can someone send me the GUI layout, so i can learn how to make GUI's?
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