• 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!

need the players use this script one time

Morrison

Intermediate OT User
Joined
Mar 15, 2009
Messages
266
Solutions
3
Reaction score
119
Location
Exive me
GitHub
none
need the players use this script only once

storage?

PHP:
  local nPosMale = {x = 997, y = 1000,z = 8}

local nPosFemale = {x = 1003, y = 1000,z = 8}

function onLogin(cid)
    if getPlayerSex(cid) == 0 then
        doTeleportThing(cid, nPosFemale)
    else
        doTeleportThing(cid, nPosMale)
    end
    return true
end
 
PHP:
local nPosMale = {x = 997, y = 1000,z = 8}
local nPosFemale = {x = 1003, y = 1000,z = 8}
local check_storage = xxxx
function onLogin(cid)
if getPlayerStorage(cid,check_storage) == -1 then
local tele = getPlayerSex(cid) == 0 and doTeleportThing(cid, nPosFemale) or doTeleportThing(cid, nPosMale)
setPlayerStorageValue(cid,check_storage,1)
end
    return true
end
Take this script
 
Code:
function onLogin(cid)
	return registerCreatureEvent(cid, "this") and getPlayerStorageValue(cid, 5000) == -1 and (getPlayerSex(cid) == 0 and doTeleportThing(cid, {x = 1003, y = 1000, z = 8}) or doTeleportThing(cid, {x = 997, y = 1000, z = 8})) and setPlayerStorageValue(cid, 5000, 1)
end
 
@up
gj
but doesnt really matter how long it is if the requester doesnt understand it. so you could also write it in -1 lines..
 
Script of Rhux

Code:
[07/05/2010 18:43:50] [Error - CreatureScript Interface] 
[07/05/2010 18:43:50] data/creaturescripts/scripts/onloginsex.lua:onLogin
[07/05/2010 18:43:50] Description: 
[07/05/2010 18:43:50] data/creaturescripts/scripts/onloginsex.lua:5: attempt to call global 'getPlayerStorage' (a nil value)
[07/05/2010 18:43:50] stack traceback:
[07/05/2010 18:43:50] 	data/creaturescripts/scripts/onloginsex.lua:5: in function <data/creaturescripts/scripts/onloginsex.lua:4>
[07/05/2010 18:43:50] Testa has logged out.
 
in the script of xeon the player enter and exit
Code:
[07/05/2010 18:47:29] Testa has logged in.
[07/05/2010 18:47:30] Testa has logged out.
[07/05/2010 18:47:47] God of War has logged in.
[07/05/2010 18:47:47] God of War has logged out.
 
Ah my bad try this:

Code:
local nPosMale = {x = 997, y = 1000,z = 8}
local nPosFemale = {x = 1003, y = 1000,z = 8}
local check_storage = xxxx
function onLogin(cid)
if getPlayerStorageValue(cid,check_storage) == -1 then
local tele = getPlayerSex(cid) == 0 and doTeleportThing(cid, nPosFemale) or doTeleportThing(cid, nPosMale)
setPlayerStorageValue(cid,check_storage,1)
end
    return true
end
 
Back
Top