16.01.2015, 15:24
I saw in some servers that in the chat it says "%s has been banned for trying to crash the server"
Is there any tutorial about anti crash ?
Is there any tutorial about anti crash ?
"Vehicle component crasher" = Add code to OnVehicleMod to check if the component being synced is not valid for the vehicle (return 0 if it is bad). Look for a post by JernejL with this code.
"Bullet crasher (Player)" = Add code to OnPlayerWeaponShot to check the type of shot. If the player is shooting themselves (not possible) then do not sync it (return 0). If the bullet hit location is outside what would be considered a normal range then do not sync it (return 0). If the bullet hit location is INF or NaN then kick/ban and do not sync it (return 0). Look for code on the forum to do this if you need more help. "Bullet crasher (Vehicle)" = Same as above for "Bullet crasher (Weapon)". "Train crasher" = Add code to OnPlayerUpdate or a timer that checks the train and trams Z position. If it is outside the range of -10 to 100 then it is not valid. In OnPlayerUpdate you could de-sync this data (return 0) or in a timer you could alert admins and kick/ban the player. "Attached object crasher" = Add code to OnPlayerEditAttachedObject to check the model ID returned is valid. You should not attach an object in this callback using the model ID that is returned... it should be stored in a variable elsewhere when the player first starts editing the attached object. |