Category:TODO: Example
These are the pages that requires Examples.
If you are able to put a working example, then we will be very thankful for your contribution.
Requirements
- Should be fully clear and working example
- Should be in a code block.
- Client-side scripts must be in red 'client-side' containers and server-side scripts must be in blue 'server-side' containers.
Example:
That's example will just call server side event, from client, if player screen size not a 1280x1024.
Client-Side
let checkResolution = () => { let res = mp.game.graphics.getScreenActiveResolution(x, y); if (!((res.x == 1280) && (res.y == 1024))) { mp.events.callRemote("kickMeImBad", res.x, res.y); }; }; checkResolution();
Server-Side
let blahBlah = (player, sx, sy) => { console.log(`${player.name} bad boy :c, his screen size ${sx}x${sy}`); player.kick(); }; mp.events.add("kickMeImBad", blahBlah);
- Description for the code block you provided.
When you finish your example, Don't forget to remove the [[Category:TODO: Example]].
Pages in category "TODO: Example"
The following 200 pages are in this category, out of 6,570 total.
(previous page) (next page)A
- Audio::activateSlowmoMode
- Audio::addEntityToMixGroup
- Audio::addLineToConversation
- Audio::addPedToConversation
- Audio::blipSiren
- Audio::blockDeathJingle
- Audio::cancelCurrentPoliceReport
- Audio::cancelMusicEvent
- Audio::canPedSpeak
- Audio::clearAllBrokenGlass
- Audio::clearAmbientZoneListState
- Audio::clearAmbientZoneState
- Audio::clearCustomRadioTrackList
- Audio::copyCategoryVariables
- Audio::createNewScriptedConversation
- Audio::deactivateSlowmoMode
- Audio::disablePedPain
- Audio::distantCopCarSirens
- Audio::doesPlayerVehHaveRadio
- Audio::enableStallWarningSounds
- Audio::enableVehicleExhaustPops
- Audio::enableVehicleFanbeltDamage
- Audio::findRadioStationIndex
- Audio::forcePedPanicWalla
- Audio::forceRadioTrackListPosition
- Audio::forceVehicleEngine
- Audio::freezeMicrophone
- Audio::freezeRadioStation
- Audio::getAmbientVoiceNameHash
- Audio::getAudibleMusicTrackTextId
- Audio::getCategoryVariable
- Audio::getCurrentRadioStationHash
- Audio::getCurrentScriptedConversationLine
- Audio::getIsPreloadedConversationReady
- Audio::getMusicPlaytime
- Audio::getMusicVolSlider
- Audio::getNetworkIdFromSoundId
- Audio::getNumberOfPassengerVoiceVariations
- Audio::getNumUnlockedRadioStations
- Audio::getPlayerHeadsetSoundAlternate
- Audio::getPlayerRadioStationGenre
- Audio::getPlayerRadioStationIndex
- Audio::getPlayerRadioStationName
- Audio::getRadioStationName
- Audio::getSoundId
- Audio::getSoundIdFromNetworkId
- Audio::getStreamPlayTime
- Audio::getVehicleDefaultHorn
- Audio::getVehicleDefaultHornIgnoreMods
- Audio::getVehicleDefaultHornVariation
- Audio::hasMultiplayerDataLoaded
- Audio::hasMultiplayerDataUnloaded
- Audio::hasSoundFinished
- Audio::hintAmbientAudioBank
- Audio::hintAmbientBank
- Audio::hintScriptAudioBank
- Audio::hintScriptBank
- Audio::interruptConversation
- Audio::interruptConversationAndPause
- Audio::isAlarmPlaying
- Audio::isAmbientSpeechDisabled
- Audio::isAmbientSpeechPlaying
- Audio::isAmbientZoneEnabled
- Audio::isAnimalVocalizationPlaying
- Audio::isAnySpeechPlaying
- Audio::isAudioSceneActive
- Audio::isGameInControlOfMusic
- Audio::isHornActive
- Audio::isMissionCompletePlaying
- Audio::isMissionCompleteReadyForUi
- Audio::isMissionNewsStoryUnlocked
- Audio::isMobilePhoneCallOngoing
- Audio::isMobilePhoneRadioActive
- Audio::isMusicOneshotPlaying
- Audio::isPedInCurrentConversation
- Audio::isPedRingtonePlaying
- Audio::isPlayerVehRadioEnable
- Audio::isRadioFadedOut
- Audio::isRadioRetuning
- Audio::isSceneActive
- Audio::isScriptedConversationLoaded
- Audio::isScriptedConversationOngoing
- Audio::isScriptedMusicPlaying
- Audio::isScriptedMusicPlaying2
- Audio::isScriptedSpeechPlaying
- Audio::isStreamPlaying
- Audio::isVehicleAudiblyDamaged
- Audio::isVehicleRadioEnabled
- Audio::isVehicleRadioLoud
- Audio::linkStaticEmitterToEntity
- Audio::loadStream
- Audio::loadStreamWithStartOffset
- Audio::lockRadioStation
- Audio::lockRadioStationTrackList
- Audio::overrideMicrophoneSettings
- Audio::overridePlayerGroundMaterial
- Audio::overrideTrevorRage
- Audio::overrideUnderwaterStream
- Audio::overrideVehHorn
- Audio::pauseScriptedConversation
- Audio::playAmbientSpeechAtCoords
- Audio::playAmbientSpeechFromPositionNative
- Audio::playAmbientSpeechWithVoice
- Audio::playAnimalVocalization
- Audio::playDeferredSoundFrontend
- Audio::playEndCreditsMusic
- Audio::playMissionComplete
- Audio::playMissionCompleteAudio
- Audio::playPain
- Audio::playPedAmbientSpeechAndCloneNative
- Audio::playPedAmbientSpeechNative
- Audio::playPedAmbientSpeechWithVoiceNative
- Audio::playPedRingtone
- Audio::playPoliceReport
- Audio::playSound
- Audio::playSoundFromCoord
- Audio::playSoundHash
- Audio::playStreamFromObject
- Audio::playStreamFromPed
- Audio::playStreamFromPosition
- Audio::playStreamFromVehicle
- Audio::playStreamFrontend
- Audio::playSynchronizedAudioEvent
- Audio::playSynchronizedEvent
- Audio::playVehicleDoorCloseSound
- Audio::playVehicleDoorOpenSound
- Audio::preloadScriptConversation
- Audio::preloadScriptPhoneConversation
- Audio::preloadVehicle
- Audio::prepareAlarm
- Audio::prepareMusicEvent
- Audio::prepareSynchronizedAudioEvent
- Audio::prepareSynchronizedAudioEventForScene
- Audio::prepareSynchronizedEvent
- Audio::prepareSynchronizedEventForScene
- Audio::recordBrokenGlass
- Audio::registerScriptWith
- Audio::registerScriptWithAudio
- Audio::releaseAmbientBank
- Audio::releaseMissionBank
- Audio::releaseNamedScriptAudioBank
- Audio::releaseNamedScriptBank
- Audio::releaseScriptBank
- Audio::releaseSoundId
- Audio::releaseWeapon
- Audio::removeEntityFromMixGroup
- Audio::removePortalSettingsOverride
- Audio::requestAmbientAudioBank
- Audio::requestAmbientBank
- Audio::requestMissionAudioBank
- Audio::requestMissionBank
- Audio::requestScriptAudioBank
- Audio::requestScriptBank
- Audio::requestTennisBanks
- Audio::resetPedAudioFlags
- Audio::resetPedFlags
- Audio::resetTrevorRage
- Audio::resetVehicleStartupRevSound
- Audio::restartScriptedConversation
- Audio::restoreCategoryVariables
- Audio::setAggressiveHorns
- Audio::setAmbientVoiceName
- Audio::setAmbientVoiceNameHash
- Audio::setAmbientZoneListState
- Audio::setAmbientZoneListStatePersistent
- Audio::setAmbientZoneState
- Audio::setAmbientZoneStatePersistent
- Audio::setAnimalMood
- Audio::setAudioFlag
- Audio::setAudioSceneVariable
- Audio::setCategoryVariable
- Audio::setCustomRadioTrackList
- Audio::setCutsceneAudioOverride
- Audio::setCutsceneOverride
- Audio::setEmitterRadioStation
- Audio::setFlag
- Audio::setFrontendRadioActive
- Audio::setGpsActive
- Audio::setHornEnabled
- Audio::setHornPermanentlyOn
- Audio::setHornPermanentlyOnTime
- Audio::setInitialPlayerStation
- Audio::setMicrophonePosition
- Audio::setMobilePhoneRadioState
- Audio::setMobileRadioEnabledDuringGameplay
- Audio::setPedFootstepLoud
- Audio::setPedFootstepQuiet
- Audio::setPedGender
- Audio::setPedIsDrunk
- Audio::setPedScream
- Audio::setPedVoiceGroup
- Audio::setPlayerAngry
- Audio::setPortalSettingsOverride
- Audio::setRadioAutoUnfreeze
- Audio::setRadioFrontendFadeTime
- Audio::setRadioStationIsVisible
- Audio::setRadioStationMusicOnly
- Audio::setRadioToStationIndex
- Audio::setRadioToStationName
- Audio::setRadioTrack