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

Please an indenting tutorial ?? :l dont know if thats how you're supposed to call it lol

Cris2387

Member
Joined
Dec 30, 2013
Messages
177
Reaction score
9
I want to know how people change this:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if (item.actionid == 5788 and getPlayerStorageValue(cid,13500) >= 1) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Bem-vindo a area VIP!", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Bem-vindo a area VIP", TALKTYPE_ORANGE_1)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao possui Vip Access.")
return TRUE
end
return FALSE
end
to this
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   local cidPosition = getCreaturePosition(cid)
     if (item.actionid == 5788 and getPlayerStorageValue(cid,13500) >= 1) then
       if cidPosition.x < toPosition.x then
         doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
                 doCreatureSay(cid, "Bem-vindo a area VIP!", TALKTYPE_ORANGE_1)
       else
         doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
                 doCreatureSay(cid, "Bem-vindo a area VIP", TALKTYPE_ORANGE_1)
       end
       return TRUE
     else
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao possui Vip Access.")
       return TRUE
   end
   return FALSE
end
??
 
I want to know how people change this:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if (item.actionid == 5788 and getPlayerStorageValue(cid,13500) >= 1) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Bem-vindo a area VIP!", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Bem-vindo a area VIP", TALKTYPE_ORANGE_1)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao possui Vip Access.")
return TRUE
end
return FALSE
end
to this
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   local cidPosition = getCreaturePosition(cid)
     if (item.actionid == 5788 and getPlayerStorageValue(cid,13500) >= 1) then
       if cidPosition.x < toPosition.x then
         doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
                 doCreatureSay(cid, "Bem-vindo a area VIP!", TALKTYPE_ORANGE_1)
       else
         doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
                 doCreatureSay(cid, "Bem-vindo a area VIP", TALKTYPE_ORANGE_1)
       end
       return TRUE
     else
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao possui Vip Access.")
       return TRUE
   end
   return FALSE
end
??
It does not seem like u changed anything in the script so I think you mean the this:
Just use
Ehu8Keb.png
<- when starting to write a new line like.
[Button exacly north of Capslock]
(?)
 
It does not seem like u changed anything in the script so I think you mean the this:
Just use
Ehu8Keb.png
<- when starting to write a new line like.
[Button exacly north of Capslock]
(?)
yes, i know but what i meant is how do i know how much distance to put? look this is an example of what im meaning:
Code:
return FALSE
end

yes, i know but what i meant is how do i know how much distance to put? look this is an example of what im meaning:
Code:
                 return FALSE
     end
 
Last edited by a moderator:
yes, i know but what i meant is how do i know how much distance to put? look this is an example of what im meaning:
Code:
return FALSE
end
Well I guess the distance does not matter but, in order to keep it seem nice & clean you would just do how you did on the first post script u posted.
I think.
 
I put +1 tab on each line to identify each line, then when i start to end it i subtract tabs each line again back down to end
 
Back
Top