megaman54 Posted December 9, 2010 Share Posted December 9, 2010 Hi! I have made a anticheat that kicks players if they equip a minigun or something and if they enter a rhino. But, i want this anticheat to ignore admins and moderators, how to do this? And in another script i found a function like isPlayerAdmin() is this function hardcoded? I dint found it at wiki But anyway here is the anticheat script: function illegalweapon ( previousWeaponID, currentWeaponID ) if currentWeaponID == 38 or currentWeaponID == 35 or currentWeaponID == 36 then local weapon = getWeaponNameFromID ( currentWeaponID ) kickPlayer ( source, " AC detected ".. weapon) outputChatBox("Cheater/Bug Abuser kicked!", getRootElement(), 255, 0, 0) outputServerLog("ANTICHEAT: kicked abuser/cheater.") end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), illegalweapon ) function kickCheat ( theVehicle, seat, jacked ) if ( getElementModel ( theVehicle ) == 432 ) then kickPlayer ( source, " AntiCheat detected a Rhino. " ) outputChatBox("Cheater/Bug Abuser kicked!", getRootElement(), 255, 0, 0) outputServerLog("ANTICHEAT: kicked abuser/cheater.") end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), kickCheat ) Link to comment
Beluga Posted December 9, 2010 Share Posted December 9, 2010 (edited) function illegalweapon ( previousWeaponID, currentWeaponID ) if not isObjectInACLGroup (source, aclGetGroup ( "Admin" ) ) then if currentWeaponID == 38 or currentWeaponID == 35 or currentWeaponID == 36 then local weapon = getWeaponNameFromID ( currentWeaponID ) kickPlayer ( source, " AC detected ".. weapon) outputChatBox("Cheater/Bug Abuser kicked!", getRootElement(), 255, 0, 0) outputServerLog("ANTICHEAT: kicked abuser/cheater.") end end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), illegalweapon ) function kickCheat ( theVehicle, seat, jacked ) if not isObjectInACLGroup (source, aclGetGroup ( "Admin" ) ) then if ( getElementModel ( theVehicle ) == 432 ) then kickPlayer ( source, " AntiCheat detected a Rhino. " ) outputChatBox("Cheater/Bug Abuser kicked!", getRootElement(), 255, 0, 0) outputServerLog("ANTICHEAT: kicked abuser/cheater.") end end end Edited December 9, 2010 by Guest Link to comment
Taliban Posted December 9, 2010 Share Posted December 9, 2010 Stop try make it. You have got 1-5 anti cheats on community. Link to comment
Castillo Posted December 9, 2010 Share Posted December 9, 2010 taliban, its not your bussines if he wants to create his own, i call that off-topic Link to comment
Static-X Posted December 10, 2010 Share Posted December 10, 2010 Agreed, you have no right of stopping a guy from making his own script. Link to comment
megaman54 Posted December 10, 2010 Author Share Posted December 10, 2010 So true solidsnake14 and Static-X and big thanks for Beluga for this code piece Link to comment
dukenukem Posted December 10, 2010 Share Posted December 10, 2010 Stop try make it. You have got 1-5 anti cheats on community. 1- true 2- false Yes on community exist these scripts but he maybe make new shits . Link to comment
Nitride Posted August 17, 2011 Share Posted August 17, 2011 what is the meta for this script and do i have to change anything in the script to make it work on my server Link to comment
TAPL Posted August 17, 2011 Share Posted August 17, 2011 you may use event onClientPlayerWeaponSwitch Instead of onPlayerWeaponSwitch because onPlayerWeaponSwitch can't Discovery the weapons from Cheat Programs i don't know if it now fixed or not but i was tested that from long ago Link to comment
Nitride Posted August 18, 2011 Share Posted August 18, 2011 what is the meta . i would like to use this on my server Link to comment
denny199 Posted August 18, 2011 Share Posted August 18, 2011 what is the meta . i would like to use this on my server Well, If you want this script, try first to make it on yourself and btw, this offtopic Link to comment
will briggs Posted August 18, 2011 Share Posted August 18, 2011 And btw, This is a topic from 2 years ago And if you cant even work out the meta, maybe you should try learning how to program... https://wiki.multitheftauto.com 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