For some reason this doesn't work.
[CODE]//Protective Armour
function ArmorSpawn(ply)
local totalarmor = ply:Armor() + 10
if ply:PS_HasItemEquipped("armor") then
ply:SetArmor(ply:Armor() + 10)
--ply:ChatPrint("Hello, "..ply:Nick()..", you've spawned with "..totalarmor.." armor.")
end
end
hook.Add("PlayerSpawn", "ProtectiveFunc", ArmorSpawn)
[/CODE]
Can someone help me with this?
It is located in: lua/autorun/server/armor.lua
-bump-
Why don't you add some debug prints to ensure the code itself is actually running? For example, at the top of the file add print("Loaded armour spawn"), then after reloading the map, see if it pops up in the server console.
If it does pop up, then you know the script is being loaded. From there, I would add another print like print("ArmorSpwan function called") inside your function.
Also, what gamemode is this?
[QUOTE=smithy285;52031716]Why don't you add some debug prints to ensure the code itself is actually running? For example, at the top of the file add print("Loaded armour spawn"), then after reloading the map, see if it pops up in the server console.
If it does pop up, then you know the script is being loaded. From there, I would add another print like print("ArmorSpwan function called") inside your function.
Also, what gamemode is this?[/QUOTE]
Excl Jailbreak. I'll test it out.
Sorry, you need to Log In to post a reply to this thread.