Nux
Yzeria Custom War
- Joined
- Jan 2, 2009
- Messages
- 1,067
- Reaction score
- 1
Well Here is the script
And this is the error
PHP:
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
local broadcast = {3,6,9,12,15,18,21}
if isPlayer(mostDamageKiller) == TRUE then
db.executeQuery("UPDATE `players` SET `points` = `points` + 1 WHERE `name` = '"..getCreatureName(lmostDamageKiller).."';")
local result = db.getResult("SELECT `points` FROM `players` WHERE `name` = '"..getCreatureName(mostDamageKiller).."';")
if isInArray((result:getID(),braodcast) == TRUE then
id = result:getDataInt("points")
doBroadcastMessage(""..getCreatureName(mostDamageKiller).." has "..id.." Points!", 1)
end
end
if isPlayer(lastHitKiller) == TRUE and lastHitKiller ~= mostDamageKiller then
db.executeQuery("UPDATE `players` SET `points` = `points` + 1 WHERE `name` = '"..getCreatureName(mostDamageKiller).."';")
local result = db.getResult("SELECT `points` FROM `players` WHERE `name` = '"..getCreatureName(lastHitKiller).."';")
if isInArray((result:getID(),braodcast) == TRUE then
id = result:getDataInt("points")
doBroadcastMessage(""..getCreatureName(lastHitKiller).." has "..id.." Points!", 1)
end
end
return TRUE
end
And this is the error
[Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/kill.lua)
data/creaturescripts/scripts/kill.lua:8: ')' expected near ','