Jump to content

Making a skin selector.


Recommended Posts


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
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 ;)


the maximum ammount of dimensions is 255?

I thought it was 65535

Link to comment

Well, with just 8 dimensions i will be great :P... I cannot host for much players... I have 128k of upload rate :cry:

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

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) 

Is there something wrong?

Link to comment

Most likely not an awnser on your question but here is a random skin selector:

function getRandomSkin() 
    local ID 
        ID = randInt(7,264) 
    until (ID ~=  and (ID ~= 42) and (ID ~= 65) and (ID ~= 74) and (ID ~= 86) and (ID ~= 208) 
    return ID 

Link to comment

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...