Hey there,
What I am trying to accomplish is you cannot use a weapon unless you have required skill level.
Example;
Club needs 130 club skill to use
So my code is as follows
I also setup this script in movements for onEquipItem.. with the script name
There is no console errors, no message to character, etc..
Any idea?
What I am trying to accomplish is you cannot use a weapon unless you have required skill level.
Example;
Club needs 130 club skill to use
So my code is as follows
Lua:
function onEquip(cid, item, slot)
local lvl = 130
local p = Player(cid)
if p:getId(cid) and p:getSkillLevel(1) < 130 then
doPlayerSendTextMessage(cid,25,"You need 130.")
return
end
return false
end
I also setup this script in movements for onEquipItem.. with the script name
There is no console errors, no message to character, etc..
Any idea?