Captain Cody Posted July 19, 2016 Posted July 19, 2016 function prison(player, cmd) if player then wantedlevel = getPlayerWantedLevel(Player) local playerTeam = getPlayerTeam ( Police Service ) local playerTeam2 = getPlayerTeam ( Criminals ) local jX, jY, jZ = getElementPosition (playerTeam) local pX, pY, pZ = getElementPosition (playerTeam2) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) if ( wantedlevel == 0 ) then exports.CORtexts:output("You can't use this command when not wanted!", player, 0, 255, 0) return end if dist > 149 then exports.CORtexts:output("You can't use this command when near a cop !", plyer, 0, 255, 0) return end end exports.CIFprison:sendPlayerToPrison(player, false) end addCommandHandler("surrender", prison)
Bonsai Posted July 19, 2016 Posted July 19, 2016 Original posts should be auto quoted. And that guy should be banned.
DonOmar Posted July 19, 2016 Author Posted July 19, 2016 i don't wanna anyone to take my code just it.
Et-win Posted July 19, 2016 Posted July 19, 2016 Then make a quick example code, just like I always do.
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