• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[resolved] Problem script (close)

Morrison

Intermediate OT User
Joined
Mar 15, 2009
Messages
283
Solutions
3
Reaction score
123
Location
Exive me
GitHub
none
I have this script the male players dont enter in the game what is the problem?

Is for sex males dont have position?

local nPos = {
x = 1008,
y = 1008,
z = 7
}

function onLogin(cid)
if getPlayerSex(cid) == 0 then
doTeleportThing(cid, nPos)
else
return false
end
return true
end
 
Last edited:
Solution
check outfits.xml if the sex for males is = 1

--
spanish

verifica en outfits.xml, si el valor para males es 1

si no usalo asi

LUA:
local nPosMale = {x = 1000, y = 1000,z = 7}

local nPosFemale = {x = 1150, y = 1150,z = 7}

function onLogin(cid)
    if getPlayerSex(cid) == 0 then
        doTeleportThing(cid, nPosFemale)
    else
        doTeleportThing(cid, nPosMale)
    end
    return true
end
Ok ty And how to convinate Pos for males and pos for females?


local nPos Male= {x = 1000, y = 1000,z = 7}

local nPos Female= {x = 1150, y = 1150,z = 7}

function onLogin(cid)
if getPlayerSex(cid) == 0 then
doTeleportThing(cid, nPos)
end
return true
end


(Y si quisiera tambien poner la posiscion de Male como seria el script?)
 
LUA:
local pos = 
    {
        [0] = {x = 1150, y = 1150,z = 7}, 
        [1] = {x = 1000, y = 1000,z = 7}
    }

function onLogin(cid)
    doTeleportThing(cid, pos[getPlayerSex(cid)])
    return true
end
 
Bug onlogin male players and leater dont muve to position no working male player o.o
What is the problem?
--------------------------------------------------------------

Spanish
Me deio debug al meterme con un male y luego vilvi entrar pero no me teletranporto solo sirve con females

No sale ningun error en la consola
 
check outfits.xml if the sex for males is = 1

--
spanish

verifica en outfits.xml, si el valor para males es 1

si no usalo asi

LUA:
local nPosMale = {x = 1000, y = 1000,z = 7}

local nPosFemale = {x = 1150, y = 1150,z = 7}

function onLogin(cid)
    if getPlayerSex(cid) == 0 then
        doTeleportThing(cid, nPosFemale)
    else
        doTeleportThing(cid, nPosMale)
    end
    return true
end
 
Solution
Ty man and how add rep+?

Grasias bro :) en creature war pondre tus creditos
Si supiera comodar rep te daria oks Grasias we

Tu sabes donde puedo cambiar en accout manager k diga enves de male or female Warrior or pincess?
 
Back
Top