^Nevermore^ Posted January 14, 2008 Share Posted January 14, 2008 Well... I want to make a graphical skin selector that lets players select their skin after start playing. Is there any way to do that? Link to comment
mabako Posted January 14, 2008 Share Posted January 14, 2008 "Yes." you got spawnPlayer, setElementPosition, setPlayerRotation, setElementInterior, setPlayerSkin and bindKey/unbindKey, that's all you need for a good start. when they connect, set them to the according position, set the camera, interior, rotation and skin. use bindKey for arrow_l/arrow_r (depending on which keys you want to use, of course) and e.g. shift_l-key for spawning -> setting the player to the "spawn" pos he should be, change interior and unlock camera. Link to comment
^Nevermore^ Posted January 14, 2008 Author Share Posted January 14, 2008 But... what if two players are selecting their skin at the same time?? Link to comment
Quest Posted January 14, 2008 Share Posted January 14, 2008 Set various dimensions for the player. Like a random zone from 0-10000 so they ar enever in the same dimension. make sure they get readded to dimension 0 when they spawn. Link to comment
Cloudhunter Posted January 14, 2008 Share Posted January 14, 2008 Set various dimensions for the player. Like a random zone from 0-10000 so they ar enever in the same dimension. make sure they get readded to dimension 0 when they spawn. The maximum is 255, so that leaves 256 Cloudy Link to comment
Stevvo Posted January 14, 2008 Share Posted January 14, 2008 I seem to remember when you change skins they don't unload from memory properly, so when you scroll thru skins it can make your FPS low and builings flicker in and out from LODs. Link to comment
Jumba' Posted January 14, 2008 Share Posted January 14, 2008 Set various dimensions for the player. Like a random zone from 0-10000 so they ar enever in the same dimension. make sure they get readded to dimension 0 when they spawn. The maximum is 255, so that leaves 256 Cloudy the maximum ammount of dimensions is 255? I thought it was 65535 Link to comment
eAi Posted January 15, 2008 Share Posted January 15, 2008 As far as I'm aware, Jumba is correct, there is a limit of 65536 dimensions and 256 interiors. Link to comment
Cloudhunter Posted January 15, 2008 Share Posted January 15, 2008 As far as I'm aware, Jumba is correct, there is a limit of 65536 dimensions and 256 interiors. Ah! Thanks for the information Cloudy Link to comment
^Nevermore^ Posted January 15, 2008 Author Share Posted January 15, 2008 Well, with just 8 dimensions i will be great ... I cannot host for much players... I have 128k of upload rate I seem to remember when you change skins they don't unload from memory properly, so when you scroll thru skins it can make your FPS low and builings flicker in and out from LODs. Is that truel??? Link to comment
Jumba' Posted January 15, 2008 Share Posted January 15, 2008 As far as I'm aware, Jumba is correct, there is a limit of 65536 dimensions and 256 interiors. oh, so it's not possible to have more than 255 interiors? I thought you could have 65536 interiors But anyway, good thing i know now =) Link to comment
^Nevermore^ Posted January 17, 2008 Author Share Posted January 17, 2008 I've done this function to test if i could put a player and the camera in front of him... But doesn't work... function selecskin( player ) setElementPosition ( player, -2620.8506, 1412.5596, 7.0938) setPlayerRotation ( player, 312 ) setCameraMode ( player, "fixed" ) setTimer ( setCameraPosition, 1000, 1, player, -2618.9541, 1414.4677, 7.1016) setTimer ( setCameraLookAt, 1000, 1, player, -2620.2506, 1412.5596, 7.0938) end Is there something wrong? Link to comment
eAi Posted January 18, 2008 Share Posted January 18, 2008 Well, tell us in what way it doesn't work. My guess is that you shouldn't be using setTimer for setCameraPosition, just use it for setCameraLookAt. You should also use toggleCameraFixedMode. Link to comment
Aeron Posted January 23, 2008 Share Posted January 23, 2008 Most likely not an awnser on your question but here is a random skin selector: function getRandomSkin() local ID repeat ID = randInt(7,264) until (ID ~= and (ID ~= 42) and (ID ~= 65) and (ID ~= 74) and (ID ~= 86) and (ID ~= 208) return ID end Link to comment
Sky Posted January 24, 2008 Share Posted January 24, 2008 hi, i have a question , this is for random skin selection, but how for skin selection by nickname ? thx. Link to comment
Quest Posted January 24, 2008 Share Posted January 24, 2008 I don't understand what you're asking. From the sounds of it you want a random selector but you want to chose the skin by a nickname. . . that doesn't make much sense. Do you mean you want to catagorize the skins into a bunch and have it randomly select one on spawn? Link to comment
Sky Posted January 25, 2008 Share Posted January 25, 2008 i'm asking of a skin selector . example : /selectskin 53 thx. Link to comment
Quest Posted January 25, 2008 Share Posted January 25, 2008 http://development.mtasa.com/index.php? ... PlayerSkin That is a basic thing you are asking for. Here's an example that you can use to get on the right track. 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