• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Function that check players outfit, it is possible ?

Kakaher

Member
Joined
Nov 2, 2009
Messages
129
Reaction score
7
Hello everybody...

I wonder if anybody knows how to make a function that checks the player outfit, or if it already exist what is it ?

Im using TFS 8.6 0.4 rev 3884


I need this because I'm making custom sprites, and I'm gonna make a mount system (yeah, in 8.6), the system is already done and it works great
The only problem I´m facing is that it doens't matter what is your outfit, your looktype you will always be the same when you mount...
I need to check the player outfit and if he is looktype 1 he will be looktype 10 when he mounts (and looktype 10 is the looktype of the looktype 1 on a mount),
If the player is looktype 2 he will be looktype 11 when he mounts (and looktype 11 is the looktype of looktype 1 on a mount)
And so on...
I´m sorry for being repetitive

Hope everyone can understand what I´m trying to achieve... Any questions please ask!

Thanks A LOT already for the help!
I will Rep!
 
example from lua functions xD:

LUA:
local myOutfit = getCreatureOutfit(cid)
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Im currently wearing outfit with lookType = " .. myOutfit.lookType .. ".")

u can do it like that:

local x = getCreatureOutfit(cid)
newOutfit = {lookType = x.lookType + 10, lookHead = x.lookHead, lookAddons = 0, lookLegs = x.lookLegs, lookBody = x.lookBody, lookFeet = x.lookFeet}
doSetCreatureOutfit(cid, newOutfit)
 
example from lua functions xD:

LUA:
local myOutfit = getCreatureOutfit(cid)
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Im currently wearing outfit with lookType = " .. myOutfit.lookType .. ".")

u can do it like that:

local x = getCreatureOutfit(cid)
newOutfit = {lookType = x.lookType + 10, lookHead = x.lookHead, lookAddons = 0, lookLegs = x.lookLegs, lookBody = x.lookBody, lookFeet = x.lookFeet}
doSetCreatureOutfit(cid, newOutfit)

Thanks for helping!
But the +10 was just an example, it is not how it works on my mount system..

I tried this:
LUA:
if getCreatureOutfit(cid) == 302

But I get the following error on the console:
Code:
attempt to call global `getPlayerOutfit` (a nil value)

Am I using the function wrongly or my server doesn't have it ?


----EDIT
I do have the function, just checked the sources...
I am using it wrongly, can you help me ?
Never used it before!
Thanks already

----EDIT 2
Nevermind, I got it...

I should use this:
LUA:
if getCreatureOutfit(cid).lookType == 302

Thanks a lot for the help! = )
Rep!
 
Last edited:
Back
Top