Boza
New Member
- Joined
- Feb 16, 2010
- Messages
- 184
- Reaction score
- 0
Code:
function onUse(cid, item)
local mode = getPlayerPVPMode(cid)
if mode == 1 then
setMode = 0
else
setMode = 1
end
if isPlayerPzLocked(cid) == FALSE and getCreatureSkullType(cid) == SKULL_NONE then
setPlayerPVPMode(cid, setMode)
if setMode == 1 then
doPlayerSendTextMessage(cid, 25, "You are now Pvp-Enabled!")
[COLOR="Red"]doPlayerSetSpecialDescription(cid, Pvp Enabled)[/COLOR]
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_STUN)
else
doPlayerSendTextMessage(cid, 25, "You are now Pvp-Disabled!")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_STUN)
end
else
doPlayerSendCancel(cid, "You cannot change pvp when Skulled.")
end
doRemoveItem(cid, item.uid, 1)
return TRUE
end
Code:
[Error - LuaScriptInterface::loadFile] data/actions/scripts/other/pvpmode.lua:12: ')' expected near 'Enabled'
[Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/pvpmode.lua)
data/actions/scripts/other/pvpmode.lua:12: ')' expected near 'Enabled'
Lua: demo
No Idea why this isn't working.
Last edited: