Forum > Showoff - what you are working on
Player Chat Revive Script
(1/1)
Kian:
Hey I wanted to show you this revive script. You have to write #revive in chat, and you get revived.
--- Code: ---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") --- End code ---
This script will only check if the player is dead or not. But this will only check is he is dead.
--- Code: ---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") --- End code ---
Have fun
schlumpf:
A boolean value can only have two values: true or false. The first piece is just the same as the second one.
Kian:
I know it schlumpf.
Navigation
[0] Message Index
|