Kenix Posted March 8, 2011 Posted March 8, 2011 please help me a lot to do spawn protect script but due to the anti-cheat MTA he kick a player. function saveSpawn ( ) startSaveSpawn() end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), saveSpawn ) function startSaveSpawn () noSpawnKill = exports.extrahealth:setElementExtraHealth ( getLocalPlayer(), 100000 ) setElementAlpha(getLocalPlayer(), 50) setTimer(removeSaveSpawn,8000,1) end function removeSaveSpawn () exports.extrahealth:takeElementExtraHealth(getLocalPlayer(),noSpawnKill) setElementAlpha(getLocalPlayer(), 255) end
Kenix Posted March 8, 2011 Author Posted March 8, 2011 i have this script but I still kick function saveSpawn ( ) startSaveSpawn() end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), saveSpawn ) function startSaveSpawn () setElementAlpha(getLocalPlayer(), 50) setElementData(getLocalPlayer() , "sp_prot", true ); setTimer(removeSaveSpawn,8000,1) end function removeSaveSpawn () setElementData(getLocalPlayer() , "sp_prot", false ); setElementAlpha(getLocalPlayer(), 255) end function saveSpawn ( ) if getElementData( source, "sp_prot" ) then cancelEvent() end; end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), saveSpawn )
Castillo Posted March 9, 2011 Posted March 9, 2011 If you won't be kicked, you must disable that anti cheat part at mtaserver.conf (i forgot which number was the AC for this)
Kenix Posted March 10, 2011 Author Posted March 10, 2011 If you won't be kicked, you must disable that anti cheat part at mtaserver.conf (i forgot which number was the AC for this) No but as you can get around like a cheat I know that some servers have a script spawn protect. likely to script is not correct
Castillo Posted March 10, 2011 Posted March 10, 2011 Volk-rus, please don't TRIPLE post! wait for someone else to answer.
Kenix Posted March 11, 2011 Author Posted March 11, 2011 i am fixed function saveSpawn ( ) setElementData(getLocalPlayer() , "sp_prot", true ); setElementAlpha(getLocalPlayer(), 50) setTimer(removeSaveSpawn,8000,1) end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), saveSpawn ) function removeSaveSpawn () setElementData(getLocalPlayer() , "sp_prot", false ); setElementAlpha(getLocalPlayer(), 255) end function onSaveSpawn ( ) if getElementData( getLocalPlayer(), "sp_prot" ) then cancelEvent() end; end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), onSaveSpawn ) but now appears another error anti cheat sometimes kick and when you spawn and shoot at you then you have 0 hp and 8 seconds later you die. = (
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