micheal1230 Posted June 17, 2012 Share Posted June 17, 2012 No Errors elseif (itemID==26) then -- GASMASK local gas = getElementData(source, "gasmask") if not (gas) or (gas==0) then exports.global:sendLocalMeAction(source, "slips a black gas mask over their face.") -- can't see their name local pid = getElementData(source, "playerid") local fixedName = "Unknown Person(Gas M)" setPlayerNametagText(source, tostring(fixedName)) setElementData(source, "gasmask", 1) exports['anticheat-system']:changeProtectedElementDataEx(source, "gasmask", 1, false) elseif (gas==1) then exports.global:sendLocalMeAction(source, "slips a black gas mask off their face.") -- can't see their name local pid = getElementData(source, "playerid") local name = string.gsub(getPlayerName(source), "_", " ") setPlayerNametagText(source, tostring(name)) setElementData(source, "gasmask", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "gasmask", 0, false) end elseif (itemID==56) then -- MASK local mask = getElementData(source, "mask") if not (mask) or (mask==0) then exports.global:sendLocalMeAction(source, "slips a mask over their face.") -- can't see their name local pid = getElementData(source, "playerid") local fixedName = "Unknown Person(Mask)" setPlayerNametagText(source, tostring(fixedName)) setElementData(source, "mask", 1) exports['anticheat-system']:changeProtectedElementDataEx(source, "mask", 1, false) elseif (mask==1) then exports.global:sendLocalMeAction(source, "slips a mask off their face.") -- can't see their name local pid = getElementData(source, "playerid") local name = string.gsub(getPlayerName(source), "_", " ") setPlayerNametagText(source, tostring(name)) setElementData(source, "mask", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "mask", 0, false) end Link to comment
Guest Guest4401 Posted June 17, 2012 Share Posted June 17, 2012 source is player element? Link to comment
micheal1230 Posted June 17, 2012 Author Share Posted June 17, 2012 source is player element? Yes Link to comment
micheal1230 Posted June 17, 2012 Author Share Posted June 17, 2012 source is player element? Yes it is anyone?? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now