AjaxFTW Posted January 25, 2016 Share Posted January 25, 2016 Guys i have problem here some times code toggleControl or toggleAllControls not working in whole the server and some times work it's disable/enable alone at any time IDK why Any help please here about that?! Link to comment
KariiiM Posted January 25, 2016 Share Posted January 25, 2016 Post the whole code because that's impossbile, or just a part when you used this function. Link to comment
AjaxFTW Posted January 25, 2016 Author Share Posted January 25, 2016 Post the whole code because that's impossbile, or just a part when you used this function. for eample this code local level = getPlayerWantedLevel ( localPlayer ) if ( level > 0 ) then toggleControl(localPlayer, "sprint", false) end was working with me since 2 days ago 100% Now it's not working and all th scripts which have code toggle not working and these scripts all was working 100% good. Link to comment
KariiiM Posted January 25, 2016 Share Posted January 25, 2016 It should be like that, local level = getPlayerWantedLevel () if ( level > 0 ) then toggleControl("sprint", false) end Link to comment
AjaxFTW Posted January 25, 2016 Author Share Posted January 25, 2016 It should be like that, local level = getPlayerWantedLevel () if ( level > 0 ) then toggleControl("sprint", false) end Bro it's part of full code here you are the full code function enterSafeZone(element, matchingDimension) local level = getPlayerWantedLevel ( localPlayer ) if ( level > 0 ) then toggleControl(localPlayer, "sprint", false) end if (element ~= localPlayer or not matchingDimension) then return end if (getElementDimension(element) ~= 0) then return end if (isPlayerInTeam(localPlayer, "Staff")) then return end if (isTimer(leaveTimer)) then killTimer(leaveTimer) end if getElementHealth(localPlayer) <= 30 then setElementHealth(localPlayer, 0) exports.CORtexts:output("you have been killed for camping!", 255, 0, 0) end if (isPlayerInTeam(localPlayer, "Police Force") or isPlayerInTeam(localPlayer, "Police") or isPlayerInTeam(localPlayer, "Government") or isPlayerInTeam(localPlayer, "SWAT")) then exports.CORtexts:output("You have entered a no-camping zone.", 0, 255, 0) setPedWeaponSlot(localPlayer, 0) exports.CIFhelp:modTextBar("campHandler", "Protected, no camp area", 0, 255, 0) else setPedWeaponSlot(localPlayer, 0) exports.CIFhelp:modTextBar("campHandler", "Protected, no camp area", 0, 255, 0) end end Link to comment
KariiiM Posted January 25, 2016 Share Posted January 25, 2016 function enterSafeZone(element, matchingDimension) local level = getPlayerWantedLevel () if ( level > 0 ) then toggleControl("sprint", false) end if (element ~= localPlayer or not matchingDimension) then return end if (getElementDimension(element) ~= 0) then return end if (isPlayerInTeam(localPlayer, "Staff")) then return end if (isTimer(leaveTimer)) then killTimer(leaveTimer) end if getElementHealth(localPlayer) <= 30 then setElementHealth(localPlayer, 0) exports.CORtexts:output("you have been killed for camping!", 255, 0, 0) end if (isPlayerInTeam(localPlayer, "Police Force") or isPlayerInTeam(localPlayer, "Police") or isPlayerInTeam(localPlayer, "Government") or isPlayerInTeam(localPlayer, "SWAT")) then exports.CORtexts:output("You have entered a no-camping zone.", 0, 255, 0) setPedWeaponSlot(localPlayer, 0) exports.CIFhelp:modTextBar("campHandler", "Protected, no camp area", 0, 255, 0) else setPedWeaponSlot(localPlayer, 0) exports.CIFhelp:modTextBar("campHandler", "Protected, no camp area", 0, 255, 0) end end 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