johnsamir
Advanced OT User
Hello, I'm trying to make an script in revscript
i don't want to check frags i only want to check if player has gained skull, example white or red. If player has gained white or red a message will be broadcasted to the whole server. I'm trying but don't get it to work and this is what i have until now the console ask me for a then but it does not work
tried this too now im facing more errors
now i have made this, there are no errors in console but the script is not working
i don't want to check frags i only want to check if player has gained skull, example white or red. If player has gained white or red a message will be broadcasted to the whole server. I'm trying but don't get it to work and this is what i have until now the console ask me for a then but it does not work
Lua:
function messageevent.onKill(player, target)
player:registerEvent("skull_greet")
if player:getSkull(SKULL_WHITE)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "a player has gained white skull go find him")
player:getSkull(SKULL_RED)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "a player has gained red skull go and get his loot")
if player:getSkull(SKULL_BLACK)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "a player has gained black skull go and get his loot")
end
return true
messageevent:register()
tried this too now im facing more errors
Lua:
local message = CreatureEvent("skull_regards")
function messageevent.onKill(player, target)
if player:getSkull(SKULL_WHITE) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "a player has gained white skull go find him")
if player:getSkull(SKULL_RED) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "a player has gained red skull go and get his loot")
if player:getSkull(SKULL_BLACK) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "a player has gained black skull go and get his loot")
end
end
return true
end
end
messageevent:register()
Post automatically merged:
now i have made this, there are no errors in console but the script is not working
Code:
local creatureevent = CreatureEvent("greet_skull")
function creatureevent.onKill(player, target)
if player:getSkull(SKULL_WHITE) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "a player has gained white skull go find him")
if player:getSkull(SKULL_RED) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "a player has gained red skull go and get his loot")
if player:getSkull(SKULL_BLACK) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "a player has gained black skull go and get his loot")
end
end
return true
end
end
creatureevent:register()
Last edited: