https://wiki.multitheftauto.com/api.php?action=feedcontributions&user=XNikoXD&feedformat=atom
Multi Theft Auto: Wiki - User contributions [en]
2024-03-29T13:01:22Z
User contributions
MediaWiki 1.39.3
https://wiki.multitheftauto.com/index.php?title=GetResourceName&diff=78807
GetResourceName
2024-02-10T22:07:56Z
<p>XNikoXD: Added tip about resource-data</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function gets the name of the specified resource.<br />
{{Note| If you want to access the name of any ''resource-data'' you should use [[getElementID]].}}<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
string getResourceName ( resource res )<br />
</syntaxhighlight><br />
{{OOP||[[resource]]:getName|name|renameResource}}<br />
<br />
===Required Arguments=== <br />
*'''res:''' The resource you wish to get the name of.<br />
<br />
===Returns===<br />
Returns a string with the resource name in it, or ''false'' if the resource does not exist.<br />
<br />
==Example==<br />
<section class="server" name="Server" show="true"><br />
This simple example outputs a message in the console whenever a resource starts, stating the name of the resource.<br />
<syntaxhighlight lang="lua"><br />
addEventHandler("onResourceStart", getRootElement(),<br />
function(res)<br />
outputConsole("Resource " .. getResourceName(res) .. " just started.")<br />
end<br />
)<br />
</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Resource functions}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=GetElementID&diff=78806
GetElementID
2024-02-10T22:07:35Z
<p>XNikoXD: </p>
<hr />
<div>__NOTOC__ <br />
{{Server client function}}<br />
This function gets the ID of an element. This is the "id" attribute of the element and is a string, NOT a number like a model ID, weapons ID or similar.<br />
{{Note| This function can also be used to get the resource name of any ''resource-data''.}}<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
string getElementID ( element theElement ) <br />
</syntaxhighlight><br />
{{OOP||[[element]]:getID|id|setElementID}} <br />
<br />
===Required Arguments=== <br />
*'''theElement:''' the element from which to retrieve the ID.<br />
<br />
===Returns===<br />
This returns a ''string'' containing the element ID. It will return an empty ''string'' if it has no ID. It will return ''false'' if the element is invalid.<br />
<br />
==Example== <br />
To get the ID of the following element:<br />
<syntaxhighlight lang="xml"><flag id="northflag" posX="2365" posY="215" posZ="32" /></syntaxhighlight><br />
You could use the following code:<br />
<syntaxhighlight lang="lua"><br />
-- assume flag refers to the flag element in the above XML code<br />
idstring = getElementID ( flag ) -- get the id of the flag element<br />
outputChatBox ( "The flag's ID is: " .. idstring ) -- output: The flag's ID is: northflag<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Element_functions}}<br />
[[de:GetElementID]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=User:XNikoXD&diff=78805
User:XNikoXD
2024-02-10T22:04:05Z
<p>XNikoXD: </p>
<hr />
<div>Usually known as Platin. Owner, creator and scripter of [https://www.proyectomila.net Proyecto Mila: Roleplay.]<br />
<br />
[https://forum.mtasa.com/profile/27677-platin-xnikoxd/ Forum profile]<br />
[https://www.youtube.com/channel/UCMxquoB3aKfVXQkw1egDpMA Youtube channel]<br />
[https://www.facebook.com/platinMTA/ Facebook page]<br />
[https://github.com/PlatinMTA Github profile]<br />
Discord: @platin</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=GetElementID&diff=78804
GetElementID
2024-02-10T21:48:06Z
<p>XNikoXD: Add tip (so people don't waste half an hour like me)</p>
<hr />
<div>__NOTOC__ <br />
{{Server client function}}<br />
This function gets the ID of an element. This is the "id" attribute of the element and is a string, NOT a number like a model ID, weapons ID or similar.<br />
{{Note| This function can be used to get the resource name of any ''resource-data''.}}<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
string getElementID ( element theElement ) <br />
</syntaxhighlight><br />
{{OOP||[[element]]:getID|id|setElementID}} <br />
<br />
===Required Arguments=== <br />
*'''theElement:''' the element from which to retrieve the ID.<br />
<br />
===Returns===<br />
This returns a ''string'' containing the element ID. It will return an empty ''string'' if it has no ID. It will return ''false'' if the element is invalid.<br />
<br />
==Example== <br />
To get the ID of the following element:<br />
<syntaxhighlight lang="xml"><flag id="northflag" posX="2365" posY="215" posZ="32" /></syntaxhighlight><br />
You could use the following code:<br />
<syntaxhighlight lang="lua"><br />
-- assume flag refers to the flag element in the above XML code<br />
idstring = getElementID ( flag ) -- get the id of the flag element<br />
outputChatBox ( "The flag's ID is: " .. idstring ) -- output: The flag's ID is: northflag<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Element_functions}}<br />
[[de:GetElementID]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVoiceStop&diff=77180
OnClientPlayerVoiceStop
2023-07-19T23:35:38Z
<p>XNikoXD: This event does not work, we should let everyone know</p>
<hr />
<div>{{Client event}}<br />
__NOTOC__ <br />
This event is triggered when a player stops talking through voice chat.<br />
{{Important Note|This event should only be used as a low-level function for advanced users. For typical Voice scripting, please see the [[Resource:Voice|Voice Resource]]}}<br />
<br />
__NOTOC__ {{Note|This event triggers inconsistently (https://github.com/multitheftauto/mtasa-blue/issues/1700). You should use onPlayerVoiceStart and trigger a custom client-sided event to get similar results, minus the cancelEvent effect.}}<br />
<br />
==Parameters==<br />
No parameters.<br />
<br />
==Source==<br />
The [[event system#Event source|source]] of this event is the player [[element]] that just stopped talking through voice chat.<br />
<br />
==Cancel effect==<br />
* If the [[event system#Event source|source]] is the local player, the local player will not broadcast his voice chat to the server<br />
* If the [[event system#Event source|source]] is a remote player, the player who started talking will not be heard.<br />
<br />
==Example== <br />
This example outputs to the console the player that stopped talking.<br />
<syntaxhighlight lang="lua">addEventHandler("onClientPlayerVoiceStop",root,function()<br />
outputConsole(getPlayerName(source)..." has stopped talking.")<br />
end)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Client_player_events}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVoiceStart&diff=77179
OnClientPlayerVoiceStart
2023-07-19T23:35:18Z
<p>XNikoXD: This event does not work, we should let everyone know</p>
<hr />
<div>{{Client event}}<br />
__NOTOC__ <br />
<div style="border: 1px dotted blue; background: #00CC66;padding:4px;margin-bottom:2px;">'''Note''': This event should only be used as a low-level function for advanced users. For typical Voice scripting, please see the [[Resource:Voice|Voice Resource]]</div><br />
This event is triggered when a player starts talking through voice chat.<br />
<br />
__NOTOC__ {{Note|This event triggers inconsistently (https://github.com/multitheftauto/mtasa-blue/issues/1700). You should use onPlayerVoiceStart and trigger a custom client-sided event to get similar results, minus the cancelEvent effect.}}<br />
<br />
==Parameters==<br />
No parameters.<br />
<br />
==Source==<br />
The [[event system#Event source|source]] of this event is the player [[element]] that just started talking through voice chat.<br />
<br />
==Cancel effect==<br />
* If the [[event system#Event source|source]] is the local player, the local player will not broadcast his voice chat to the server<br />
* If the [[event system#Event source|source]] is a remote player, the player who started talking will not be heard.<br />
<br />
==Example== <br />
This example outputs to the console the player that started talking.<br />
<syntaxhighlight lang="lua">addEventHandler("onClientPlayerVoiceStart",root,function()<br />
outputConsole(getPlayerName(source).." has started talking.")<br />
end)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Client_player_events}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=SetPlayerMoney&diff=75197
SetPlayerMoney
2022-06-29T10:26:09Z
<p>XNikoXD: Undo revision 75196 by XNikoXD (talk)</p>
<hr />
<div>__NOTOC__<br />
{{Server client function}}<br />
Sets a player's money to a certain value, regardless of current player money. It should be noted that setting negative values does not work and in fact gives the player large amounts of money.<br />
{{Note|Using this function client side (not recommended) will not change a players money server side.}}<br />
<br />
==Syntax== <br />
<section name="Server" class="server" show="true"><br />
<syntaxhighlight lang="lua"><br />
bool setPlayerMoney ( player thePlayer, int amount [, bool instant = false ] ) </syntaxhighlight> <br />
{{OOP||[[player]]:setMoney|money|getPlayerMoney}}<br />
===Required Arguments=== <br />
*'''thePlayer:''' Which player to set the money of.<br />
*'''amount:''' A whole integer specifying the new amount of money the player will have.<br />
<br />
===Optional Arguments===<br />
{{OptionalArg}}<br />
{{New items|3.0140|1.4|<br />
*'''instant:''' If set to ''true'' money will be set instantly without counting up/down like in singleplayer.}}<br />
</section><br />
<section name="Client" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
bool setPlayerMoney ( int amount [, bool instant = false ] ) </syntaxhighlight> <br />
{{OOP||[[Player]].setMoney||getPlayerMoney}}<br />
===Required Arguments=== <br />
*'''amount:''' A whole integer specifying the new amount of money the local player will have.<br />
<br />
===Optional Arguments===<br />
{{OptionalArg}}<br />
{{New items|3.0140|1.4|<br />
*'''instant:''' If set to ''true'' money will be set instantly without counting up/down like in singleplayer.}}<br />
</section><br />
<br />
===Returns===<br />
Returns ''true'' if the money was added, or ''false'' if invalid parameters were passed.<br />
<br />
==Example== <br />
'''Example 1:''' This example sets the player's money to the desired amount when he types "setcash" in console.<br />
<syntaxhighlight lang="lua"><br />
function setCash(thePlayer, command, amount) -- when the setcash function is called<br />
setPlayerMoney(thePlayer, tonumber(amount)) -- change player's money to the desired amount<br />
end<br />
addCommandHandler("setcash", setCash) -- add a command handler for setcash<br />
</syntaxhighlight><br />
'''Example 2:''' This sets all players the amount of 1337 money when "leet" is typed in console.<br />
<syntaxhighlight lang="lua"><br />
function leetmoney()<br />
setPlayerMoney(root, 1337)<br />
end<br />
addCommandHandler("leet", leetmoney)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Player functions}}<br />
<br />
[[pt-br:SetPlayerMoney]]<br />
[[ru:setPlayerMoney]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=SetPlayerMoney&diff=75196
SetPlayerMoney
2022-06-29T10:24:29Z
<p>XNikoXD: mtasa-blue/Client/game_sa/CPlayerInfoSA.cpp, lMoney is a long value, that means it can hold a value up to 2147483647. Some people would assume, because of the admin panel, that the max value is 99999999, but it is not.</p>
<hr />
<div>__NOTOC__<br />
{{Server client function}}<br />
Sets a player's money to a certain value, regardless of current player money. It should be noted that setting negative values does not work and in fact gives the player large amounts of money.<br />
{{Note|Using this function client side (not recommended) will not change a players money server side.}}<br />
{{Note|The max amount of money you can set is 2147483647, after that the value will reverse itself.}}<br />
<br />
==Syntax== <br />
<section name="Server" class="server" show="true"><br />
<syntaxhighlight lang="lua"><br />
bool setPlayerMoney ( player thePlayer, int amount [, bool instant = false ] ) </syntaxhighlight> <br />
{{OOP||[[player]]:setMoney|money|getPlayerMoney}}<br />
===Required Arguments=== <br />
*'''thePlayer:''' Which player to set the money of.<br />
*'''amount:''' A whole integer specifying the new amount of money the player will have.<br />
<br />
===Optional Arguments===<br />
{{OptionalArg}}<br />
{{New items|3.0140|1.4|<br />
*'''instant:''' If set to ''true'' money will be set instantly without counting up/down like in singleplayer.}}<br />
</section><br />
<section name="Client" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
bool setPlayerMoney ( int amount [, bool instant = false ] ) </syntaxhighlight> <br />
{{OOP||[[Player]].setMoney||getPlayerMoney}}<br />
===Required Arguments=== <br />
*'''amount:''' A whole integer specifying the new amount of money the local player will have.<br />
<br />
===Optional Arguments===<br />
{{OptionalArg}}<br />
{{New items|3.0140|1.4|<br />
*'''instant:''' If set to ''true'' money will be set instantly without counting up/down like in singleplayer.}}<br />
</section><br />
<br />
===Returns===<br />
Returns ''true'' if the money was added, or ''false'' if invalid parameters were passed.<br />
<br />
==Example== <br />
'''Example 1:''' This example sets the player's money to the desired amount when he types "setcash" in console.<br />
<syntaxhighlight lang="lua"><br />
function setCash(thePlayer, command, amount) -- when the setcash function is called<br />
setPlayerMoney(thePlayer, tonumber(amount)) -- change player's money to the desired amount<br />
end<br />
addCommandHandler("setcash", setCash) -- add a command handler for setcash<br />
</syntaxhighlight><br />
'''Example 2:''' This sets all players the amount of 1337 money when "leet" is typed in console.<br />
<syntaxhighlight lang="lua"><br />
function leetmoney()<br />
setPlayerMoney(root, 1337)<br />
end<br />
addCommandHandler("leet", leetmoney)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Player functions}}<br />
<br />
[[pt-br:SetPlayerMoney]]<br />
[[ru:setPlayerMoney]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=KickPlayer&diff=69587
KickPlayer
2021-03-07T00:17:44Z
<p>XNikoXD: </p>
<hr />
<div>{{note| Don't forget to give admin rights to the resource, in which you are using kickPlayer function or it won't work.}}<br />
<br />
{{Server function}}<br />
__NOTOC__<br />
This function will kick the specified player from the server.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool kickPlayer ( player kickedPlayer, [ player/string responsiblePlayer, string reason = "" ] ) <br />
</syntaxhighlight><br />
''or''<br />
<syntaxhighlight lang="lua"><br />
bool kickPlayer ( player kickedPlayer, [ string reason = "" ] )<br />
</syntaxhighlight><br />
{{OOP||[[player]]:kick||}}<br />
===Required Arguments=== <br />
*'''kickedPlayer:''' The player that will be kicked from the server<br />
<br />
===Optional Arguments=== <br />
*'''responsiblePlayer:''' The player that is responsible for the event. '''Note''': If left out as in the second syntax, responsible player for the kick will be "Console" (Maximum 30 characters if using a string).<br />
*'''reason:''' The reason for the kick. (Maximum 64 characters before 1.5.8, Maximum 128 characters after 1.5.8)<br />
<br />
===Returns===<br />
Returns ''true'' if the player was kicked succesfully, ''false'' if invalid arguments are specified.<br />
<br />
==Example== <br />
This example lets a player kick anyone who has a lower level.<br />
<syntaxhighlight lang="lua"><br />
function kickPlayerHandler ( sourcePlayer, commandname, kickedname, ... )<br />
-- Get player element from the name<br />
local kicked = getPlayerFromName ( kickedname )<br />
-- If the client who sent the command has a higher level<br />
local reason = table.concat({...}, " ")<br />
if ( hasObjectPermissionTo ( sourcePlayer, "function.kickPlayer" ) ) then<br />
-- Kick the player<br />
kickPlayer ( kicked, sourcePlayer, reason )<br />
end<br />
end<br />
-- Add the "kick" command handler<br />
addCommandHandler ( "kick", kickPlayerHandler )<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Admin_functions}}<br />
[[es:kickPlayer]]<br />
[[ru:kickPlayer]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=Material_IDs&diff=68341
Material IDs
2021-01-19T17:49:36Z
<p>XNikoXD: </p>
<hr />
<div>=Introduction=<br />
This is a list of the IDs for materials in San Andreas that are initialized in '' surfinfo.dat ''.<br />
<br />
==Default==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 0 || Default<br />
|-<br />
| 1 || Tarmac<br />
|-<br />
| 2 || Tarmac (damaged)<br />
|-<br />
| 3 || Tarmac (really damaged)<br />
|}<br />
<br />
==Concrete==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 4 || Pavement<br />
|-<br />
| 5 || Pavement (damaged)<br />
|-<br />
| 7 || Concrete (damaged)<br />
|-<br />
| 8 || Painted Ground<br />
|-<br />
| 34 || Concrete (beach)<br />
|-<br />
| 89 || Concrete<br />
|-<br />
| 127 || Poolside<br />
|-<br />
| 135 || Docklands<br />
|-<br />
| 136 || Industrial<br />
|-<br />
| 137 || Industrial Jetty<br />
|-<br />
| 138 || Concrete (litter)<br />
|-<br />
| 139 || Alley Rubbish<br />
|-<br />
| 144 || Airport Ground<br />
|-<br />
| 165 || Floor (concrete)<br />
|}<br />
<br />
==Gravel==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 6 || Gravel<br />
|-<br />
| 85 || Roadside<br />
|-<br />
| 101 || Rubble<br />
|-<br />
| 134 || Building Site<br />
|-<br />
| 140 || Junkyard Piles<br />
|}<br />
<br />
==Grass==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 9 || Grass (short lush)<br />
|-<br />
| 10 || Grass (medium lush)<br />
|-<br />
| 11 || Grass (long lush)<br />
|-<br />
| 12 || Grass (short dry)<br />
|-<br />
| 13 || Grass (medium dry)<br />
|-<br />
| 14 || Grass (long dry)<br />
|-<br />
| 15 || Golf Grass (rough)<br />
|-<br />
| 16 || Golf Grass (smooth)<br />
|-<br />
| 17 || Steep Slidy Grass<br />
|-<br />
| 20 || Meadow<br />
|-<br />
| 80 || Grass (short)<br />
|-<br />
| 81 || Grass (meadow)<br />
|-<br />
| 82 || Grass (dry)<br />
|-<br />
| 115 || Grass (wee flowers)<br />
|-<br />
| 116 || Grass (dry tall)<br />
|-<br />
| 117 || Grass (lush tall)<br />
|-<br />
| 118 || Grass (green mix)<br />
|-<br />
| 119 || Grass (brown mix)<br />
|-<br />
| 120 || Grass (low)<br />
|-<br />
| 121 || Grass (rocky)<br />
|-<br />
| 122 || Grass (small trees)<br />
|-<br />
| 125 || Grass (weeds)<br />
|-<br />
| 146 || Grass (light)<br />
|-<br />
| 147 || Grass (lighter)<br />
|-<br />
| 148 || Grass (lighter 2)<br />
|-<br />
| 149 || Grass (mid 1)<br />
|-<br />
| 150 || Grass (mid 2)<br />
|-<br />
| 151 || Grass (dark)<br />
|-<br />
| 152 || Grass (dark 2)<br />
|-<br />
| 153 || Grass (dirt mix)<br />
|-<br />
| 160 || Park Grass<br />
|}<br />
<br />
==Dirt==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 19 || Flower Bed<br />
|-<br />
| 21 || Waste Ground<br />
|-<br />
| 22 || Woodland Ground<br />
|-<br />
| 24 || Mud (wet)<br />
|-<br />
| 25 || Mud (dry)<br />
|-<br />
| 26 || Dirt<br />
|-<br />
| 27 || Dirt Track<br />
|-<br />
| 40 || Corn Field<br />
|-<br />
| 83 || Woodland<br />
|-<br />
| 84 || Wood Dense<br />
|-<br />
| 87 || Flowerbed<br />
|-<br />
| 88 || Waste Ground<br />
|-<br />
| 100 || Riverbed<br />
|-<br />
| 110 || Marsh<br />
|-<br />
| 123 || Dirt (rocky)<br />
|-<br />
| 124 || Dirt (weeds)<br />
|-<br />
| 126 || River Edge<br />
|-<br />
| 128 || Forest (stumps)<br />
|-<br />
| 129 || Forest (sticks)<br />
|-<br />
| 130 || Forest (leaves)<br />
|-<br />
| 132 || Forest (dry)<br />
|-<br />
| 133 || Sparse Flowers<br />
|-<br />
| 141 || Junkyard Ground<br />
|-<br />
| 142 || Dump<br />
|-<br />
| 145 || Cornfield<br />
|-<br />
| 155 || Riverbed (shallow)<br />
|-<br />
| 156 || Riverbed (weeds)<br />
|}<br />
<br />
==Sand==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 28 || Sand (deep)<br />
|-<br />
| 29 || Sand (medium)<br />
|-<br />
| 30 || Sand (compact)<br />
|-<br />
| 31 || Sand (arid)<br />
|-<br />
| 32 || Sand (more)<br />
|-<br />
| 33 || Sand (beach)<br />
|-<br />
| 74 || Sand<br />
|-<br />
| 75 || Sand (dense)<br />
|-<br />
| 76 || Sand (arid)<br />
|-<br />
| 77 || Sand (compact)<br />
|-<br />
| 78 || Sand (rocky)<br />
|-<br />
| 79 || Sand (beach)<br />
|-<br />
| 86 || Roadside Des<br />
|-<br />
| 96 || Underwater (lush)<br />
|-<br />
| 97 || Underwater (barren)<br />
|-<br />
| 98 || Underwater (coral)<br />
|-<br />
| 99 || Underwater (deep)<br />
|-<br />
| 131 || Desert Rocks<br />
|-<br />
| 143 || Cactus Dense<br />
|-<br />
| 157 || Seaweed<br />
|}<br />
<br />
==Glass==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 45 || Glass<br />
|-<br />
| 46 || Glass Windows (large)<br />
|-<br />
| 47 || Glass Windows (small)<br />
|-<br />
| 175 || Unbreakable Glass<br />
|}<br />
<br />
==Wood==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 42 || Wood (crates)<br />
|-<br />
| 43 || Wood (solid)<br />
|-<br />
| 44 || Wood (thin)<br />
|-<br />
| 70 || Wood (bench)<br />
|-<br />
| 72 || Floorboard<br />
|-<br />
| 73 || Stairs (wood)<br />
|-<br />
| 172 || Wood Picket Fence<br />
|-<br />
| 173 || Wood Slatted Fence<br />
|-<br />
| 174 || Wood Ranch Fence<br />
|}<br />
<br />
==Metal==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 50 || Garage Door<br />
|-<br />
| 51 || Thick Metal Plate<br />
|-<br />
| 52 || Scaffold Pole<br />
|-<br />
| 53 || Lamp Post<br />
|-<br />
| 54 || Metal Gate<br />
|-<br />
| 55 || Metal Chain fence<br />
|-<br />
| 56 || Girder<br />
|-<br />
| 57 || Fire Hydrant<br />
|-<br />
| 58 || Container<br />
|-<br />
| 59 || News Vendor<br />
|-<br />
| 63 || Car<br />
|-<br />
| 64 || Car (panel)<br />
|-<br />
| 65 || Car (moving component)<br />
|-<br />
| 162 || Stairs (metal)<br />
|-<br />
| 164 || Floor (metal)<br />
|-<br />
| 167 || Thin Metal Sheet<br />
|-<br />
| 168 || Metal Barrel<br />
|-<br />
| 171 || Metal Dumpster<br />
|}<br />
<br />
==Stone==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 18 || Steep Cliff<br />
|-<br />
| 35 || Rock (dry)<br />
|-<br />
| 36 || Rock (wet)<br />
|-<br />
| 37 || Rock (cliff)<br />
|-<br />
| 69 || Transparent Stone<br />
|-<br />
| 109 || Mountain<br />
|-<br />
| 154 || Riverbed (stone)<br />
|-<br />
| 161 || Stairs (stone)<br />
|}<br />
<br />
==Vegetation==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 23 || Vegetation<br />
|-<br />
| 41 || Hedge<br />
|-<br />
| 111 || Bushy<br />
|-<br />
| 112 || Bushy (mix)<br />
|-<br />
| 113 || Bushy (dry)<br />
|-<br />
| 114 || Bushy (mid)<br />
|}<br />
<br />
==Water==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 38 || Water (riverbed)<br />
|-<br />
| 39 || Water (shallow)<br />
|}<br />
<br />
==Misc==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 48 || Empty1<br />
|-<br />
| 49 || Empty2<br />
|-<br />
| 60 || Wheelbase<br />
|-<br />
| 61 || Cardboard Box<br />
|-<br />
| 62 || Ped<br />
|-<br />
| 66 || Transparent Cloth<br />
|-<br />
| 67 || Rubber<br />
|-<br />
| 68 || Plastic<br />
|-<br />
| 71 || Carpet<br />
|-<br />
| 90 || Office Desk<br />
|-<br />
| 91 || 711 Shelf 1<br />
|-<br />
| 92 || 711 Shelf 2<br />
|-<br />
| 93 || 711 Shelf 3<br />
|-<br />
| 94 || Restuarant Table<br />
|-<br />
| 95 || Bar Table<br />
|-<br />
| 102 || Bedroom Floor<br />
|-<br />
| 103 || Kitchen Floor<br />
|-<br />
| 104 || Livingroom Floor<br />
|-<br />
| 105 || corridor Floor<br />
|-<br />
| 106 || 711 Floor<br />
|-<br />
| 107 || Fast Food Floor<br />
|-<br />
| 108 || Skanky Floor<br />
|-<br />
| 158 || Door<br />
|-<br />
| 159 || Plastic Barrier<br />
|-<br />
| 163 || Stairs (carpet)<br />
|-<br />
| 166 || Bin Bag<br />
|-<br />
| 169 || Plastic Cone<br />
|-<br />
| 170 || Plastic Dumpster<br />
|-<br />
| 176 || Hay Bale<br />
|-<br />
| 177 || Gore<br />
|-<br />
| 178 || Rail Track<br />
|}<br />
<br />
=Source=<br />
The group names and readable material names have been extracted from Collision File Editor II by Steve M[http://www.steve-m.com/downloads/tools/colleditor2/].<br />
<br />
[[Category:ID Lists]]<br />
<br />
[[hu:Material IDs]]<br />
[[de:Material IDs]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=Material_IDs&diff=68340
Material IDs
2021-01-19T17:47:26Z
<p>XNikoXD: </p>
<hr />
<div>=Introduction=<br />
This is a list of the IDs for materials in San Andreas that are initialized in '' surfinfo.dat ''.<br />
<br />
==Default==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 0 || Default<br />
|-<br />
| 1 || Tarmac<br />
|-<br />
| 2 || Tarmac (damaged)<br />
|-<br />
| 3 || Tarmac (really damaged)<br />
|}<br />
<br />
==Concrete==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 4 || Pavement<br />
|-<br />
| 5 || Pavement (damaged)<br />
|-<br />
| 7 || Concrete (damaged)<br />
|-<br />
| 8 || Painted Ground<br />
|-<br />
| 34 || Concrete (beach)<br />
|-<br />
| 89 || Concrete<br />
|-<br />
| 127 || Poolside<br />
|-<br />
| 135 || Docklands<br />
|-<br />
| 136 || Industrial<br />
|-<br />
| 137 || Industrial Jetty<br />
|-<br />
| 138 || Concrete (litter)<br />
|-<br />
| 139 || Alley Rubbish<br />
|-<br />
| 144 || Airport Ground<br />
|-<br />
| 165 || Floor (concrete)<br />
|}<br />
<br />
==Gravel==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 6 || Gravel<br />
|-<br />
| 85 || Roadside<br />
|-<br />
| 101 || Rubble<br />
|-<br />
| 134 || Building Site<br />
|-<br />
| 140 || Junkyard Piles<br />
|}<br />
<br />
==Grass==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 9 || Grass (short lush)<br />
|-<br />
| 10 || Grass (medium lush)<br />
|-<br />
| 11 || Grass (long lush)<br />
|-<br />
| 12 || Grass (short dry)<br />
|-<br />
| 13 || Grass (medium dry)<br />
|-<br />
| 14 || Grass (long dry)<br />
|-<br />
| 15 || Golf Grass (rough)<br />
|-<br />
| 16 || Golf Grass (smooth)<br />
|-<br />
| 17 || Steep Slidy Grass<br />
|-<br />
| 20 || Meadow<br />
|-<br />
| 80 || Grass (short)<br />
|-<br />
| 81 || Grass (meadow)<br />
|-<br />
| 82 || Grass (dry)<br />
|-<br />
| 115 || Grass (wee flowers)<br />
|-<br />
| 116 || Grass (dry tall)<br />
|-<br />
| 117 || Grass (lush tall)<br />
|-<br />
| 118 || Grass (green mix)<br />
|-<br />
| 119 || Grass (brown mix)<br />
|-<br />
| 120 || Grass (low)<br />
|-<br />
| 121 || Grass (rocky)<br />
|-<br />
| 122 || Grass (small trees)<br />
|-<br />
| 125 || Grass (weeds)<br />
|-<br />
| 146 || Grass (light)<br />
|-<br />
| 147 || Grass (lighter)<br />
|-<br />
| 148 || Grass (lighter 2)<br />
|-<br />
| 149 || Grass (mid 1)<br />
|-<br />
| 150 || Grass (mid 2)<br />
|-<br />
| 151 || Grass (dark)<br />
|-<br />
| 152 || Grass (dark 2)<br />
|-<br />
| 153 || Grass (dirt mix)<br />
|-<br />
| 160 || Park Grass<br />
|}<br />
<br />
==Tierra==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 19 || Flower Bed<br />
|-<br />
| 21 || Waste Ground<br />
|-<br />
| 22 || Woodland Ground<br />
|-<br />
| 24 || Mud (wet)<br />
|-<br />
| 25 || Mud (dry)<br />
|-<br />
| 26 || Dirt<br />
|-<br />
| 27 || Dirt Track<br />
|-<br />
| 40 || Corn Field<br />
|-<br />
| 83 || Woodland<br />
|-<br />
| 84 || Wood Dense<br />
|-<br />
| 87 || Flowerbed<br />
|-<br />
| 88 || Waste Ground<br />
|-<br />
| 100 || Riverbed<br />
|-<br />
| 110 || Marsh<br />
|-<br />
| 123 || Dirt (rocky)<br />
|-<br />
| 124 || Dirt (weeds)<br />
|-<br />
| 126 || River Edge<br />
|-<br />
| 128 || Forest (stumps)<br />
|-<br />
| 129 || Forest (sticks)<br />
|-<br />
| 130 || Forest (leaves)<br />
|-<br />
| 132 || Forest (dry)<br />
|-<br />
| 133 || Sparse Flowers<br />
|-<br />
| 141 || Junkyard Ground<br />
|-<br />
| 142 || Dump<br />
|-<br />
| 145 || Cornfield<br />
|-<br />
| 155 || Riverbed (shallow)<br />
|-<br />
| 156 || Riverbed (weeds)<br />
|}<br />
<br />
==Sand==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 28 || Sand (deep)<br />
|-<br />
| 29 || Sand (medium)<br />
|-<br />
| 30 || Sand (compact)<br />
|-<br />
| 31 || Sand (arid)<br />
|-<br />
| 32 || Sand (more)<br />
|-<br />
| 33 || Sand (beach)<br />
|-<br />
| 74 || Sand<br />
|-<br />
| 75 || Sand (dense)<br />
|-<br />
| 76 || Sand (arid)<br />
|-<br />
| 77 || Sand (compact)<br />
|-<br />
| 78 || Sand (rocky)<br />
|-<br />
| 79 || Sand (beach)<br />
|-<br />
| 86 || Roadside Des<br />
|-<br />
| 96 || Underwater (lush)<br />
|-<br />
| 97 || Underwater (barren)<br />
|-<br />
| 98 || Underwater (coral)<br />
|-<br />
| 99 || Underwater (deep)<br />
|-<br />
| 131 || Desert Rocks<br />
|-<br />
| 143 || Cactus Dense<br />
|-<br />
| 157 || Seaweed<br />
|}<br />
<br />
==Glass==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 45 || Glass<br />
|-<br />
| 46 || Glass Windows (large)<br />
|-<br />
| 47 || Glass Windows (small)<br />
|-<br />
| 175 || Unbreakable Glass<br />
|}<br />
<br />
==Wood==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 42 || Wood (crates)<br />
|-<br />
| 43 || Wood (solid)<br />
|-<br />
| 44 || Wood (thin)<br />
|-<br />
| 70 || Wood (bench)<br />
|-<br />
| 72 || Floorboard<br />
|-<br />
| 73 || Stairs (wood)<br />
|-<br />
| 172 || Wood Picket Fence<br />
|-<br />
| 173 || Wood Slatted Fence<br />
|-<br />
| 174 || Wood Ranch Fence<br />
|}<br />
<br />
==Metal==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 50 || Garage Door<br />
|-<br />
| 51 || Thick Metal Plate<br />
|-<br />
| 52 || Scaffold Pole<br />
|-<br />
| 53 || Lamp Post<br />
|-<br />
| 54 || Metal Gate<br />
|-<br />
| 55 || Metal Chain fence<br />
|-<br />
| 56 || Girder<br />
|-<br />
| 57 || Fire Hydrant<br />
|-<br />
| 58 || Container<br />
|-<br />
| 59 || News Vendor<br />
|-<br />
| 63 || Car<br />
|-<br />
| 64 || Car (panel)<br />
|-<br />
| 65 || Car (moving component)<br />
|-<br />
| 162 || Stairs (metal)<br />
|-<br />
| 164 || Floor (metal)<br />
|-<br />
| 167 || Thin Metal Sheet<br />
|-<br />
| 168 || Metal Barrel<br />
|-<br />
| 171 || Metal Dumpster<br />
|}<br />
<br />
==Stone==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 18 || Steep Cliff<br />
|-<br />
| 35 || Rock (dry)<br />
|-<br />
| 36 || Rock (wet)<br />
|-<br />
| 37 || Rock (cliff)<br />
|-<br />
| 69 || Transparent Stone<br />
|-<br />
| 109 || Mountain<br />
|-<br />
| 154 || Riverbed (stone)<br />
|-<br />
| 161 || Stairs (stone)<br />
|}<br />
<br />
==Vegetation==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 23 || Vegetation<br />
|-<br />
| 41 || Hedge<br />
|-<br />
| 111 || Bushy<br />
|-<br />
| 112 || Bushy (mix)<br />
|-<br />
| 113 || Bushy (dry)<br />
|-<br />
| 114 || Bushy (mid)<br />
|}<br />
<br />
==Water==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 38 || Water (riverbed)<br />
|-<br />
| 39 || Water (shallow)<br />
|}<br />
<br />
==Misc==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 48 || Empty1<br />
|-<br />
| 49 || Empty2<br />
|-<br />
| 60 || Wheelbase<br />
|-<br />
| 61 || Cardboard Box<br />
|-<br />
| 62 || Ped<br />
|-<br />
| 66 || Transparent Cloth<br />
|-<br />
| 67 || Rubber<br />
|-<br />
| 68 || Plastic<br />
|-<br />
| 71 || Carpet<br />
|-<br />
| 90 || Office Desk<br />
|-<br />
| 91 || 711 Shelf 1<br />
|-<br />
| 92 || 711 Shelf 2<br />
|-<br />
| 93 || 711 Shelf 3<br />
|-<br />
| 94 || Restuarant Table<br />
|-<br />
| 95 || Bar Table<br />
|-<br />
| 102 || Bedroom Floor<br />
|-<br />
| 103 || Kitchen Floor<br />
|-<br />
| 104 || Livingroom Floor<br />
|-<br />
| 105 || corridor Floor<br />
|-<br />
| 106 || 711 Floor<br />
|-<br />
| 107 || Fast Food Floor<br />
|-<br />
| 108 || Skanky Floor<br />
|-<br />
| 158 || Door<br />
|-<br />
| 159 || Plastic Barrier<br />
|-<br />
| 163 || Stairs (carpet)<br />
|-<br />
| 166 || Bin Bag<br />
|-<br />
| 169 || Plastic Cone<br />
|-<br />
| 170 || Plastic Dumpster<br />
|-<br />
| 176 || Hay Bale<br />
|-<br />
| 177 || Gore<br />
|-<br />
| 178 || Rail Track<br />
|}<br />
<br />
=Source=<br />
The group names and readable material names have been extracted from Collision File Editor II by Steve M[http://www.steve-m.com/downloads/tools/colleditor2/].<br />
<br />
[[Category:ID Lists]]<br />
<br />
[[hu:Material IDs]]<br />
[[de:Material IDs]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=Material_IDs&diff=68339
Material IDs
2021-01-19T17:47:15Z
<p>XNikoXD: Change introduction into english (it was on spanish for some reason)</p>
<hr />
<div>=Introduction=<br />
This is a list of the IDs for materials in San Andreas that are initialized in '' surfinfo.dat ''.<br />
Esta es una lista de los números de identificación de material de GTA: SA, que se enumeran en '' surfinfo.dat ''.<br />
<br />
==Default==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 0 || Default<br />
|-<br />
| 1 || Tarmac<br />
|-<br />
| 2 || Tarmac (damaged)<br />
|-<br />
| 3 || Tarmac (really damaged)<br />
|}<br />
<br />
==Concrete==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 4 || Pavement<br />
|-<br />
| 5 || Pavement (damaged)<br />
|-<br />
| 7 || Concrete (damaged)<br />
|-<br />
| 8 || Painted Ground<br />
|-<br />
| 34 || Concrete (beach)<br />
|-<br />
| 89 || Concrete<br />
|-<br />
| 127 || Poolside<br />
|-<br />
| 135 || Docklands<br />
|-<br />
| 136 || Industrial<br />
|-<br />
| 137 || Industrial Jetty<br />
|-<br />
| 138 || Concrete (litter)<br />
|-<br />
| 139 || Alley Rubbish<br />
|-<br />
| 144 || Airport Ground<br />
|-<br />
| 165 || Floor (concrete)<br />
|}<br />
<br />
==Gravel==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 6 || Gravel<br />
|-<br />
| 85 || Roadside<br />
|-<br />
| 101 || Rubble<br />
|-<br />
| 134 || Building Site<br />
|-<br />
| 140 || Junkyard Piles<br />
|}<br />
<br />
==Grass==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 9 || Grass (short lush)<br />
|-<br />
| 10 || Grass (medium lush)<br />
|-<br />
| 11 || Grass (long lush)<br />
|-<br />
| 12 || Grass (short dry)<br />
|-<br />
| 13 || Grass (medium dry)<br />
|-<br />
| 14 || Grass (long dry)<br />
|-<br />
| 15 || Golf Grass (rough)<br />
|-<br />
| 16 || Golf Grass (smooth)<br />
|-<br />
| 17 || Steep Slidy Grass<br />
|-<br />
| 20 || Meadow<br />
|-<br />
| 80 || Grass (short)<br />
|-<br />
| 81 || Grass (meadow)<br />
|-<br />
| 82 || Grass (dry)<br />
|-<br />
| 115 || Grass (wee flowers)<br />
|-<br />
| 116 || Grass (dry tall)<br />
|-<br />
| 117 || Grass (lush tall)<br />
|-<br />
| 118 || Grass (green mix)<br />
|-<br />
| 119 || Grass (brown mix)<br />
|-<br />
| 120 || Grass (low)<br />
|-<br />
| 121 || Grass (rocky)<br />
|-<br />
| 122 || Grass (small trees)<br />
|-<br />
| 125 || Grass (weeds)<br />
|-<br />
| 146 || Grass (light)<br />
|-<br />
| 147 || Grass (lighter)<br />
|-<br />
| 148 || Grass (lighter 2)<br />
|-<br />
| 149 || Grass (mid 1)<br />
|-<br />
| 150 || Grass (mid 2)<br />
|-<br />
| 151 || Grass (dark)<br />
|-<br />
| 152 || Grass (dark 2)<br />
|-<br />
| 153 || Grass (dirt mix)<br />
|-<br />
| 160 || Park Grass<br />
|}<br />
<br />
==Tierra==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 19 || Flower Bed<br />
|-<br />
| 21 || Waste Ground<br />
|-<br />
| 22 || Woodland Ground<br />
|-<br />
| 24 || Mud (wet)<br />
|-<br />
| 25 || Mud (dry)<br />
|-<br />
| 26 || Dirt<br />
|-<br />
| 27 || Dirt Track<br />
|-<br />
| 40 || Corn Field<br />
|-<br />
| 83 || Woodland<br />
|-<br />
| 84 || Wood Dense<br />
|-<br />
| 87 || Flowerbed<br />
|-<br />
| 88 || Waste Ground<br />
|-<br />
| 100 || Riverbed<br />
|-<br />
| 110 || Marsh<br />
|-<br />
| 123 || Dirt (rocky)<br />
|-<br />
| 124 || Dirt (weeds)<br />
|-<br />
| 126 || River Edge<br />
|-<br />
| 128 || Forest (stumps)<br />
|-<br />
| 129 || Forest (sticks)<br />
|-<br />
| 130 || Forest (leaves)<br />
|-<br />
| 132 || Forest (dry)<br />
|-<br />
| 133 || Sparse Flowers<br />
|-<br />
| 141 || Junkyard Ground<br />
|-<br />
| 142 || Dump<br />
|-<br />
| 145 || Cornfield<br />
|-<br />
| 155 || Riverbed (shallow)<br />
|-<br />
| 156 || Riverbed (weeds)<br />
|}<br />
<br />
==Sand==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 28 || Sand (deep)<br />
|-<br />
| 29 || Sand (medium)<br />
|-<br />
| 30 || Sand (compact)<br />
|-<br />
| 31 || Sand (arid)<br />
|-<br />
| 32 || Sand (more)<br />
|-<br />
| 33 || Sand (beach)<br />
|-<br />
| 74 || Sand<br />
|-<br />
| 75 || Sand (dense)<br />
|-<br />
| 76 || Sand (arid)<br />
|-<br />
| 77 || Sand (compact)<br />
|-<br />
| 78 || Sand (rocky)<br />
|-<br />
| 79 || Sand (beach)<br />
|-<br />
| 86 || Roadside Des<br />
|-<br />
| 96 || Underwater (lush)<br />
|-<br />
| 97 || Underwater (barren)<br />
|-<br />
| 98 || Underwater (coral)<br />
|-<br />
| 99 || Underwater (deep)<br />
|-<br />
| 131 || Desert Rocks<br />
|-<br />
| 143 || Cactus Dense<br />
|-<br />
| 157 || Seaweed<br />
|}<br />
<br />
==Glass==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 45 || Glass<br />
|-<br />
| 46 || Glass Windows (large)<br />
|-<br />
| 47 || Glass Windows (small)<br />
|-<br />
| 175 || Unbreakable Glass<br />
|}<br />
<br />
==Wood==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 42 || Wood (crates)<br />
|-<br />
| 43 || Wood (solid)<br />
|-<br />
| 44 || Wood (thin)<br />
|-<br />
| 70 || Wood (bench)<br />
|-<br />
| 72 || Floorboard<br />
|-<br />
| 73 || Stairs (wood)<br />
|-<br />
| 172 || Wood Picket Fence<br />
|-<br />
| 173 || Wood Slatted Fence<br />
|-<br />
| 174 || Wood Ranch Fence<br />
|}<br />
<br />
==Metal==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 50 || Garage Door<br />
|-<br />
| 51 || Thick Metal Plate<br />
|-<br />
| 52 || Scaffold Pole<br />
|-<br />
| 53 || Lamp Post<br />
|-<br />
| 54 || Metal Gate<br />
|-<br />
| 55 || Metal Chain fence<br />
|-<br />
| 56 || Girder<br />
|-<br />
| 57 || Fire Hydrant<br />
|-<br />
| 58 || Container<br />
|-<br />
| 59 || News Vendor<br />
|-<br />
| 63 || Car<br />
|-<br />
| 64 || Car (panel)<br />
|-<br />
| 65 || Car (moving component)<br />
|-<br />
| 162 || Stairs (metal)<br />
|-<br />
| 164 || Floor (metal)<br />
|-<br />
| 167 || Thin Metal Sheet<br />
|-<br />
| 168 || Metal Barrel<br />
|-<br />
| 171 || Metal Dumpster<br />
|}<br />
<br />
==Stone==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 18 || Steep Cliff<br />
|-<br />
| 35 || Rock (dry)<br />
|-<br />
| 36 || Rock (wet)<br />
|-<br />
| 37 || Rock (cliff)<br />
|-<br />
| 69 || Transparent Stone<br />
|-<br />
| 109 || Mountain<br />
|-<br />
| 154 || Riverbed (stone)<br />
|-<br />
| 161 || Stairs (stone)<br />
|}<br />
<br />
==Vegetation==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 23 || Vegetation<br />
|-<br />
| 41 || Hedge<br />
|-<br />
| 111 || Bushy<br />
|-<br />
| 112 || Bushy (mix)<br />
|-<br />
| 113 || Bushy (dry)<br />
|-<br />
| 114 || Bushy (mid)<br />
|}<br />
<br />
==Water==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 38 || Water (riverbed)<br />
|-<br />
| 39 || Water (shallow)<br />
|}<br />
<br />
==Misc==<br />
{|class="wikitable sortable"<br />
|-<br />
! ID || Name<br />
|-<br />
| 48 || Empty1<br />
|-<br />
| 49 || Empty2<br />
|-<br />
| 60 || Wheelbase<br />
|-<br />
| 61 || Cardboard Box<br />
|-<br />
| 62 || Ped<br />
|-<br />
| 66 || Transparent Cloth<br />
|-<br />
| 67 || Rubber<br />
|-<br />
| 68 || Plastic<br />
|-<br />
| 71 || Carpet<br />
|-<br />
| 90 || Office Desk<br />
|-<br />
| 91 || 711 Shelf 1<br />
|-<br />
| 92 || 711 Shelf 2<br />
|-<br />
| 93 || 711 Shelf 3<br />
|-<br />
| 94 || Restuarant Table<br />
|-<br />
| 95 || Bar Table<br />
|-<br />
| 102 || Bedroom Floor<br />
|-<br />
| 103 || Kitchen Floor<br />
|-<br />
| 104 || Livingroom Floor<br />
|-<br />
| 105 || corridor Floor<br />
|-<br />
| 106 || 711 Floor<br />
|-<br />
| 107 || Fast Food Floor<br />
|-<br />
| 108 || Skanky Floor<br />
|-<br />
| 158 || Door<br />
|-<br />
| 159 || Plastic Barrier<br />
|-<br />
| 163 || Stairs (carpet)<br />
|-<br />
| 166 || Bin Bag<br />
|-<br />
| 169 || Plastic Cone<br />
|-<br />
| 170 || Plastic Dumpster<br />
|-<br />
| 176 || Hay Bale<br />
|-<br />
| 177 || Gore<br />
|-<br />
| 178 || Rail Track<br />
|}<br />
<br />
=Source=<br />
The group names and readable material names have been extracted from Collision File Editor II by Steve M[http://www.steve-m.com/downloads/tools/colleditor2/].<br />
<br />
[[Category:ID Lists]]<br />
<br />
[[hu:Material IDs]]<br />
[[de:Material IDs]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=Resource:DGS&diff=67803
Resource:DGS
2020-11-25T12:54:47Z
<p>XNikoXD: Tab panel also uses a Render Target</p>
<hr />
<div><pageclass class="resource" subcaption="Resource"></pageclass><br />
[[Image:DGS_Logo.png|400px|thumb|right|DGS Logo By [[User:Allerek|Allerek]]]]<br />
This resource is designed to allow you to create directX GUI's as an alternative to the original MTA:SA GUI functions.<br />
<br />
<div style="padding:10px; border-radius:2px;font-size:14px;"><br />
'''Full Name''': Thisdp's DirectX Graphical User Interface System (DxGUI Lib)<br />
<br />
'''Author''': [[User:thisdp|thisdp]]<br />
<br />
'''State''': <span style="color:#FFFFFF;text-shadow:black 0em 0em 0.3em;">OpenSource</span> & <span style="color:#55FF55;text-shadow:black 0em 0em 0.3em;">Work in progress</span><br />
<br />
'''GitHub Source''': https://github.com/thisdp/dgs/tree/master<br />
<br />
'''Server Discord''': https://discord.gg/QEs8q6W<br />
<br />
'''Update Log''': [[DGS Updates Log|Changes and Updates Log]]<br />
</div><br />
<br />
<br />
=Features=<br />
<br />
[[Image:DGSNetStatus.png|300px|thumb|right|DGS Network Monitor]]<br />
<br />
[[Image:DGSS.png|400px|thumb|right|]] <br />
<br />
<br />
'''How does it work?'''<br />
*DGS is based on [[element]] system, which just likes the cegui system. To make DGS easier to use and understand, I choose to follow the usage of cegui's.<br />
*DGS supports OOP syntax, if you don't like POP, then use OOP instead. But you should know that OOP is slower than POP.<br />
*DGS elements are rendered in the event "onClientRender". When "onClientRender" is called, every DGS elements will be looped and calculated.<br />
<br />
<br />
'''What's different from cegui?'''<br />
*This resource is based on dx* functions, so its style will be more flexible than cegui, which means you can define the style by yourself.<br />
*The latest '''Style System''' enables developer to define their own style such as changing color, loading images and even loading shaders with dgs elements on the server instead of using a lot of [[dgsSetProperty]]/[[dgsSetProperties]].<br />
<br />
<br />
'''Update System'''<br />
*It have an update system that can inform you of keeping your DGS latest.<br />
*When a newer version has been released, it will detecte the version changing periodically and then notice you.<br />
*Execute command "'''updatedgs'''" to check the least version and update your DGS.<br />
*Also, you can check the version of DGS by inputting the command "dgsver" <br />
<br />
<br />
'''You Should Know'''<br />
*This project was started from 2014.<br />
*Scroll Pane, Grid List, Combo Box, Memo, Tab Panel and Edit Box use Render Target, which means if you don't have enough video memory, '''Render Target won't be created''', and therefore those dgs elements won't be shown.<br />
<br />
<br />
[[Image:Dx_7.PNG|400px|thumb|right|Example DGS Cmd]] <br />
<br />
'''Examples scripts'''<br />
*1.https://community.multitheftauto.com/index.php?p=resources&s=details&id=14757 By ([[User:Ahmed Ly|Ahmed Ly]] ,Mahmod Algeriany)<br />
*2. Also File test.lua its have more Examples You can See it .<br />
*3. This Video show you how to play a video by using Dgs https://www.youtube.com/watch?v=ZIq24zS5byI<br />
<br />
<br />
'''Auto Completion'''<br />
*1. Link: http://www.mediafire.com/file/m6dm7815d5dihax/lua.zip By [[User:Ahmed Ly|Ahmed Ly]] <br />
*2. '''Note''': You must put it in file Notepad++\plugins\APIs.<br />
*3. Not all of DGS Functions are added, but the rest will be added soon.<br />
<br />
<br />
'''Debug'''<br />
* You can enter the debug mode by executing the command "'''debugdgs'''".<br />
* "'''debugdgs 2 '''" : to see dgs Element scale with a border<br />
<br />
<br />
'''DGS Type'''<br />
[[Image:Dx Dgs.jpg|400px|thumb|right|Hurt World GUI Example]]<br />
* 3D Text(dgs-dx3dtext): A 3D Text.<br />
* 3D Interface (dgs-dx3dinterface): A 3D Interface.<br />
* Browser (dgs-browser) : A dgs browser.<br />
* Button (dgs-dxbutton): A button.<br />
* Combo Box (dgs-dxcombobox + dgs-dxcombobox-Box) : A combo box.<br />
* Check Box (dgs-dxcheckbox) : A check box that with 3 states (checked, unchecked and indeterminate).<br />
* Detect Area (dgs-dxdetectarea): A custom detect area.<br />
* Edit (dgs-dxedit): An edit.<br />
* Gridlist (dgs-dxgridlist): A grid list.<br />
* Image (dgs-dximage): A dynamic image.<br />
* Label (dgs-dxlabel): A text label.<br />
* Media Browser (dgs-dxmedia) : A media browser that is used to load video/audio/gif.<br />
* Memo (dgs-dxmemo): A memo.<br />
* Progress Bar (dgs-dxprogressbar): A Progress Bar.<br />
* Radio Button (dgs-dxradiobutton): A Radio Button.<br />
* ScrollBar (dgs-dxscrollbar): A scroll bar.<br />
* ScrollPane (dgs-dxscrollpane): A scroll pane.<br />
* Switch Button(dgs-dxswitchbutton): A switch button.<br />
* Tab Panel (dgs-dxtabpanel + dgs-dxtab) : A tab panel. <br />
* Window (dgs-dxwindow): A window.<br />
<br />
'''Notice'''<br />
*It is recommended to change the resource name to 'dgs'.<br />
*This is a resource, if you want to use the functions exported by this resource, you should use an exported function prefix ('''exports.dgs:''') call in your code, such as<br />
<syntaxhighlight lang="lua"><br />
label = exports.dgs:dgsCreateLabel(0, 0, 0.5, 0.1, "text", true)<br />
</syntaxhighlight><br />
*Here is a feasible way to shorten the name of an exported function:<br />
<syntaxhighlight lang="lua"><br />
DGS = exports.dgs --shorten the export function prefix<br />
label = DGS:dgsCreateLabel(0,0,0.5,0.1,"text",true) --create a label<br />
</syntaxhighlight><br />
*From the latest version, it no longer needs '''exports.dgs:''', instead we can do<br />
<syntaxhighlight lang="lua"><br />
loadstring(exports.dgs:dgsImportFunction())()-- load functions<br />
label = dgsCreateLabel(0,0,0.5,0.1,"text",true) --create a label<br />
</syntaxhighlight><br />
'''Object Oriented Programming'''<br />
<syntaxhighlight lang="lua"><br />
loadstring(exports.dgs:dgsImportOOPClass(true))()-- load OOP class<br />
window = dgsWindow(0,0,0.5,0.1,"test",true) --create a window with oop<br />
label = window:dgsLabel(0,0,1,1,"label",true) --create a label inside the window<br />
label.text = "DGS OOP Test" --set text<br />
</syntaxhighlight><br />
<br />
'''Want to talk to us?'''<br />
*Join Discord Server: https://discord.gg/QEs8q6W<br />
<br />
<br />
'''Special thanks to the following for their help (Respect the contributors)''':<br />
* Axel, Senpai, ZoNe<br />
* DiGiTal, #Dv^, maksam07<br />
* Scorpyo, Kingleonide, Bullet(.el3tar)<br />
* Allerek, Deihim007, OmarSwaitti(HankVoight)<br />
* FlyingFork, xLive<br />
Special thanks to:<br />
* Ahmed Ly<br />
* ᴛᴇᴍᴏɪꜱ <br />
<br />
='''DGS Tips'''=<br />
*[[DGS Events and GUI Events]]<br />
*[[DGS Functions and GUI Functions]]<br />
*[[DGS Grid List]]<br />
*[[DGS OOP Class]]<br />
*[[DGS Style System]]<br />
*[[G2D|DGS GUI To DGS]]<br />
<br />
='''DGS Element Properties'''=<br />
{{DGSPROPERTIES}}<br />
<br />
='''Client Functions'''=<br />
{{DGSFUNCTIONS}}<br />
<br />
=Client Events=<br />
{{DGSEVENTS}}<br />
<br />
=Last=<br />
'''Everyone is welcome to make suggestions, test the script, help make adjustments/finish the wiki, etc.'''<br />
[[Category:Resource]]<br />
<br />
[[ar:Dgs]]<br />
[[ZH-CN:Dgs]]<br />
[[PL:Dgs]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=Sync_interval_settings&diff=67087
Sync interval settings
2020-07-25T12:00:29Z
<p>XNikoXD: Updated intervals based on https://github.com/multitheftauto/mtasa-blue/blob/927509565ab3a8d48df006440654c38e0942aa89/Server/mods/deathmatch/logic/CMainConfig.cpp</p>
<hr />
<div>==About player sync==<br />
Player key sync is always done on demand. i.e. Player presses W, (or pushes forward on the joystick), and the sync for that is sent straight away to the server, and then to the other clients.<br />
There is no setting to limit key sync as it is an essential component to minimize latency.<br />
The 'player_sync_interval' below, is the interval between positional and rotational corrections to key sync. This is in case the movement interpreted by the key sync system on remote clients has introduced any errors.<br />
<br />
==Default values==<br />
{| class="wikitable"<br />
|'''Name'''<br />
|'''Default (ms)'''<br />
|'''Valid range'''<br />
|'''Description'''<br />
|-<br />
| player_sync_interval<br />
| 100<br />
| 50-4000<br />
| Time between key sync correction updates for players. (Note: Player key sync is always done on demand and is not affected by any setting) (Note2: Don't set player_sync_interval interval too high, it will cause fake network troubles)<br />
|-<br />
| lightweight_sync_interval<br />
| 1500<br />
| 50-4000<br />
| Time between updates for very far away players<br />
|-<br />
| camera_sync_interval<br />
| 500<br />
| 50-4000<br />
| How often to tell the server of any client side changes to the local players camera position and target.<br />
|-<br />
| ped_sync_interval<br />
| 400<br />
| 50-4000<br />
| Time between updates for non-player peds<br />
|-<br />
| unoccupied_vehicle_sync_interval<br />
| 1000<br />
| 50-4000<br />
| Time between updates for unoccupied vehicles<br />
|-<br />
| keysync_mouse_sync_interval<br />
| 100<br />
| 50-4000<br />
| Minimum gap between mouse movement updates being sent to the server<br />
|-<br />
| keysync_analog_sync_interval<br />
| 100<br />
| 50-4000<br />
| Minimum gap between joystick partial axes movement updates being sent to the server. (Full axes movement is treated as key sync and is not limited by this setting)<br />
|-<br />
|}<br />
<br />
==Suggested settings==<br />
===Bandwith and CPU saver===<br />
{| class="wikitable"<br />
|-<br />
| player_sync_interval<br />
| 200<br />
|-<br />
| lightweight_sync_interval<br />
| 3000<br />
|-<br />
|}<br />
<br />
===Bandwith and CPU super saver===<br />
{| class="wikitable"<br />
|-<br />
| player_sync_interval<br />
| 300<br />
|-<br />
| lightweight_sync_interval<br />
| 4000<br />
|-<br />
|}<br />
<br />
===Less annoying unoccupied vehicles===<br />
{| class="wikitable"<br />
|-<br />
| unoccupied_vehicle_sync_interval<br />
| 500<br />
|-<br />
|}<br />
<br />
===Uber sync (bandwidth and CPU intensive)===<br />
{| class="wikitable"<br />
|-<br />
| player_sync_interval<br />
| 50<br />
|-<br />
| keysync_mouse_sync_interval<br />
| 50<br />
|-<br />
| keysync_analog_sync_interval<br />
| 50<br />
|-<br />
|}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=SetGlitchEnabled&diff=66509
SetGlitchEnabled
2020-05-12T12:13:58Z
<p>XNikoXD: Added "kickoutofvehicle_onmodelreplace"</p>
<hr />
<div>__NOTOC__<br />
{{Server function}}<br />
This function enables or disables glitches that are found in the original Single Player game that can be used to gain an advantage in multiplayer. <br />
{{Note|By default all these glitches are disabled - use this function to '''enable''' them.}}<br />
<br />
Users of the '''fastmove''' glitch may additionally want to install [https://community.mtasa.com/index.php?p=resources&s=details&id=13368 this resource to disable crouchsliding]. <br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua">bool setGlitchEnabled ( string glitchName, bool enable )</syntaxhighlight><br />
<br />
===Required Arguments===<br />
*'''glitchName:''' the name of the property to set. Possible values are:<br />
{{Glitches}}<br />
*'''enable:''' whether or not to enable the glitch.<br />
<br />
===Returns===<br />
Returns ''true'' if successful, ''false'' otherwise.<br />
<br />
==Example==<br />
This example enables all glitches in the server once the resource is loaded.<br />
<syntaxhighlight lang="lua"><br />
local glitches = {"quickreload", "fastmove", "fastfire", "crouchbug", "highcloserangedamage", "hitanim", "fastsprint", "baddrivebyhitbox", "quickstand", "kickoutofvehicle_onmodelreplace"}<br />
<br />
function enableGlitches()<br />
for _, glitch in ipairs(glitches) do<br />
setGlitchEnabled(glitch, true)<br />
end <br />
end<br />
addEventHandler("onResourceStart", resourceRoot, enableGlitches)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Server functions}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=DxDrawPrimitive3D&diff=64353
DxDrawPrimitive3D
2019-09-15T09:40:59Z
<p>XNikoXD: Created page with "__NOTOC__ {{Client function}} This function draws a 3D primitive in the 3D world - rendered for '''one''' frame. This should be used in conjunction with onClientRender..."</p>
<hr />
<div>__NOTOC__ <br />
{{Client function}} <br />
This function draws a 3D primitive in the 3D world - rendered for '''one''' frame. This should be used in conjunction with [[onClientRender]] in order to display continuously.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool dxDrawPrimitive3D ( string primitiveType, bool postGUI, table vertex1, table vertex2, table vertex3 [, table vertex4, ...] )<br />
</syntaxhighlight><br />
<br />
[[File:Primitive.png|thumb|A four vertex primitive example using "trianglefan"]]<br />
<br />
===Required Arguments=== <br />
* '''primitiveType:''' The type of primitive to be drawn. This could be:<br />
"pointlist"<br />
"linelist"<br />
"linestrip"<br />
"trianglefan"<br />
"trianglelist"<br />
"trianglestrip"<br />
* '''postGUI:''' A bool representing whether the line should be drawn on top of or behind any ingame GUI (rendered by CEGUI).<br />
* '''vertex1:''' A table with the coordinates of the vertex plus its color.<br />
* '''vertex2:''' A table with the coordinates of the vertex plus its color.<br />
* '''vertex3:''' A table with the coordinates of the vertex plus its color.<br />
<br />
The vertex should be passed like this:<br />
<syntaxhighlight lang="lua"><br />
{x, y, z, color}<br />
</syntaxhighlight><br />
<br />
==Optional Arguments==<br />
{{OptionalArg}}<br />
* '''vertexN:''' A table with the coordinates of the vertex plus its color. You can add as much as you want.<br />
<br />
===Returns===<br />
Returns a ''true'' if the operation was successful, ''false'' otherwise.<br />
<br />
==Example== <br />
This is a small example of creating 3D Primitive object with 4 vertex that will spawn on 'The Well Stacked Pizza Co.' in Idlewood.<br />
<syntaxhighlight lang="lua"><br />
local primitive = {<br />
{2087.8, -1804.2, 13.5, tocolor(255, 0, 0)}, <br />
{2087.7, -1810.5, 13.5, tocolor(0, 255, 0)}, <br />
{2092.7, -1813.6, 17.7, tocolor(0, 0, 255)},<br />
{2097.5, -1806.8, 16, tocolor(255, 255, 255)}<br />
}<br />
<br />
function draw()<br />
dxDrawPrimitive3D("trianglefan", false, unpack(primitive))<br />
end<br />
addEventHandler("onClientRender", root, draw)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Drawing_functions}}<br />
<br />
[[hu:dxDrawLine3D]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=File:Primitive.png&diff=64352
File:Primitive.png
2019-09-15T09:37:11Z
<p>XNikoXD: </p>
<hr />
<div></div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=User:XNikoXD&diff=64234
User:XNikoXD
2019-09-10T05:46:50Z
<p>XNikoXD: </p>
<hr />
<div>Usually known as Platin. Owner, creator and scripter of [https://www.proyectomila.net Proyecto Mila: Roleplay.]<br />
<br />
[https://forum.mtasa.com/profile/27677-platin-xnikoxd/ Forum profile]<br />
[https://www.youtube.com/channel/UCMxquoB3aKfVXQkw1egDpMA Youtube channel]<br />
[https://www.facebook.com/platinMTA/ Facebook page]<br />
[https://github.com/PlatinMTA Github profile]<br />
Discord: Platin#8049</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=EngineRequestModel&diff=64233
EngineRequestModel
2019-09-10T03:07:57Z
<p>XNikoXD: Added an example</p>
<hr />
<div>__NOTOC__<br />
{{Client function}}<br />
{{New feature/item|3.0160|1.5.7|20147|This function is used to assign the next available model ID to a certain element type. Currently only "ped" is supported.}}<br />
{{Note|<br />
Needs checking / improving.}}<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool engineRequestModel ( str elementType )<br />
</syntaxhighlight><br />
===Required Arguments===<br />
*'''elementType''': this must be "ped".<br />
<br />
===Returns===<br />
Returns an ''integer'' of the model ID that was available to be assigned to the element type, ''false'' if no free model ID available or invalid element type.<br />
<br />
==Example==<br />
This example creates a ped and then gives you the opportunity to change its model. If the resource stops, then the IDs allocated will be deallocated. Use ''/cap'' for creating the ped and ''/sap'' to skin the ped. You will need some skins added to a folder and to the meta.xml for ''/sap'' to work.<br />
<syntaxhighlight lang="lua"><br />
local peds = {}<br />
function createAllocatedPed()<br />
local x, y, z = getElementPosition(localPlayer)<br />
local id = engineRequestModel("ped")<br />
peds[id] = createPed(id, x+0.5, y, z+0.5)<br />
outputChatBox("New ped with ID "..id.." created.")<br />
end<br />
addCommandHandler("cap", createAllocatedPed, false, false)<br />
<br />
function skinAllocatedPeds()<br />
local txd, dff;<br />
for id,ped in pairs(peds) do<br />
if fileExists("skins/" .. id .. ".txd") and fileExists("skins/" .. id .. ".dff") then<br />
txd = engineLoadTXD("skins/" .. id .. ".txd")<br />
engineImportTXD(txd, id)<br />
dff = engineLoadDFF("skins/" .. id .. ".dff")<br />
engineReplaceModel(dff, id)<br />
outputChatBox("Model ID "..id.." changed correctly.")<br />
else<br />
outputChatBox("Model ID "..id.." couldn't change. REASON: skins/" .. id .. ".txd or skins/" .. id .. ".dff does not exist.")<br />
end<br />
end<br />
end<br />
addCommandHandler("sap", skinAllocatedPeds, false, false)<br />
<br />
function onStop()<br />
for id,ped in pairs(peds) do<br />
engineFreeModel(id)<br />
end<br />
end<br />
addEventHandler("onClientResourceStop", resourceRoot, onStop)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Engine functions}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=Character_Skins&diff=64232
Character Skins
2019-09-10T02:55:58Z
<p>XNikoXD: </p>
<hr />
<div>Skins that the player may use (pedestrian skins).<br />
<br />
*[[All Skins Page]] - Not recommended for slow Internet<br />
*[[Special Skins Page]] - New skins available after MTA 1.1<br />
*[[Gang Skins]]<br />
*[[Female Skins]]<br />
*[[Male Skins]]<br />
<br />
<br />
'''Skin tables:'''<br />
----<br />
<syntaxhighlight lang="lua"><br />
-- a complete table<br />
allSkins = getValidPedModels()<br />
-- separate tables<br />
maleSkins = {0, 1, 2, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 57, 58, 59, 60, 61, 62, 66, 67, 68, 70, 71, 72, 73, 78, 79, 80, 81, 82, 83, 84, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, 132, 133, 134, 135, 136, 137, 142, 143, 144, 146, 147, 153, 154, 155, 156, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 170, 171, 173, 174, 175, 176, 177, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 200, 202, 203, 204, 206, 209, 210, 212, 213, 217, 220, 221, 222, 223, 227, 228, 229, 230, 234, 235, 236, 239, 240, 241, 242, 247, 248, 249, 250, 252, 253, 254, 255, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 270, 271, 272, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 290, 291, 292, 293, 294, 295, 296, 297, 299, 300, 301, 302, 303, 305, 306, 307, 308, 309, 310, 311, 312}<br />
femaleSkins = {9, 10, 11, 12, 13, 31, 38, 39, 40, 41, 53, 54, 55, 56, 63, 64, 69, 75, 76, 77, 85, 87, 88, 89, 90, 91, 92, 93, 129, 130, 131, 138, 139, 140, 141, 145, 148, 150, 151, 152, 157, 169, 172, 178, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 201, 205, 207, 211, 214, 215, 216, 218, 219, 224, 225, 226, 231, 232, 233, 237, 238, 243, 244, 245, 246, 251, 256, 257, 263, 298, 304}<br />
</syntaxhighlight><br />
<br />
<br />
<br />
{{New items|3.0160|1.5.7|<br />
* The following ID's were unused by GTA SA, so in MTA SA we have applied the same character skin to each of the following ID's. This allows servers to apply skin mods to these new ID's. These are the new 236 ID's you can use for new skins:<br />
<syntaxhighlight lang="lua"><br />
3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 273, 289, 329, 340, 382, 383, 398, 399,<br />
612, 613, 614, 662, 663, 665, 666, 667, 668, 699, 793, 794, 795, 796, 797, 798, 799, 907,<br />
908, 909, 965, 999, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205,<br />
1206, 1326, 1573, 1699, 2883, 2884, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144,<br />
3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159,<br />
3160, 3161, 3162, 3163, 3164, 3165, 3166, 3176, 3177, 3179, 3180, 3181, 3182, 3183,<br />
3184, 3185, 3186, 3188, 3189, 3190, 3191, 3192, 3194, 3195, 3196, 3197, 3198, 3199, 3200,<br />
3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3215,<br />
3216, 3217, 3218, 3219, 3220, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231,<br />
3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240, 3245, 3247, 3248, 3251, 3254,<br />
3266, 3348, 3349, 3416, 3429, 3610, 3611, 3784, 3870, 3871, 3883, 3889, 3974, 4542, 4543,<br />
4544, 4545, 4546, 4547, 4548, 4549, 4763, 4764, 4765, 4766, 4767, 4768, 4769, 4770, 4771,<br />
4772, 4773, 4774, 4775, 4776, 4777, 4778, 4779, 4780, 4781, 4782, 4783, 4784, 4785, 4786,<br />
4787, 4788, 4789, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4797, 4798, 4799, 4800, 4801,<br />
4802, 4803, 4804, 4805, 5090, 5104, 5376, 5377, 5378, 5379, 5380, 5381, 5382, 5383,<br />
5384, 5385, 5386, 5387, 5388, 5389<br />
</syntaxhighlight><br />
* Check [[engineRequestModel]] for more information.<br />
|20147}}<br />
<br />
<br />
'''Sectioned Skin Pages:'''<br />
----<br />
*[[Skins Page 1]]: 7, 9-29<br />
*[[Skins Page 2]]: 30-41, 43-52<br />
*[[Skins Page 3]]: 53-64, 66-73, 75-76<br />
*[[Skins Page 4]]: 77-85, 87-99<br />
*[[Skins Page 5]]: 100-118, 120-122<br />
*[[Skins Page 6]]: 123-144<br />
*[[Skins Page 7]]: 145-148, 150-167<br />
*[[Skins Page 8]]: 168-189<br />
*[[Skins Page 9]]: 190-207, 209-212<br />
*[[Skins Page 10]]: 213-234<br />
*[[Skins Page 11]]: 235-238, 240-257<br />
*[[Skins Page 12]]: 258-264, 274-288<br />
*[[Skins Page 13]]: 290-312<br />
<br />
==Notes:==<br />
*Last valid skin ID: 312<br />
<br />
*The following pairs of IDs produce same character (1st ID used in lists, 2nd disabled)<br />
**118:119 <br />
**148:149<br />
<br />
*Non-working IDs<br />
**3 4 5 6 8 42 65 74 86 119 149 208 273 289<br />
<br />
==Skin functions==<br />
{{Template:Skin_functions}}<br />
<br />
==See Also==<br />
[[id|ID Lists]]<br />
<br />
[[hu:Character Skins]]<br />
[[uk:Character Skins]]<br />
[[tr:Karakter Tipleri]]<br />
[[it:Skin Personaggi]]<br />
[[ru:Character Skins]]<br />
[[es:Skins de Personajes]]<br />
[[de:Charakterskins]]<br />
[[zh-cn:角色皮肤]]<br />
<br />
[[Category:ID Lists]]</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=User:XNikoXD&diff=62557
User:XNikoXD
2019-05-04T05:56:26Z
<p>XNikoXD: Created page with "Ussually known as Platin. Owner, creator and scripter of [https://www.proyectomila.net Proyecto Mila: Roleplay.] [https://forum.mtasa.com/profile/27677-platin-xnikoxd/ Forum..."</p>
<hr />
<div>Ussually known as Platin. Owner, creator and scripter of [https://www.proyectomila.net Proyecto Mila: Roleplay.]<br />
<br />
[https://forum.mtasa.com/profile/27677-platin-xnikoxd/ Forum profile]<br />
[https://www.youtube.com/channel/UCMxquoB3aKfVXQkw1egDpMA Youtube channel]<br />
[https://www.facebook.com/platinMTA/ Facebook page]<br />
[https://github.com/PlatinMTA Github profile]<br />
Discord: Platin#8049</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=SetTimer&diff=62538
SetTimer
2019-05-01T10:07:14Z
<p>XNikoXD: Added changes made on r16715 and a more complex example which should help people struggling using source on setTimers</p>
<hr />
<div>__NOTOC__<br />
{{Server client function}}<br />
This function allows you to trigger a function after a number of milliseconds have elapsed. You can call one of your own functions or a built-in function. For example, you could set a timer to spawn a player after a number of seconds have elapsed.<br />
<br />
Once a timer has finished repeating, it no longer exists.<br />
<br />
The minimum accepted interval is 50ms.<br />
<br />
{{New feature/item|3.0157|1.5.6|16715|The minimum accepted interval is now 0ms.}}<br />
<br />
'''Note: The speed at which a client side timer runs can be completely unreliable if a client is maliciously modifying their operating system speed, timers could run much faster or slower.'''<br />
<br />
Multi Theft Auto guarantees that the timer will be triggered after ''at least'' the interval you specify. The resolution of the timer is tied to the frame rate (server side and client-side). All the overdue timers are triggered at a single point each frame. This means that if, for example, the player is running at 30 frames per second, then two timers specified to occur after 100ms and 110ms would more than likely occur during the same frame, as the difference in time between the two timers (10ms) is less than half the length of the frame (33ms). As with most timers provided by other languages, you shouldn't rely on the timer triggering at an exact point in the future. <br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
timer setTimer ( function theFunction, int timeInterval, int timesToExecute, [ var arguments... ] )<br />
</syntaxhighlight> <br />
{{OOP||[[Timer]]}}<br />
===Required Arguments=== <br />
*'''theFunction:''' The function you wish the timer to call.<br />
{{Note|The hidden global variable '''sourceTimer''' contains the currently executing timer userdata}}<br />
*'''timeInterval:''' The number of milliseconds that should elapse before the function is called. (the minimum is 50 (0 on 1.5.6 r16715); 1000 milliseconds = 1 second)<br />
*'''timesToExecute:''' The number of times you want the timer to execute, or 0 for infinite repetitions.<br />
<br />
===Optional Arguments=== <br />
{{OptionalArg}} <br />
*'''arguments:''' Any arguments you wish to pass to the function can be listed after the ''timesToExecute'' argument. Note that any tables you want to pass will get cloned, whereas metatables and functions/function references in that passed table will get lost. Also changes you make in the original table before the function gets called won't get transferred.<br />
<br />
===Returns===<br />
Returns a [[timer]] pointer if the timer was set successfully, ''false'' if the arguments are invalid or the timer could not be set.<br />
<br />
==Examples==<br />
This example will output some text after a small delay.<br />
<br />
<syntaxhighlight lang="lua"><br />
-- define function to be called<br />
function delayedChat ( text )<br />
outputChatBox ( "Delayed text: " .. text )<br />
end<br />
<br />
-- set a timer so the function is called after 1 second<br />
setTimer ( delayedChat, 1000, 1, "Hello, World!" )<br />
</syntaxhighlight><br />
<br />
1 second after the line above has been executed, the text ''Delayed text: Hello, World!'' will be displayed in the chat box.<br />
<br />
This example will nest a whole function within a timer. This is nice for things like setting variables without having to call a function outside of your code block.<br />
<br />
<syntaxhighlight lang="lua"><br />
function mainFunction()<br />
outputChatBox ("Instant text!")<br />
setTimer ( function()<br />
outputChatBox ( "5 second delay text!" )<br />
end, 5000, 1 )<br />
end<br />
<br />
mainFunction() --call function<br />
</syntaxhighlight><br />
<br />
This example outputs some random text to the chat every 300000 milliseconds (5 minutes).<br />
<syntaxhighlight lang="lua"><br />
setTimer(function()<br />
outputChatBox("Text " .. math.random(1,4))<br />
end, 300000, 0)<br />
</syntaxhighlight><br />
<br />
<br />
<section name="Yet another example" class="server" show="false"><br />
This example should send a global message about the death of a player on a random time. I used [https://wiki.multitheftauto.com/wiki/Math.round math.round] in this example to give a nicer output.<br />
<syntaxhighlight lang="lua"><br />
function math.round(number, decimals, method) -- math.round, useful function taken from the wiki: https://wiki.multitheftauto.com/wiki/Math.round<br />
decimals = decimals or 0<br />
local factor = 10 ^ decimals<br />
if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor<br />
else return tonumber(("%."..decimals.."f"):format(number)) end<br />
end<br />
<br />
function onWasted()<br />
local delay = math.random(500, 5000) -- 0.5s to 5s of delay<br />
setTimer(function(thePlayer) -- Starts the Timer<br />
local whoDied = "Someone" -- In case the name can't be read, Someone will appear<br />
if isElement(thePlayer) then -- This checks if thePlayer's element still exists (which means thePlayer hasnt disconnected yet)<br />
whoDied = getPlayerName(thePlayer) -- Changes Someone to thePlayer's name<br />
end<br />
outputChatBox(whoDied.." #FFFFFFhas #FF0000died #FFFFFF"..math.round(delay/1000, 1).." seconds ago.", root, 255, 175, 0, true) -- This will output to everyone on the server that thePlayer (or Someone) died X seconds ago.<br />
end<br />
delay, 1, source) -- The source at the end is an argument for the function we made before, you can't use the source directly because it won't be readed<br />
end<br />
addEventHandler("onPlayerWasted", root, onWasted) -- Executed every time someone dies<br />
</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Utility functions}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=OnVehicleDamage&diff=54809
OnVehicleDamage
2018-04-27T00:13:14Z
<p>XNikoXD: </p>
<hr />
<div>__NOTOC__ <br />
{{Server event}}<br />
This event is triggered when a vehicle is damaged. If you want to get the attacker you can use [[onClientVehicleDamage]].<br />
<br />
==Parameters== <br />
<syntaxhighlight lang="lua"><br />
float loss<br />
</syntaxhighlight> <br />
<br />
*'''loss''': a [[float]] representing the amount of health the [[vehicle]] lost.<br />
<br />
==Source==<br />
The [[event system#Event source|source]] of this event is the [[vehicle]] that got damaged.<br />
<br />
==Example== <br />
This example displays a message with the amount of health lost when a vehicle gets damaged. <br />
<syntaxhighlight lang="lua"><br />
function displayVehicleLoss(loss)<br />
local thePlayer = getVehicleOccupant(source)<br />
if(thePlayer) then -- Check there is a player in the vehicle<br />
outputChatBox("Your vehicle just lost " .. tonumber(loss) .. " health.", thePlayer) -- Display the message<br />
end<br />
end<br />
<br />
addEventHandler("onVehicleDamage", root, displayVehicleLoss)<br />
</syntaxhighlight><br />
<br />
{{See also/Server event|Vehicle events}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=OnVehicleDamage&diff=54808
OnVehicleDamage
2018-04-26T23:58:15Z
<p>XNikoXD: Added a gateway to onClientVehicleDamage so players can see a way to get the vehicle attacker.</p>
<hr />
<div>__NOTOC__ <br />
{{Server event}}<br />
This event is triggered when a vehicle is damaged. If you wan't to get the attacker you can use [[onClientVehicleDamage]].<br />
<br />
==Parameters== <br />
<syntaxhighlight lang="lua"><br />
float loss<br />
</syntaxhighlight> <br />
<br />
*'''loss''': a [[float]] representing the amount of health the [[vehicle]] lost.<br />
<br />
==Source==<br />
The [[event system#Event source|source]] of this event is the [[vehicle]] that got damaged.<br />
<br />
==Example== <br />
This example displays a message with the amount of health lost when a vehicle gets damaged. <br />
<syntaxhighlight lang="lua"><br />
function displayVehicleLoss(loss)<br />
local thePlayer = getVehicleOccupant(source)<br />
if(thePlayer) then -- Check there is a player in the vehicle<br />
outputChatBox("Your vehicle just lost " .. tonumber(loss) .. " health.", thePlayer) -- Display the message<br />
end<br />
end<br />
<br />
addEventHandler("onVehicleDamage", root, displayVehicleLoss)<br />
</syntaxhighlight><br />
<br />
{{See also/Server event|Vehicle events}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=SetPedControlState&diff=54800
SetPedControlState
2018-04-23T21:51:46Z
<p>XNikoXD: Now it works with localPlayer, deleted the warning.</p>
<hr />
<div>__NOTOC__<br />
{{Client function}}<br />
This function makes a [[ped]] or [[player]] press or release a certain control.<br />
<br />
{{Note|You can't use enter_exit or enter_passanger with a ped}}<br />
<br />
<br />
{{New feature/item|3.0160|1.5|11427|<br />
*Works with local player aswell.<br />
}}<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool setPedControlState ( ped thePed, string control, bool state )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
*'''thePed:''' the ped you want to press or release a control.<br />
*'''control:''' the name of the control of which to change the state. See [[control names]] for a list of valid names.<br />
*'''state:''' the new control state. ''true'' means pressed, ''false'' is released.<br />
<br />
===Returns===<br />
Returns ''true'' if successful, ''false'' if otherwise.<br />
==Example==<br />
<section name="Client" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
function newPed()<br />
local x, y, z = getElementPosition(localPlayer)<br />
local myPed = createPed(0, x + 1, y, z)<br />
if myPed then <br />
setPedControlState(myPed,"forwards", true)<br />
end <br />
end<br />
addCommandHandler("ped",newPed)<br />
</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Client ped functions}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=ResetAmbientSounds&diff=53148
ResetAmbientSounds
2017-12-20T05:51:37Z
<p>XNikoXD: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
{{Needs Example}}<br />
This function is used to reset the background sounds to the default setting.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool resetAmbientSounds()<br />
</syntaxhighlight><br />
<br />
===Returns===<br />
Returns true if the ambient sounds were reset, false otherwise.<br />
<br />
==Example==<br />
<syntaxhighlight lang="lua"><br />
function resetAmbient() <br />
resetAmbientSounds() --This will reset the Ambient Sounds of the game<br />
end<br />
addCommandHandler("resetambient", resetAmbient) -- If you use this command it would trigger the resetAmbient function<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Client world functions}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=ResetVehiclesLODDistance&diff=53147
ResetVehiclesLODDistance
2017-12-20T05:50:52Z
<p>XNikoXD: </p>
<hr />
<div>{{Client function}}{{Needs Example}}__NOTOC__<br />
{{New feature/item|3.0154|1.5.3|11199|<br />
Resets the distance of vehicles LOD to default. Default values depends on client setting. If client has enabled ''high detail vehicles'' in video options, value will be reset to (500, 500) - otherwise to (70, 150). You can check value of this option using [[dxGetStatus]] (''SettingHighDetailVehicles'').<br />
}}<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool resetVehiclesLODDistance ( )<br />
</syntaxhighlight><br />
<br />
===Returns===<br />
Returns true if the ambient sounds were reset, false otherwise.<br />
<br />
==Example==<br />
<syntaxhighlight lang="lua"><br />
function resetLOD() <br />
resetVehiclesLODDistance() --This will reset the LOD distance<br />
end<br />
addCommandHandler("resetlod", resetLOD) -- If you use this command it would trigger the resetLOD function<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
* [[engineGetModelLODDistance]]<br />
* [[engineSetModelLODDistance]]<br />
{{World functions}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=Rgb2hex&diff=53146
Rgb2hex
2017-12-20T05:45:54Z
<p>XNikoXD: Fixed the code (on if b1 > 9 and if b2 > 9 insted of equal it to b1 and b2 it would equal it to r1 and r2)</p>
<hr />
<div>__NOTOC__<br />
{{Useful Function}}<br />
This function convert the R,G,B color codes to hexadecimal.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua">string rgb2Hex ( int red, int green, int blue)</syntaxhighlight><br />
<br />
===Required Arguments===<br />
* '''red:''' The amount of [http://en.wikipedia.org/wiki/RGBA_color_space red] in the color (0-255).<br />
<br />
* '''green:''' The amount of [http://en.wikipedia.org/wiki/RGBA_color_space green] in the color (0-255).<br />
<br />
* '''blue:''' The amount of [http://en.wikipedia.org/wiki/RGBA_color_space blue] in the color (0-255).<br />
<br />
==Code==<br />
<syntaxhighlight lang="lua"><br />
function rgb2hex(r,g,b)<br />
<br />
local hex_table = {[10] = 'A',[11] = 'B',[12] = 'C',[13] = 'D',[14] = 'E',[15] = 'F'}<br />
<br />
local r1 = math.floor(r / 16)<br />
local r2 = r - (16 * r1)<br />
local g1 = math.floor(g / 16)<br />
local g2 = g - (16 * g1)<br />
local b1 = math.floor(b / 16)<br />
local b2 = b - (16 * b1)<br />
<br />
if r1 > 9 then r1 = hex_table[r1] end<br />
if r2 > 9 then r2 = hex_table[r2] end<br />
if g1 > 9 then g1 = hex_table[g1] end<br />
if g2 > 9 then g2 = hex_table[g2] end<br />
if b1 > 9 then b1 = hex_table[b1] end<br />
if b2 > 9 then b2 = hex_table[b2] end<br />
<br />
return "#" .. r1 .. r2 .. g1 .. g2 .. b1 .. b2<br />
<br />
end<br />
</syntaxhighlight><br />
<br />
==Example==<br />
<syntaxhighlight lang="lua"><br />
local color = rgb2hex(255,50,25)<br />
<br />
outputChatBox("255,50,25 = " .. color)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Useful_Functions}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=OnPlayerSpawn&diff=53145
OnPlayerSpawn
2017-12-20T05:40:58Z
<p>XNikoXD: Changed the example cuz it would give a loop</p>
<hr />
<div>__NOTOC__ <br />
{{Server event}}<br />
This event is called when a player spawns.<br />
<br />
==Parameters==<br />
<syntaxhighlight lang="lua"><br />
float posX, float posY, float posZ, float spawnRotation, team theTeam, int theSkin, int theInterior, int theDimension<br />
</syntaxhighlight><br />
<br />
*'''posX''': The X position the player spawned at<br />
*'''posY''': The Y position the player spawned at<br />
*'''posZ''': The Z position the player spawned at<br />
*'''spawnRotation''': The rotation the player spawned with<br />
*'''theTeam''': The team the player spawned with<br />
*'''theSkin''': The skin / model the player spawned with<br />
*'''theInterior''': The interior the player spawned in<br />
*'''theDimension''': The dimension the player spawned in<br />
<br />
<!-- Add the event's source in the section below --><br />
==Source==<br />
The [[event system#Event source|source]] of this event is the [[player]] that just spawned.<br />
<br />
==Example== <br />
This example plays a sound when a player spawns.<br />
<syntaxhighlight lang="lua"><br />
-- when a player spawns,<br />
function player_Spawn ( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension )<br />
-- play a frontend sound for him<br />
playSoundFrontEnd ( source, 16 )<br />
end<br />
-- add the player_Spawn function as a handler for onPlayerSpawn<br />
addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn )<br />
</syntaxhighlight><br />
<br />
<section name="Example 1" class="server" show="true"><br />
This example gives the player a weapon whenever he spawns<br />
<syntaxhighlight lang="lua"><br />
function Spawn()<br />
giveWeapon(source, 31, 500, true) -- Gives the weapon Ak-47, with 500 ammo and on the hand<br />
end<br />
addEventHandler("onPlayerSpawn", root, Spawn) -- This will exec every time a Player spawn<br />
</syntaxhighlight><br />
</section><br />
<br />
{{See also/Server event|Player events}}</div>
XNikoXD
https://wiki.multitheftauto.com/index.php?title=SetPedControlState&diff=53112
SetPedControlState
2017-12-16T04:17:15Z
<p>XNikoXD: Added a note for some users, this function wont work using enter_exit or enter_passanger on peds</p>
<hr />
<div>__NOTOC__<br />
{{Client function}}<br />
This function makes a [[ped]] press or release a certain control. It doesn't work with the local player, so use [[setControlState]] instead.<br />
<br />
{{Note|You can't use enter_exit or enter_passanger with a ped}}<br />
<br />
<br />
{{New feature/item|3.0160|1.5|11427|<br />
*Works with local player aswell.<br />
}}<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool setPedControlState ( ped thePed, string control, bool state )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
*'''thePed:''' the ped you want to press or release a control.<br />
*'''control:''' the name of the control of which to change the state. See [[control names]] for a list of valid names.<br />
*'''state:''' the new control state. ''true'' means pressed, ''false'' is released.<br />
<br />
===Returns===<br />
Returns ''true'' if successful, ''false'' if otherwise.<br />
==Example==<br />
<section name="Client" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
function newPed()<br />
local x, y, z = getElementPosition(localPlayer)<br />
local myPed = createPed(0, x + 1, y, z)<br />
if myPed then <br />
setPedControlState(myPed,"forwards", true)<br />
end <br />
end<br />
addCommandHandler("ped",newPed)<br />
</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Client ped functions}}</div>
XNikoXD