This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Player Chat Revive Script  (Read 4311 times)

Kian

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 18
    • View Profile
Player Chat Revive Script
« on: March 12, 2010, 08:27:10 pm »
Hey I wanted to show you this revive script. You have to write #revive in chat, and you get revived.

Code: [Select]
local messagee = "#revive"

function revive_function(event, player, message, type, language)
if (message == messagee) then
if (player:IsDead() == true) then
player:SendBroadcastMessage("You got revived")
player:FullCastSpell(32343)
player:ResurrectPlayer(player)

elseif (player:IsDead() == false) then

player:SendBroadcastMessage("You are not dead!")

else

return
end
end
end

RegisterServerHook(16, "revive_function")

This script will only check if the player is dead or not. But this will only check is he is dead.

Code: [Select]
local messagee = "#revive"

function revive_function(event, player, message, type, language)
if (message == messagee) then
if (player:IsDead() == true) then
player:SendBroadcastMessage("You got revived!")
player:FullCastSpell(32343)
player:ResurrectPlayer(player)

else
player:SendBroadcastMessage("You are not dead!")
end
end
end

RegisterServerHook(16, "revive_function")

Have fun
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Player Chat Revive Script
« Reply #1 on: May 13, 2010, 12:20:28 pm »
A  boolean value can only have two values: true or false. The first piece is just the same as the second one.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kian

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 18
    • View Profile
Re: Player Chat Revive Script
« Reply #2 on: May 13, 2010, 03:49:09 pm »
I know it schlumpf.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »