IsWorldSpecialPropertyEnabled: Difference between revisions
Jump to navigation
Jump to search
CrosRoad95 (talk | contribs) (fixed example style) |
|||
Line 22: | Line 22: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function clientCheatScan() | function clientCheatScan() | ||
glp = getLocalPlayer() | |||
if isWorldSpecialPropertyEnabled("aircars") then | |||
clientCheat() | |||
end | |||
if isWorldSpecialPropertyEnabled("hovercars") then | |||
clientCheat() | |||
end | |||
if isWorldSpecialPropertyEnabled("extrabunny") then | |||
clientCheat() | |||
end | |||
if isWorldSpecialPropertyEnabled("extrajump") then | |||
clientCheat() | |||
end | |||
end | end | ||
setTimer(clientCheatScan, 15000, 0) | setTimer(clientCheatScan, 15000, 0) | ||
function clientCheat() -- This function will send them to hell. | function clientCheat() -- This function will send them to hell. | ||
fadeCamera(false, 1, 255, 0, 0) | |||
x,y,z = getElementPosition(glp) | |||
createExplosion(x,y,z, 1) | |||
toggleAllControls(false, true, true) | |||
createMarker(x,y,z, "cylinder", 1, 1, 1, 1) | |||
setTimer(clientCheat, 200, 1) | |||
outputChatBox("WELCOME TO CHEATERS HELL LMAO!") | |||
end | end | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 19:58, 9 July 2018
Checks if a special world property (cheat) is enabled or not.
Syntax
bool isWorldSpecialPropertyEnabled ( string propname )
Required Arguments
- propname: the name of the property to retrieve. Possible values are:
- hovercars
- aircars
- extrabunny
- extrajump
Returns
Returns true if the property is enabled, false if it is disabled or the specified property name is invalid.
Example
Click to collapse [-]
Clientside exampleThis example detects any cheaters using these cheats on your server and sends them to hell, or you could kick them if you trigger a server event which does that.
function clientCheatScan() glp = getLocalPlayer() if isWorldSpecialPropertyEnabled("aircars") then clientCheat() end if isWorldSpecialPropertyEnabled("hovercars") then clientCheat() end if isWorldSpecialPropertyEnabled("extrabunny") then clientCheat() end if isWorldSpecialPropertyEnabled("extrajump") then clientCheat() end end setTimer(clientCheatScan, 15000, 0) function clientCheat() -- This function will send them to hell. fadeCamera(false, 1, 255, 0, 0) x,y,z = getElementPosition(glp) createExplosion(x,y,z, 1) toggleAllControls(false, true, true) createMarker(x,y,z, "cylinder", 1, 1, 1, 1) setTimer(clientCheat, 200, 1) outputChatBox("WELCOME TO CHEATERS HELL LMAO!") end
See Also
- areTrafficLightsLocked
- createSWATRope
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getBirdsEnabled
- getCloudsEnabled
- getCoronaReflectionsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGarageBoundingBox
- getGaragePosition
- getGarageSize
- getGravity
- getGroundPosition
- getHeatHaze
- getInteriorFurnitureEnabled
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getNearClipDistance
- getOcclusionsEnabled
- getPedsLODDistance
- getPlayerBlurLevel
- getRainLevel
- getRoofPosition
- getScreenFromWorldPosition
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getVehiclesLODDistance
- getWeather
- getWindVelocity
- getWorldFromScreenPosition
- getZoneName
- isAmbientSoundEnabled
- isGarageOpen
- isLineOfSightClear
- isWorldSoundEnabled
- isWorldSpecialPropertyEnabled
- processLineOfSight
- removeWorldModel
- resetAmbientSounds
- resetBlurLevel
- resetColorFilter
- resetCoronaReflectionsEnabled
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetNearClipDistance
- resetPedsLODDistance
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetVehiclesLODDistance
- resetWindVelocity
- resetWorldSounds
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setAmbientSoundEnabled
- setBirdsEnabled
- setCloudsEnabled
- setColorFilter
- setCoronaReflectionsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorFurnitureEnabled
- setInteriorSoundsEnabled
- setJetpackMaxHeight
- setMinuteDuration
- setMoonSize
- setNearClipDistance
- setOcclusionsEnabled
- setPedsLODDistance
- setPlayerBlurLevel
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightsLocked
- setTrafficLightState
- setVehiclesLODDistance
- setWeather
- setWeatherBlended
- setWindVelocity
- setWorldSoundEnabled
- setWorldSpecialPropertyEnabled
- testLineAgainstWater