<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZEvS</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZEvS"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/ZEvS"/>
	<updated>2026-05-23T17:31:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CopyAccountData&amp;diff=25025</id>
		<title>CopyAccountData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CopyAccountData&amp;diff=25025"/>
		<updated>2011-01-09T12:13:33Z</updated>

		<summary type="html">&lt;p&gt;ZEvS: Updated Examle.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function copies all of the data from one account to another.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool copyAccountData ( account theAccount, account fromAccount )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theAccount:''' The account you wish to copy the data ''to''.&lt;br /&gt;
*'''fromAccount:''' The account you wish to copy the data ''from''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''true'' if the accounts were valid, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example copies the account data from the 'guest' to a registered account when they login&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function copyDataOnLogin ( previousAccount, currentAccount, autoLogin)&lt;br /&gt;
  copyAccountData ( currentAccount, previousAccount )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerLogin&amp;quot;, getRootElement(), copyDataOnLogin )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Account_functions}}&lt;/div&gt;</summary>
		<author><name>ZEvS</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Account_functions&amp;diff=25020</id>
		<title>Template:Account functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Account_functions&amp;diff=25020"/>
		<updated>2011-01-09T11:07:13Z</updated>

		<summary type="html">&lt;p&gt;ZEvS: sory by alphabet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[addAccount]]&lt;br /&gt;
*[[copyAccountData]]&lt;br /&gt;
*[[getAccount]]&lt;br /&gt;
*[[getAccountData]]&lt;br /&gt;
*[[getAccountName]]&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
*[[getAccountPlayer]]&lt;br /&gt;
}}&lt;br /&gt;
*[[getAccounts]]&lt;br /&gt;
*[[isGuestAccount]]&lt;br /&gt;
*[[logIn]]&lt;br /&gt;
*[[logOut]]&lt;br /&gt;
*[[removeAccount]]&lt;br /&gt;
*[[setAccountData]]&lt;br /&gt;
*[[setAccountPassword]]&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
*[[getAccountClient]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>ZEvS</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_vehicle_functions&amp;diff=25018</id>
		<title>Template:Client vehicle functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_vehicle_functions&amp;diff=25018"/>
		<updated>2011-01-09T11:05:00Z</updated>

		<summary type="html">&lt;p&gt;ZEvS: minor fix: getVehicleEngineState is available clientside, i updated list functions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[addVehicleUpgrade]]&lt;br /&gt;
*[[attachTrailerToVehicle]]&lt;br /&gt;
*[[blowVehicle]]&lt;br /&gt;
*[[createVehicle]]&lt;br /&gt;
*[[detachTrailerFromVehicle]]&lt;br /&gt;
*[[fixVehicle]]&lt;br /&gt;
*[[getVehicleAdjustableProperty]]&lt;br /&gt;
*[[getVehicleColor]]&lt;br /&gt;
*[[getVehicleCompatibleUpgrades]]&lt;br /&gt;
*[[getVehicleController]]&lt;br /&gt;
*[[getVehicleDoorState]]&lt;br /&gt;
*[[getVehicleEngineState]]&lt;br /&gt;
*[[getVehicleLandingGearDown]]&lt;br /&gt;
*[[getVehicleLightState]]&lt;br /&gt;
*[[getVehicleMaxPassengers]]&lt;br /&gt;
*[[getVehicleName]]&lt;br /&gt;
*[[getVehicleOccupant]]&lt;br /&gt;
*[[getVehicleOccupants]]&lt;br /&gt;
*[[getVehicleCurrentGear]]&lt;br /&gt;
*[[getVehicleOverrideLights]]&lt;br /&gt;
*[[getVehiclePaintjob]]&lt;br /&gt;
*[[getVehiclePanelState]]&lt;br /&gt;
*[[getVehiclePlateText]]&lt;br /&gt;
*[[getVehicleRotation]]&lt;br /&gt;
*[[getVehicleSirensOn]]&lt;br /&gt;
*[[getVehicleTowedByVehicle]]&lt;br /&gt;
*[[getVehicleTowingVehicle]]&lt;br /&gt;
*[[getVehicleTurnVelocity]]&lt;br /&gt;
*[[getVehicleTurretPosition]]&lt;br /&gt;
*[[getVehicleUpgradeOnSlot]]&lt;br /&gt;
*[[getVehicleUpgrades]]&lt;br /&gt;
*[[getVehicleUpgradeSlotName]]&lt;br /&gt;
*[[getVehicleWheelStates]]&lt;br /&gt;
*[[isVehicleDamageProof]]&lt;br /&gt;
*[[isVehicleFrozen]]&lt;br /&gt;
*[[isVehicleFuelTankExplodable]]&lt;br /&gt;
*[[isVehicleLocked]]&lt;br /&gt;
*[[isVehicleOnGround]]&lt;br /&gt;
*[[removeVehicleUpgrade]]&lt;br /&gt;
*[[setVehicleAdjustableProperty]]&lt;br /&gt;
*[[setVehicleColor]]&lt;br /&gt;
*[[setVehicleDamageProof]]&lt;br /&gt;
*[[setVehicleDirtLevel]]&lt;br /&gt;
*[[setVehicleDoorState]]&lt;br /&gt;
*[[setVehicleDoorsUndamageable]]&lt;br /&gt;
*[[setVehicleEngineState]]&lt;br /&gt;
*[[setVehicleFrozen]]&lt;br /&gt;
*[[setVehicleFuelTankExplodable]]&lt;br /&gt;
*[[setVehicleLandingGearDown]]&lt;br /&gt;
*[[setVehicleLightState]]&lt;br /&gt;
*[[setVehicleLocked]]&lt;br /&gt;
*[[setVehicleOverrideLights]]&lt;br /&gt;
*[[setVehiclePaintjob]]&lt;br /&gt;
*[[setVehiclePanelState]]&lt;br /&gt;
*[[setVehicleRotation]]&lt;br /&gt;
*[[setVehicleSirensOn]]&lt;br /&gt;
{{New feature|3.0110|1.1|&lt;br /&gt;
*[[setVehicleTurretPosition]]&lt;br /&gt;
}}&lt;br /&gt;
*[[setVehicleTurnVelocity]]&lt;br /&gt;
*[[setVehicleWheelStates]]&lt;br /&gt;
*[[getHelicopterRotorSpeed]]&lt;br /&gt;
*[[getTrainDirection]]&lt;br /&gt;
*[[getTrainSpeed]]&lt;br /&gt;
*[[getVehicleGravity]]&lt;br /&gt;
*[[getVehicleHeadLightColor]]&lt;br /&gt;
*[[getVehicleModelFromName]]&lt;br /&gt;
*[[getVehicleNameFromModel]]&lt;br /&gt;
*[[getVehicleType]]&lt;br /&gt;
*[[isTrainDerailable]]&lt;br /&gt;
*[[isTrainDerailed]]&lt;br /&gt;
*[[isVehicleBlown]]&lt;br /&gt;
*[[isVehicleTaxiLightOn]]&lt;br /&gt;
*[[setHelicopterRotorSpeed]]&lt;br /&gt;
*[[setTrainDerailable]]&lt;br /&gt;
*[[setTrainDerailed]]&lt;br /&gt;
*[[setTrainDirection]]&lt;br /&gt;
*[[setTrainSpeed]]&lt;br /&gt;
*[[setVehicleGravity]]&lt;br /&gt;
*[[setVehicleHeadLightColor]]&lt;br /&gt;
*[[setVehicleTaxiLightOn]]&lt;/div&gt;</summary>
		<author><name>ZEvS</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerConnect&amp;diff=24706</id>
		<title>OnPlayerConnect</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerConnect&amp;diff=24706"/>
		<updated>2010-12-11T00:05:19Z</updated>

		<summary type="html">&lt;p&gt;ZEvS: I make test and now i know that source this event is getRootElement() Sorry for my bad English&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a player attempts to connect to the server.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string playerNick, string playerIP, string playerUsername, string playerSerial, int playerVersionNumber, string playerVersionString&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''playerNick''': The player's current nickname.&lt;br /&gt;
*'''playerIP''': The player's current IP.&lt;br /&gt;
*'''playerUsername''': The player's community username.&lt;br /&gt;
*'''playerSerial''': The player's serial number.&lt;br /&gt;
''Extra parameter from 1.0.2 onwards:''&lt;br /&gt;
*'''playerVersionNumber''': The player's MTA version in pure numerical form, e.g. ''''256'''' for 1.0, ''''257'''' for 1.0.1, etc.&lt;br /&gt;
''Extra parameter from 1.0.4 onwards:''&lt;br /&gt;
*'''playerVersionString''': The player's MTA version in sortable string form. Same as the return value from [[getPlayerVersion]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the client's [[root element]].&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the player will be disconnected with an error message saying the reason specified in cancelEvent or &amp;quot;Disconnected: server refused the connection&amp;quot; if none was specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example cancels connection attempts of people who use the nick &amp;quot;Player&amp;quot; or outputs some data about the connecting player otherwise.&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--when a player connects&lt;br /&gt;
function playerConnect (playerNick, playerIP, playerUsername, playerSerial, playerVersionNumber)&lt;br /&gt;
    if playerNick == &amp;quot;Player&amp;quot; then --check if his nick is &amp;quot;Player&amp;quot;&lt;br /&gt;
        cancelEvent(true,&amp;quot;The nick \&amp;quot;Player\&amp;quot; is not allowed, please change it to something else. You can change your nick in Settings menu Multiplayer tab.&amp;quot;) --in that case refuse the connection&lt;br /&gt;
    else&lt;br /&gt;
        --output some data about the player&lt;br /&gt;
        outputChatBox (playerNick..&amp;quot; just connected to the server.&amp;quot;)&lt;br /&gt;
        outputChatBox (&amp;quot;IP: &amp;quot;..playerIP..&amp;quot; Username: &amp;quot;..playerUsername..&amp;quot; Serial: &amp;quot;..playerSerial)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--add the playerConnect function as a handler for onPlayerConnect&lt;br /&gt;
addEventHandler (&amp;quot;onPlayerConnect&amp;quot;, getRootElement(), playerConnect)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example cancels connection if player uses older MTA (older than 1.0.3)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onPlayerConnect&amp;quot;, getRootElement(),&lt;br /&gt;
    function ( _,_,_,_, clientVersion )&lt;br /&gt;
        if ( clientVersion &amp;lt; 259 ) then&lt;br /&gt;
            cancelEvent( true, &amp;quot;Update your MTA before you join this server!&amp;quot; );&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example show the player in the Chatbox if connect the Server&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function playerConnect(playerNick, playerIP, playerUsername, playerSerial, playerVersionNumber)&lt;br /&gt;
    outputChatBox(&amp;quot;* &amp;quot; .. playerNick .. &amp;quot; has connected the Server.&amp;quot;, getRootElement(), 255, 100, 100, false)&lt;br /&gt;
    -- Show the Player Connect the Server, for all Users good&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerConnect&amp;quot;, getRootElement(), playerConnect)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>ZEvS</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Snert&amp;diff=24679</id>
		<title>User:Snert</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Snert&amp;diff=24679"/>
		<updated>2010-12-10T01:15:20Z</updated>

		<summary type="html">&lt;p&gt;ZEvS: /* Server-side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Resources==&lt;br /&gt;
&lt;br /&gt;
===Debug monitor===&lt;br /&gt;
&lt;br /&gt;
Resource to easily be able to view server and client debug messages. (remotely)&lt;br /&gt;
&lt;br /&gt;
Created as an example to demonstrate the use of on(Client)DebugMessage.&lt;br /&gt;
&lt;br /&gt;
Images:&lt;br /&gt;
  Server-side debug message viewer: http://dl.dropbox.com/u/4504893/images/debugmonitor_editor_s.png&lt;br /&gt;
  Client-side debug message viewer: http://dl.dropbox.com/u/4504893/images/debugmonitor_editor_c.png&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/4504893/misc/debugmonitor.zip Download] ('''Note:''' Only works in 1.1 r2091 and later)&lt;br /&gt;
&lt;br /&gt;
===Camo vehicles===&lt;br /&gt;
&lt;br /&gt;
When this resource is enabled, boats will get the same color as the water, and planes will get the same color as the sky. What's not to like?&lt;br /&gt;
&lt;br /&gt;
Created as an example to demonstrate the use of getWaterColor, getSkyGradient and RGB vehicle colors.&lt;br /&gt;
&lt;br /&gt;
  Camoplane example: http://www.xfire.com/video/3bcb4b/&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/4504893/misc/camovehs.zip Download] ('''Note:''' Only works in 1.1 r2093 and later)&lt;br /&gt;
&lt;br /&gt;
==Function suggestions==&lt;br /&gt;
&lt;br /&gt;
Some functions I should work on sometime soon. (sort of my &amp;quot;TODO&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===Server-side===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getAllAccountData ( account theAccount )&lt;br /&gt;
bool setAllAccountData ( account theAccount, table theData )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Client-side===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- None at the moment&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Both===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setVehicleNitrousActivated ( vehicle theVehicle, bool toggle ) -- Being able to influence NOS would be great (should block GTA from disabling it as well)&lt;br /&gt;
isVehicleNitrousActivated ( vehicle theVehicle ) -- Obvious function is obvious&lt;br /&gt;
setVehicleNitrousRechargeDelay ( vehicle theVehicle, int delay ) -- Function to set the amount of time the driver has to wait to reactivate NOS&lt;br /&gt;
getVehicleNitrousRechargeDelay ( vehicle theVehicle )&lt;br /&gt;
&lt;br /&gt;
setStreetLightsEnabled ( bool toggle ) -- Got to try and find the address for this first though&lt;br /&gt;
setBackgroundGunshotsEnabled ( bool toggle ) -- Gotta find this one as well.. again...&lt;br /&gt;
setBirdsEnabled ( bool toggle ) -- I hate those pesky poopers at times.. Besides, it doesn't fit in some circumstances.. There seems to be a function for this in the source&lt;br /&gt;
areStreetLightsEnabled ( )&lt;br /&gt;
areBackgroundGunshotsEnabled ( )&lt;br /&gt;
areBirdsEnabled ( )&lt;br /&gt;
&lt;br /&gt;
setPedBreath ( ped thePed, float breath ) -- For breath, as used underwater. Gotta find a way to set it for all peds, not just for the local player&lt;br /&gt;
getPedBreath ( ped thePed )&lt;br /&gt;
&lt;br /&gt;
isEventAdded ( string eventName ) -- Should be fairly obvious&lt;br /&gt;
isEventHandlerAdded ( string eventName, element attachedTo[, function handlerFunction ] ) -- Should be fairly obvious as well&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Event suggestions==&lt;br /&gt;
&lt;br /&gt;
Events which might be quite useful. I should work on these sometime soon.&lt;br /&gt;
&lt;br /&gt;
===Server-side===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
onElementCreate ( ) -- Triggered when an element was created&lt;br /&gt;
onVehicleNitrousActivated ( ) -- Should be fairly obvious&lt;br /&gt;
onVehicleNitrousDeactivated ( ) -- Should be fairly obvious&lt;br /&gt;
onVehicleTireStateChanged ( int tire, int state ) -- If you'd want vehicles with bulletproof wheels or something, you'd need to detect the state change first&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Client-side===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
onClientElementCreate ( ) -- See server-side&lt;br /&gt;
onClientVehicleNitrousActivated ( ) -- See server-side&lt;br /&gt;
onClientVehicleNitrousDeactivated ( ) -- See server-side&lt;br /&gt;
onClientVehicleTireStateChanged ( int tire, int state ) -- See server-side&lt;br /&gt;
onClientVehicleDamage ( float loss ) -- Server-side version already exists, if only there'd be an easy way for it client-side...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FX functions==&lt;br /&gt;
&lt;br /&gt;
Doomed_Space_Marine did [http://www.youtube.com/watch?v=mifR-dyFx6s|some research on some particle effects on custom models]. It would be very cool if we could make functions to do this instead, like we already can with some particle effects. (for instance: [[fxAddBlood]]) This would especially be very cool if we would be able to alter the fx, so for instance we could create colored smoke.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
fxAddHeliKillBlood&lt;br /&gt;
fxAddCarWashEffect&lt;br /&gt;
fxAddCement&lt;br /&gt;
fxAddClouds -- Note: It's a rather vague type of effect&lt;br /&gt;
fxAddCokeTrail&lt;br /&gt;
fxAddShower -- Note: Classed as &amp;quot;some water effect&amp;quot;, but unknown what type of water effect. Assuming shower&lt;br /&gt;
fxAddSmoke&lt;br /&gt;
fxAddPour -- Seems more like it should be fxAddPee or fxAddPiss though&lt;br /&gt;
fxAddLeaves&lt;br /&gt;
fxAddSpray&lt;br /&gt;
fxAddFireExtinghuiserEffect&lt;br /&gt;
fxAddFlamethrowerFlame&lt;br /&gt;
fxAddInsects&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Weather functions==&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' This section is for serious weathermen only!&lt;br /&gt;
&lt;br /&gt;
I recently noticed how many functions MTA actually has to influence the weather. It would be quite awesome if we would be able to influence litterally every factor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- We currently have&lt;br /&gt;
setWaveHeight&lt;br /&gt;
setSkyGradient&lt;br /&gt;
setWindVelocity&lt;br /&gt;
setCloudsEnabled&lt;br /&gt;
setWaterColor&lt;br /&gt;
setRainLevel&lt;br /&gt;
setFogDistance&lt;br /&gt;
&lt;br /&gt;
-- We'll need&lt;br /&gt;
setHeatWaveIntensity&lt;br /&gt;
setLightningEnabled&lt;br /&gt;
setLightOnGround&lt;br /&gt;
setSunStuff -- Some stuff concerning the sun in timecyc.dat, gotta see what I can make out of that&lt;br /&gt;
setShadowStuff -- Same here&lt;br /&gt;
setMoonSize -- Like if you shoot the moon, it resizes. Hopefully it will be possible to hide it altogether, or make some sort of half-moon out of it&lt;br /&gt;
setSandStormEnabled&lt;br /&gt;
-- Prolly the heck of a lot more&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.S. x86: fix setWeatherBlended, nao&lt;br /&gt;
&lt;br /&gt;
==Memory addresses==&lt;br /&gt;
&lt;br /&gt;
Here are a couple of memory addresses which might be useful for implementing new functions, so I can't forget them.&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&lt;br /&gt;
Variables I've discovered through playing around with Cheat Engine&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Purpose&lt;br /&gt;
! Address&lt;br /&gt;
! Address type&lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| LS Street lights enabler&lt;br /&gt;
| 0x0960CF4&lt;br /&gt;
| bool (byte)&lt;br /&gt;
| Automatically 1 at night (in LS); Setting this to 0 causes a new light corona to be created at all LS street lights&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Functions===&lt;br /&gt;
&lt;br /&gt;
Functions which are setting the above variables. Got these from Cheat Engine as well.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Related to&lt;br /&gt;
! Address&lt;br /&gt;
! Bytes&lt;br /&gt;
! Assembly&lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| LS Street lights enabler&lt;br /&gt;
| 0x0408989&lt;br /&gt;
| c6 87 d0 4c 8e 00 02&lt;br /&gt;
| mov byte ptr [edi+008e4cd0],02&lt;br /&gt;
| Didn't try NOP-ing this function yet&lt;br /&gt;
|-&lt;br /&gt;
| LS Street lights enabler&lt;br /&gt;
| 0x040cea3&lt;br /&gt;
| c6 45 10 03&lt;br /&gt;
| mov byte ptr [ebp+10],03&lt;br /&gt;
| Didn't try NOP-ing this function yet&lt;br /&gt;
|-&lt;br /&gt;
| LS Street lights enabler&lt;br /&gt;
| 0x040cb71&lt;br /&gt;
| c6 83 d0 4c 8e 00 01&lt;br /&gt;
| mov byte ptr [ebx+008e4cd0],01&lt;br /&gt;
| Didn't try NOP-ing this function yet&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==TODOcument==&lt;br /&gt;
&lt;br /&gt;
===Functions===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
getRainLevel ( )&lt;br /&gt;
setRainLevel ( float rainLevel )&lt;br /&gt;
resetRainLevel ( )&lt;br /&gt;
&lt;br /&gt;
getFogDistance ( )&lt;br /&gt;
setFogDistance ( float distance )&lt;br /&gt;
resetFogDistance ( )&lt;br /&gt;
&lt;br /&gt;
areInteriorSoundsEnabled ( )&lt;br /&gt;
setInteriorSoundsEnabled ( bool enabled )&lt;br /&gt;
&lt;br /&gt;
isElementFrozen ( element theElement ) -- Also mark the functions it replaced as &amp;quot;deprecated&amp;quot;&lt;br /&gt;
setElementFrozen ( element theElement, bool frozen ) -- Same here, of course&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Element map properties===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Vehicle:&lt;br /&gt;
&lt;br /&gt;
- frozen = bool frozen&lt;br /&gt;
&lt;br /&gt;
Ped:&lt;br /&gt;
&lt;br /&gt;
- frozen = bool frozen&lt;br /&gt;
&lt;br /&gt;
Object:&lt;br /&gt;
&lt;br /&gt;
- frozen     = bool frozen&lt;br /&gt;
- collisions = bool collisionsEnabled&lt;br /&gt;
- scale      = float objectScale&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>ZEvS</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Snert&amp;diff=24678</id>
		<title>User:Snert</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Snert&amp;diff=24678"/>
		<updated>2010-12-10T01:14:57Z</updated>

		<summary type="html">&lt;p&gt;ZEvS: /* Server-side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Resources==&lt;br /&gt;
&lt;br /&gt;
===Debug monitor===&lt;br /&gt;
&lt;br /&gt;
Resource to easily be able to view server and client debug messages. (remotely)&lt;br /&gt;
&lt;br /&gt;
Created as an example to demonstrate the use of on(Client)DebugMessage.&lt;br /&gt;
&lt;br /&gt;
Images:&lt;br /&gt;
  Server-side debug message viewer: http://dl.dropbox.com/u/4504893/images/debugmonitor_editor_s.png&lt;br /&gt;
  Client-side debug message viewer: http://dl.dropbox.com/u/4504893/images/debugmonitor_editor_c.png&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/4504893/misc/debugmonitor.zip Download] ('''Note:''' Only works in 1.1 r2091 and later)&lt;br /&gt;
&lt;br /&gt;
===Camo vehicles===&lt;br /&gt;
&lt;br /&gt;
When this resource is enabled, boats will get the same color as the water, and planes will get the same color as the sky. What's not to like?&lt;br /&gt;
&lt;br /&gt;
Created as an example to demonstrate the use of getWaterColor, getSkyGradient and RGB vehicle colors.&lt;br /&gt;
&lt;br /&gt;
  Camoplane example: http://www.xfire.com/video/3bcb4b/&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/4504893/misc/camovehs.zip Download] ('''Note:''' Only works in 1.1 r2093 and later)&lt;br /&gt;
&lt;br /&gt;
==Function suggestions==&lt;br /&gt;
&lt;br /&gt;
Some functions I should work on sometime soon. (sort of my &amp;quot;TODO&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===Server-side===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getAllAccountData( account theAccount )&lt;br /&gt;
bool setAllAccountData( account theAccount, table theData )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Client-side===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- None at the moment&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Both===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setVehicleNitrousActivated ( vehicle theVehicle, bool toggle ) -- Being able to influence NOS would be great (should block GTA from disabling it as well)&lt;br /&gt;
isVehicleNitrousActivated ( vehicle theVehicle ) -- Obvious function is obvious&lt;br /&gt;
setVehicleNitrousRechargeDelay ( vehicle theVehicle, int delay ) -- Function to set the amount of time the driver has to wait to reactivate NOS&lt;br /&gt;
getVehicleNitrousRechargeDelay ( vehicle theVehicle )&lt;br /&gt;
&lt;br /&gt;
setStreetLightsEnabled ( bool toggle ) -- Got to try and find the address for this first though&lt;br /&gt;
setBackgroundGunshotsEnabled ( bool toggle ) -- Gotta find this one as well.. again...&lt;br /&gt;
setBirdsEnabled ( bool toggle ) -- I hate those pesky poopers at times.. Besides, it doesn't fit in some circumstances.. There seems to be a function for this in the source&lt;br /&gt;
areStreetLightsEnabled ( )&lt;br /&gt;
areBackgroundGunshotsEnabled ( )&lt;br /&gt;
areBirdsEnabled ( )&lt;br /&gt;
&lt;br /&gt;
setPedBreath ( ped thePed, float breath ) -- For breath, as used underwater. Gotta find a way to set it for all peds, not just for the local player&lt;br /&gt;
getPedBreath ( ped thePed )&lt;br /&gt;
&lt;br /&gt;
isEventAdded ( string eventName ) -- Should be fairly obvious&lt;br /&gt;
isEventHandlerAdded ( string eventName, element attachedTo[, function handlerFunction ] ) -- Should be fairly obvious as well&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Event suggestions==&lt;br /&gt;
&lt;br /&gt;
Events which might be quite useful. I should work on these sometime soon.&lt;br /&gt;
&lt;br /&gt;
===Server-side===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
onElementCreate ( ) -- Triggered when an element was created&lt;br /&gt;
onVehicleNitrousActivated ( ) -- Should be fairly obvious&lt;br /&gt;
onVehicleNitrousDeactivated ( ) -- Should be fairly obvious&lt;br /&gt;
onVehicleTireStateChanged ( int tire, int state ) -- If you'd want vehicles with bulletproof wheels or something, you'd need to detect the state change first&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Client-side===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
onClientElementCreate ( ) -- See server-side&lt;br /&gt;
onClientVehicleNitrousActivated ( ) -- See server-side&lt;br /&gt;
onClientVehicleNitrousDeactivated ( ) -- See server-side&lt;br /&gt;
onClientVehicleTireStateChanged ( int tire, int state ) -- See server-side&lt;br /&gt;
onClientVehicleDamage ( float loss ) -- Server-side version already exists, if only there'd be an easy way for it client-side...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FX functions==&lt;br /&gt;
&lt;br /&gt;
Doomed_Space_Marine did [http://www.youtube.com/watch?v=mifR-dyFx6s|some research on some particle effects on custom models]. It would be very cool if we could make functions to do this instead, like we already can with some particle effects. (for instance: [[fxAddBlood]]) This would especially be very cool if we would be able to alter the fx, so for instance we could create colored smoke.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
fxAddHeliKillBlood&lt;br /&gt;
fxAddCarWashEffect&lt;br /&gt;
fxAddCement&lt;br /&gt;
fxAddClouds -- Note: It's a rather vague type of effect&lt;br /&gt;
fxAddCokeTrail&lt;br /&gt;
fxAddShower -- Note: Classed as &amp;quot;some water effect&amp;quot;, but unknown what type of water effect. Assuming shower&lt;br /&gt;
fxAddSmoke&lt;br /&gt;
fxAddPour -- Seems more like it should be fxAddPee or fxAddPiss though&lt;br /&gt;
fxAddLeaves&lt;br /&gt;
fxAddSpray&lt;br /&gt;
fxAddFireExtinghuiserEffect&lt;br /&gt;
fxAddFlamethrowerFlame&lt;br /&gt;
fxAddInsects&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Weather functions==&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' This section is for serious weathermen only!&lt;br /&gt;
&lt;br /&gt;
I recently noticed how many functions MTA actually has to influence the weather. It would be quite awesome if we would be able to influence litterally every factor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- We currently have&lt;br /&gt;
setWaveHeight&lt;br /&gt;
setSkyGradient&lt;br /&gt;
setWindVelocity&lt;br /&gt;
setCloudsEnabled&lt;br /&gt;
setWaterColor&lt;br /&gt;
setRainLevel&lt;br /&gt;
setFogDistance&lt;br /&gt;
&lt;br /&gt;
-- We'll need&lt;br /&gt;
setHeatWaveIntensity&lt;br /&gt;
setLightningEnabled&lt;br /&gt;
setLightOnGround&lt;br /&gt;
setSunStuff -- Some stuff concerning the sun in timecyc.dat, gotta see what I can make out of that&lt;br /&gt;
setShadowStuff -- Same here&lt;br /&gt;
setMoonSize -- Like if you shoot the moon, it resizes. Hopefully it will be possible to hide it altogether, or make some sort of half-moon out of it&lt;br /&gt;
setSandStormEnabled&lt;br /&gt;
-- Prolly the heck of a lot more&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.S. x86: fix setWeatherBlended, nao&lt;br /&gt;
&lt;br /&gt;
==Memory addresses==&lt;br /&gt;
&lt;br /&gt;
Here are a couple of memory addresses which might be useful for implementing new functions, so I can't forget them.&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&lt;br /&gt;
Variables I've discovered through playing around with Cheat Engine&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Purpose&lt;br /&gt;
! Address&lt;br /&gt;
! Address type&lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| LS Street lights enabler&lt;br /&gt;
| 0x0960CF4&lt;br /&gt;
| bool (byte)&lt;br /&gt;
| Automatically 1 at night (in LS); Setting this to 0 causes a new light corona to be created at all LS street lights&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Functions===&lt;br /&gt;
&lt;br /&gt;
Functions which are setting the above variables. Got these from Cheat Engine as well.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Related to&lt;br /&gt;
! Address&lt;br /&gt;
! Bytes&lt;br /&gt;
! Assembly&lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| LS Street lights enabler&lt;br /&gt;
| 0x0408989&lt;br /&gt;
| c6 87 d0 4c 8e 00 02&lt;br /&gt;
| mov byte ptr [edi+008e4cd0],02&lt;br /&gt;
| Didn't try NOP-ing this function yet&lt;br /&gt;
|-&lt;br /&gt;
| LS Street lights enabler&lt;br /&gt;
| 0x040cea3&lt;br /&gt;
| c6 45 10 03&lt;br /&gt;
| mov byte ptr [ebp+10],03&lt;br /&gt;
| Didn't try NOP-ing this function yet&lt;br /&gt;
|-&lt;br /&gt;
| LS Street lights enabler&lt;br /&gt;
| 0x040cb71&lt;br /&gt;
| c6 83 d0 4c 8e 00 01&lt;br /&gt;
| mov byte ptr [ebx+008e4cd0],01&lt;br /&gt;
| Didn't try NOP-ing this function yet&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==TODOcument==&lt;br /&gt;
&lt;br /&gt;
===Functions===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
getRainLevel ( )&lt;br /&gt;
setRainLevel ( float rainLevel )&lt;br /&gt;
resetRainLevel ( )&lt;br /&gt;
&lt;br /&gt;
getFogDistance ( )&lt;br /&gt;
setFogDistance ( float distance )&lt;br /&gt;
resetFogDistance ( )&lt;br /&gt;
&lt;br /&gt;
areInteriorSoundsEnabled ( )&lt;br /&gt;
setInteriorSoundsEnabled ( bool enabled )&lt;br /&gt;
&lt;br /&gt;
isElementFrozen ( element theElement ) -- Also mark the functions it replaced as &amp;quot;deprecated&amp;quot;&lt;br /&gt;
setElementFrozen ( element theElement, bool frozen ) -- Same here, of course&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Element map properties===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Vehicle:&lt;br /&gt;
&lt;br /&gt;
- frozen = bool frozen&lt;br /&gt;
&lt;br /&gt;
Ped:&lt;br /&gt;
&lt;br /&gt;
- frozen = bool frozen&lt;br /&gt;
&lt;br /&gt;
Object:&lt;br /&gt;
&lt;br /&gt;
- frozen     = bool frozen&lt;br /&gt;
- collisions = bool collisionsEnabled&lt;br /&gt;
- scale      = float objectScale&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>ZEvS</name></author>
	</entry>
</feed>