Hello.
I particularly understand very little of queries, so i came to ask for help to add one in my action.
Action:
The query would be to change the looktype of player in database.
I particularly understand very little of queries, so i came to ask for help to add one in my action.
Action:
function onUse(cid, item, frompos, item2, topos)
local config = {
[7529] = 500,
}
local nivel = 1
local outfit = {lookType = 725}
if getPlayerLevel(cid) == nivel then
if config[item.itemid] ~= getPlayerVocation(cid) then
doRemoveItem(item.uid, 1)
doSetCreatureOutfit(cid, outfit)
doPlayerSetVocation(cid, config[item.itemid])
doPlayerSendTextMessage(cid, 22, "Thank you for contributing to the server! You've become a "..getPlayerVocationName(cid).."!")
else
doPlayerSendTextMessage(cid, 22, "You can not change again the vocation of this character.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need to be level ".. nivel .." in order to change their vocation.")
end
return true
end
The query would be to change the looktype of player in database.