Jump to content

Is that code cheating?


zezim

Recommended Posts

Hey guys, I would like to know if this code has cheats that players can catch. Can you tell me if this code has cheat?

What does that mean? Could you take a look at the code if you have time please?

Thanks for listening


	  if GodMode == true then
		setElementData(PlayerID,"blood",999999999999999)

The complete code:

Quote
function sendMsg(iplayer,msg)
  outputChatBox ( msg, iplayer, 255, 0, 0, true )
end

function EnterPlace ( theElement )
local veh = getPedOccupiedVehicle(theElement)
local accName = getAccountName(getPlayerAccount(theElement))
  if HabilitarAdmin == true then
	if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) ) then
	  return
	end
  end
  if (getElementType ( theElement ) == "player") and (PlayerHaveLevel (theElement) == false) then
	sendMsg(theElement,MsgInvasao)
	if veh then
	  setElementPosition( veh, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3])
	else
	  setElementPosition( theElement, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3])
	end
	sendMsgOwners(theElement)
  elseif getElementType ( theElement ) == "vehicle" then
	SetVehicleGodMode(theElement,true)
  end
end

function ExitPlace ( theElement )
  if GodMode == true then
	setElementData(theElement,"blood",12000)
  end
  if NaoAtirar == true then
  toggleControl(theElement, "fire", true)
  toggleControl(theElement, "vehicle_fire", true)
  toggleControl(theElement, "vehicle_secondary_fire", true)
  toggleControl(theElement, "aim_weapon", true)
  end
  if getElementType ( theElement ) == "vehicle" then
	SetVehicleGodMode(theElement,false)
  end
end

function PlayerHaveLevel( PlayerID )
  if GroupNameBy == 1 then
	if ( getElementData ( PlayerID , "gang" ) == GroupName ) then
	  if GodMode == true then
		setElementData(PlayerID,"blood",999999999999999)
	  end
	  if NaoAtirar == true then
		toggleControl (PlayerID, "fire", false)
		toggleControl (PlayerID, "vehicle_fire", false)
		toggleControl (PlayerID, "vehicle_secondary_fire", false)
		toggleControl (PlayerID, "aim_weapon", false)
	  end
	  return true
	else
	  return false
	end
  else
	local accName = getAccountName ( getPlayerAccount ( PlayerID ) )
	if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName ) ) ) then
	  if GodMode == true then
		setElementData(PlayerID,"blood",999999999999999)
	  end
	  if NaoAtirar == true then
		toggleControl (PlayerID, "fire", false)
		toggleControl (PlayerID, "vehicle_fire", false)
		toggleControl (PlayerID, "vehicle_secondary_fire", false)
		toggleControl (PlayerID, "aim_weapon", false)
	  end
	  return true
	else
	  return false
	end
  end
end

function ResourceStart( )
	LoadLocations()
	CreateCollision()
end
addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ),ResourceStart)

function LoadLocations()
	local RX, RY, RZ, WRX, WRX, WRX
	if(RestricLocation["location1"][1] > RestricLocation["location2"][1]) then
		RestricLocation["maxx"] = RestricLocation["location1"][1]
		RestricLocation["minx"] = RestricLocation["location2"][1]
	else
		RestricLocation["maxx"] = RestricLocation["location2"][1]
		RestricLocation["minx"] = RestricLocation["location1"][1]
	end
	if(RestricLocation["location1"][2] > RestricLocation["location2"][2]) then
		RestricLocation["maxy"] = RestricLocation["location1"][2]
		RestricLocation["miny"] = RestricLocation["location2"][2]
	else
		RestricLocation["maxy"] = RestricLocation["location2"][2]
		RestricLocation["miny"] = RestricLocation["location1"][2]
	end
	if(RestricLocation["location1"][3] > RestricLocation["location2"][3]) then
		RestricLocation["maxz"] = RestricLocation["location1"][3]
		RestricLocation["minz"] = RestricLocation["location2"][3]
	else
		RestricLocation["maxz"] = RestricLocation["location2"][3]
		RestricLocation["minz"] = RestricLocation["location1"][3]
	end
end

function CreateCollision()
	RX = RestricLocation["minx"]
	WRX = RestricLocation["maxx"] - RestricLocation["minx"]
	RY = RestricLocation["miny"]
	WRY = RestricLocation["maxy"] - RestricLocation["miny"]
	RZ = RestricLocation["minz"]
	WRZ = RestricLocation["maxz"] - RestricLocation["minz"]
	ColCuboid = createColCuboid ( RX, RY, RZ, WRX, WRY, WRZ )
	if ColCuboid then
		addEventHandler ( "onColShapeHit", ColCuboid, EnterPlace )
		addEventHandler ( "onColShapeLeave", ColCuboid, ExitPlace )
	else
		outputDebugString("Erro, verifique: location1 e location2")
	end
end

function ResourceStop( )
	destroyElement ( ColCuboid )
end
addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ),ResourceStop)

function sendMsgOwners( PlayerID )
	local connectedPlayers = getElementsByType ( "player" )
	for i, aPlayer in ipairs(connectedPlayers) do
		if(PlayerHaveLevel (aPlayer) == true) then
			sendMsg(aPlayer," O Jogador " ..getPlayerName ( PlayerID ) .." esta tentando invadir a sua BASE !")
		end
	end
end

function SetVehicleGodMode( VehicleID, godEoD )
	if EnableVehicleGodMode == true then
		setElementData(VehicleID, "godmode", godEoD)
		setVehicleDamageProof (VehicleID, godEoD )
	end
end

 

 

Edited by zezim
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...