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 My resources: Didn't make one yet. Momently in build!
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. My resources: Didn't make one yet. Momently in build!
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 oke My resources: Didn't make one yet. Momently in build!
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 oops, that wasn't what i wanted My resources: Didn't make one yet. Momently in build!
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 I mean, that i don't want to post "oke" 3 times. My resources: Didn't make one yet. Momently in build!
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 I am now going to script, see you in some miNutes! My resources: Didn't make one yet. Momently in build!
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> My resources: Didn't make one yet. Momently in build!
50p Posted February 15, 2013 Posted February 15, 2013 <script src="client.lua" type="client" /> - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
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! My resources: Didn't make one yet. Momently in build!
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!? My resources: Didn't make one yet. Momently in build!
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 ok i understand i think! My resources: Didn't make one yet. Momently in build!
Shazzimal Posted February 15, 2013 Author Posted February 15, 2013 ok My resources: Didn't make one yet. Momently in build!
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? My resources: Didn't make one yet. Momently in build!
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) My resources: Didn't make one yet. Momently in build!
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? My resources: Didn't make one yet. Momently in build!
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