Merge branch 'nightly' into ragemp

This commit is contained in:
Vortrex
2022-04-16 22:39:48 -05:00
172 changed files with 25499 additions and 10148 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
*.code-workspace *.code-workspace
config/database.json config/database.json
config/email.json config/email.json
config/discord.json

11
TODO.md
View File

@@ -1,5 +1,10 @@
* Finish auto-translate * Finish auto-translator
* Add /autotranslate to enable/disable automatic chat translations for all languages, or specific ones by short code (RU, ES, etc)
* Finish working on the new job route system
* Add ways to acquire drugs. Pot/coke plants, meth labs, etc * Add ways to acquire drugs. Pot/coke plants, meth labs, etc
* Finish setting up the persistent NPC system * Finish setting up the persistent NPC system
* Add yes/no prompts for some important things like
* (Business owner) Setting item sell price below order price. Will result in losing money.
* Giving house, biz, or vehicle to clan. Clan leaders can revoke permissions and you may be screwed and not able to change it!
* Deleting character
* Make game messages (big message, small message) into array of types
* Array of message types in shared
* Font, text, duration, etc arrays in client, indexed by type

View File

@@ -1,8 +0,0 @@
{
"host": "localhost",
"user": "",
"pass": "",
"name": "",
"port": 3306,
"usePersistentConnection": true
}

10
config/discord.json Normal file
View File

@@ -0,0 +1,10 @@
{
"sendChat": "true",
"sendConnectEvents": "true",
"sendVehicleEvents": "true",
"sendDeathEvents": "true",
"webhook": {
"enabled": "true",
"webhookBaseURL": "https://example.com/something.php?message={0}&url={1}"
}
}

View File

@@ -1,22 +0,0 @@
{
"enabled": "false",
"smtp": {
"host":"",
"port":"",
"username":"",
"password":"",
"from":"",
"fromName":"",
"useTLS":"true"
},
"bodyContent": {
"confirmEmail": "Welcome to {SERVERNAME}!\nPlease confirm your email by using the command /verifyemail in-game.\n\nYour verification code is: {VERIFICATIONCODE}",
"emailConfirmed": "Your email has been confirmed on {SERVERNAME}!\nYou may now use this email to reset your password, require two-factor authentication on login, receive offline notifications, and more!",
"twoFactorAuthentication": "Please enter the following code to continue on {SERVERNAME} for {GAMENAME}: {2FACODE}",
"accountAuthSuccessAlert": "You or someone else has successfully logged in to your account on {SERVERNAME} for {GAMENAME}.\n\nIP Address: {IPADDRESS}\nLocation: {LOCATION}\nTimestamp: {TIMESTAMP}\n\nIf you have two-factor authentication enabled (Using /2fa in-game), your account can't be accessed unless a correct 2FA code is entered.",
"accountAuthFailAlert": "You or someone else has failed to login to your account on {SERVERNAME} for {GAMENAME}.\nIP Address: {IPADDRESS}\nLocation: {LOCATION}\nTimestamp: {TIMESTAMP}",
"offlineMessageAlert": "You have received a private message on {SERVERNAME} for {GAMENAME}. \nYou are receiving this notification because you enabled email message notifications when you're not connected to the server.\nFrom: {FROMNAME}\nTimestamp: {TIMESTAMP}\nMessage: {MESSAGE}",
"confirmPasswordReset": "You (or someone else) requested to reset your password on {SERVERNAME}!\nPlease confirm this request by entering the code below into the password reset window in-game.\n\nYour verification code is: {VERIFICATIONCODE}\n\n\nIf you did not request a password reset, then there's nothing to worry about since your password can only be reset with the code above.",
"passwordChanged": "Your password on {SERVERNAME} has been changed successfully!"
}
}

View File

@@ -2,9 +2,70 @@
"apiEmail": "example@example.com", "apiEmail": "example@example.com",
"defaultLanguage": "en", "defaultLanguage": "en",
"locales": [ "locales": [
["English", "english", "en"], {
["Russian", "russian", "ru"], "englishName": "English",
["Polish", "polish", "pl"], "stringsFile": "english.json",
["Spanish", "spanish", "es"] "isoCode": "en",
] "flagImageFile": "gb.png",
"countries": ["gb", "us", "au", "bz", "ca", "ie", "jm", "nz", "za", "tt"],
"requiresUnicode": false
},
{
"englishName": "Russian",
"stringsFile": "russian.json",
"isoCode": "ru",
"flagImageFile": "ru",
"countries": ["ru", "ua"],
"requiresUnicode": false
},
{
"englishName": "Polish",
"stringsFile": "polish.json",
"isoCode": "pl",
"flagImageFile": "pl",
"countries": ["pl"],
"requiresUnicode": false
},
{
"englishName": "Spanish",
"stringsFile": "spanish.json",
"isoCode": "es",
"flagImageFile": "es",
"countries": ["es", "ar", "bo", "cl", "co", "cr", "do", "ec", "sv", "gt", "hn", "mx", "ni", "pa", "py", "pe", "pr", "uy", "ve"],
"requiresUnicode": false
},
{
"englishName": "Chinese",
"stringsFile": "chinese.json",
"isoCode": "zh",
"flagImageFile": "cn",
"countries": ["cn", "hk", "sg", "tw"],
"requiresUnicode": true
},
{
"englishName": "Arabic",
"stringsFile": "arabic.json",
"isoCode": "ar",
"flagImageFile": "sa",
"countries": ["dz", "bh", "eg", "iq", "jo", "kw", "lb", "ly", "ma", "om", "qa", "sa", "sy", "tn", "ae", "ye"],
"requiresUnicode": true
}
],
"sendStringsToClient": [
"PropertyEnterCommandLabel",
"PropertyEnterKeyPressLabel",
"BusinessBuyItemsLabel",
"PropertyForSaleLabel",
"PropertyForRentLabel",
"VehicleDealershipLabel",
"TakeJobLabel",
"StartWorkLabel",
"JobEquipAndUniformLabel",
"NotYourJobLabel",
"Locked",
"Unlocked",
"Closed",
"Open",
"JobLabel"
]
} }

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" ?>
<Commands>
<Command Name="gamestats" Hash="3782704029" />
<Command Name="say" Hash="4241071205" />
<Command Name="exit" Hash="2483651598" />
<Command Name="quit" Hash="1135269781" />
<Command Name="clear" Hash="3853644038" />
<Command Name="connect" Hash="1959786783" />
<Command Name="reconnect" Hash="1240758083" />
<Command Name="console" Hash="906219446" />
<Command Name="cvar" Hash="2588334565" />
<Command Name="netstats" Hash="2015089090" />
<Command Name="q" Hash="4110462503" />
<Command Name="disconnect" Hash="3820433" />
<Command Name="fpscounter" Hash="2973827809" />
<Command Name="dumpdoc" Hash="3404143852" />
<Command Name="chatscale" Hash="402639070" />
</Commands>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,95 @@
<?xml version="1.0" ?>
<EventTypes>
<!---->
<EventType Name="OnLocalPlayerEnterSphere" Hash="3890156725" Arguments="1" CanPreventDefault="false" />
<!--**UNUSED**-->
<EventType Name="OnBeforeProcessCamera" Hash="1763657124" Arguments="0" CanPreventDefault="false" />
<!--Called right before the hud is drawn, you should draw your HUD here if you want it under the hud-->
<EventType Name="OnDrawHUD" Hash="2504546524" Arguments="0" CanPreventDefault="true" />
<!--Called when a mouse moves-->
<EventType Name="OnMouseMove" Hash="1865196431" Arguments="3" CanPreventDefault="false" />
<!--Called before the hud is drawn-->
<EventType Name="OnBeforeDrawHUD" Hash="3008683449" Arguments="0" CanPreventDefault="true" />
<!--Called when a keyboard key is down-->
<EventType Name="OnKeyDown" Hash="3091440445" Arguments="3" CanPreventDefault="false" />
<!--Called when a resource starts-->
<EventType Name="OnResourceStart" Hash="1143708828" Arguments="1" CanPreventDefault="true" />
<!--Called when an element is about to stream in-->
<EventType Name="OnElementStreamIn" Hash="2759455221" Arguments="2" CanPreventDefault="true" />
<!--Called when a resource stops-->
<EventType Name="OnResourceStop" Hash="1347867548" Arguments="2" CanPreventDefault="true" />
<!--Called after all the hud is drawn, you should draw your HUD here if you want it over the hud-->
<EventType Name="OnDrawnHUD" Hash="1969344644" Arguments="0" CanPreventDefault="false" />
<!--Called after OnRender2D, usually post processing would be done here-->
<EventType Name="OnPostRender2D" Hash="1025891209" Arguments="0" CanPreventDefault="false" />
<!--Called when all the files are downloaded-->
<EventType Name="OnResourceReady" Hash="4089924796" Arguments="1" CanPreventDefault="false" />
<!--Called whenever an entity is processed-->
<EventType Name="OnEntityProcess" Hash="850679850" Arguments="1" CanPreventDefault="true" />
<!--Called when a ped is created/spawned-->
<EventType Name="OnPedSpawn" Hash="3880839897" Arguments="1" CanPreventDefault="false" />
<!--Called when a ped finished dying or is instantly killed-->
<EventType Name="OnPedDead" Hash="3023102245" Arguments="1" CanPreventDefault="false" />
<!--Called when the camera is about to be processed-->
<EventType Name="OnCameraProcess" Hash="4077277522" Arguments="0" CanPreventDefault="true" />
<!--Called when a ped is damaged-->
<EventType Name="OnPedInflictDamage" Hash="1391854299" Arguments="5" CanPreventDefault="true" />
<!--Called when a ped dies-->
<EventType Name="OnPedWasted" Hash="3129373940" Arguments="4" CanPreventDefault="false" />
<!---->
<EventType Name="OnLocalPlayerExitSphere" Hash="105319985" Arguments="1" CanPreventDefault="false" />
<!--Called when a GUIElement is clicked on-->
<EventType Name="OnGUIClick" Hash="1620463676" Arguments="1" CanPreventDefault="false" />
<!--Called when dodo flight time ends-->
<EventType Name="OnRegisterDodoFlightTime" Hash="3998584707" Arguments="1" CanPreventDefault="true" />
<!--Called when an element is about to be destroyed-->
<EventType Name="OnElementDestroy" Hash="696839637" Arguments="1" CanPreventDefault="true" />
<!--Called when anchor tags are clicked in a GUIHtmlView-->
<EventType Name="OnGUIAnchorClick" Hash="1882824246" Arguments="3" CanPreventDefault="true" />
<!--Called when the mouse leaves the window-->
<EventType Name="OnMouseLeave" Hash="3102340603" Arguments="0" CanPreventDefault="false" />
<!--Called when a cursor button is up-->
<EventType Name="OnCursorUp" Hash="2031527000" Arguments="1" CanPreventDefault="false" />
<!--Called every process-->
<EventType Name="OnProcess" Hash="3150131130" Arguments="1" CanPreventDefault="false" />
<!--Called every prerender-->
<EventType Name="OnPreRender" Hash="2235820386" Arguments="0" CanPreventDefault="false" />
<!--Called every render-->
<EventType Name="OnRender" Hash="2466144783" Arguments="0" CanPreventDefault="false" />
<!--Called when 2D shit should be rendered-->
<EventType Name="OnRender2D" Hash="3260181898" Arguments="0" CanPreventDefault="false" />
<!--Called when a line will be output to the chatbox-->
<EventType Name="OnChatOutput" Hash="2275472839" Arguments="2" CanPreventDefault="true" />
<!--Called when a mouse button is down-->
<EventType Name="OnMouseDown" Hash="2632778956" Arguments="2" CanPreventDefault="false" />
<!--Called when a mouse button is up-->
<EventType Name="OnMouseUp" Hash="3080252785" Arguments="2" CanPreventDefault="false" />
<!--Called when a cursor button is down-->
<EventType Name="OnCursorDown" Hash="3618352285" Arguments="1" CanPreventDefault="false" />
<!--Called when the cursor moves-->
<EventType Name="OnCursorMove" Hash="610929630" Arguments="1" CanPreventDefault="false" />
<!--Called when the mouse scrolls-->
<EventType Name="OnMouseWheel" Hash="1116330591" Arguments="3" CanPreventDefault="false" />
<!--Called when a mouse is connected-->
<EventType Name="OnMouseConnected" Hash="4137684318" Arguments="1" CanPreventDefault="false" />
<!--Called when a mouse is disconnected-->
<EventType Name="OnMouseDisconnected" Hash="2332645211" Arguments="1" CanPreventDefault="false" />
<!--Called when the window is focused-->
<EventType Name="OnFocus" Hash="1989030060" Arguments="0" CanPreventDefault="false" />
<!--Called when the window is defocused-->
<EventType Name="OnLostFocus" Hash="1036525539" Arguments="0" CanPreventDefault="false" />
<!--Called when a keyboard key is up-->
<EventType Name="OnKeyUp" Hash="1763402597" Arguments="3" CanPreventDefault="false" />
<!--Called when a key is typed-->
<EventType Name="OnCharacter" Hash="318128971" Arguments="1" CanPreventDefault="false" />
<!--Called when an element is about to stream out-->
<EventType Name="OnElementStreamOut" Hash="3852636898" Arguments="2" CanPreventDefault="true" />
<!--Called when disconnected from the server-->
<EventType Name="OnDisconnect" Hash="3221334991" Arguments="1" CanPreventDefault="false" />
<!---->
<EventType Name="OnLocalPlayerEnteredVehicle" Hash="3395021369" Arguments="1" CanPreventDefault="false" />
<!---->
<EventType Name="OnLocalPlayerExitedVehicle" Hash="1654569001" Arguments="1" CanPreventDefault="false" />
<!---->
<EventType Name="OnLocalPlayerSwitchWeapon" Hash="3670373318" Arguments="2" CanPreventDefault="false" />
</EventTypes>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" ?>
<Commands>
<Command Name="dumpdoc" Hash="3404143852" />
<Command Name="refresh" Hash="1619108091" />
<Command Name="restart" Hash="3891864071" />
<Command Name="stop" Hash="3109426870" />
<Command Name="cmd" Hash="794565824" />
<Command Name="start" Hash="2675529103" />
<Command Name="stopall" Hash="1683731152" />
<Command Name="exit" Hash="2483651598" />
<Command Name="quit" Hash="1135269781" />
<Command Name="help" Hash="143088812" />
<Command Name="say" Hash="4241071205" />
</Commands>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,439 @@
<?xml version="1.0" ?>
<Documentation>
<!--
Mask Values
b - bool
i - int32
f - float
s - string
c - function/callback
x - class/instance
z - vector2D
v - vector3D
t - thiscall
| - optional arguments
* - infinite arguments
. - any type
-->
<Namespace Name="global">
<Property Name="platform" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="thisResource" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="localClient" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="localPlayer" ReadOnly="true" Obsolete="false" Type="Object" />
<Function Name="toColour" Mask="iii|i" RequiredArguments="3" Obsolete="false" />
<Function Name="collectAllGarbage" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="inPoly" Mask="z*" RequiredArguments="1" Obsolete="false" />
<Function Name="addEvent" Mask="s|i" RequiredArguments="1" Obsolete="false" />
<Function Name="addEventHandler" Mask="sf" RequiredArguments="2" Obsolete="false" />
<Function Name="removeEventHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="bindEventHandler" Mask="sxf" RequiredArguments="3" Obsolete="false" />
<Function Name="unbindEventHandler" Mask="sx" RequiredArguments="2" Obsolete="false" />
<Function Name="triggerEvent" Mask="s|x*" RequiredArguments="1" Obsolete="false" />
<Function Name="addCommandHandler" Mask="sc|b" RequiredArguments="2" Obsolete="false" />
<Function Name="removeCommandHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="consoleCommand" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="setTimeout" Mask="ci*" RequiredArguments="2" Obsolete="false" />
<Function Name="setInterval" Mask="ci*" RequiredArguments="2" Obsolete="false" />
<Function Name="setImmediate" Mask="c*" RequiredArguments="1" Obsolete="false" />
<Function Name="clearTimeout" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="clearInterval" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="clearImmediate" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="bindKey" Mask="iic" RequiredArguments="3" Obsolete="false" />
<Function Name="unbindKey" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="unbindAllKeys" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="findResourceByName" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="getResources" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="exportFunction" Mask="c" RequiredArguments="1" Obsolete="false" />
<Function Name="openFile" Mask="s|b" RequiredArguments="1" Obsolete="false" />
<Function Name="createFile" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="loadTextFile" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="saveTextFile" Mask="ss" RequiredArguments="2" Obsolete="false" />
<Function Name="addNetworkHandler" Mask="sc" RequiredArguments="2" Obsolete="false" />
<Function Name="removeNetworkHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="httpGet" Mask="sscc" RequiredArguments="4" Obsolete="false" />
<Function Name="message" Mask="s|i" RequiredArguments="1" Obsolete="false" />
<Function Name="messageClient" Mask="sx|i" RequiredArguments="2" Obsolete="false" />
<Function Name="messageAllExcept" Mask="sx|i" RequiredArguments="2" Obsolete="false" />
<Function Name="getConsole" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getClients" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getClient" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="destroyElement" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="getClientFromPlayerElement" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementsByType" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementFromId" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementFromName" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="addToWorld" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="triggerNetworkEvent" Mask="sx*" RequiredArguments="2" Obsolete="false" />
<Function Name="fadeCamera" Mask="xb|fi" RequiredArguments="2" Obsolete="false" />
<Function Name="spawnPlayer" Mask="xv|fiii" RequiredArguments="2" Obsolete="false" />
<Class Name="Stream">
<Property Name="length" ReadOnly="true" Obsolete="false" Type="int64" />
<Property Name="position" ReadOnly="true" Obsolete="false" Type="int64" />
<Function Name="close" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readBytes" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="readString" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readLine" Mask="t" RequiredArguments="0" Obsolete="true" />
<Function Name="writeBytes" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="writeString" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="readInt8" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt8" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readInt16" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt16" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readInt32" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt32" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readInt64" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt64" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readFloat" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readDouble" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="writeInt8" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt8" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeInt16" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt16" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeInt32" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt32" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeInt64" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt64" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeFloat" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="writeDouble" Mask="tf" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="TextReader">
<Function Name="close" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="loadText" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readLine" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readCharacter" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Matrix4x4">
<Property Name="m11" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m12" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m13" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m14" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m21" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m22" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m23" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m24" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m31" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m32" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m33" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m34" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m41" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m42" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m43" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m44" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="setIdentity" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setTranslate" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="setScale" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotateX" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotateY" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotateZ" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotate" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="setMultiply" Mask="txx*" RequiredArguments="2" Obsolete="false" />
<Function Name="multiply" Mask="tx*" RequiredArguments="1" Obsolete="false" />
<Function Name="setInverse" Mask="tx" RequiredArguments="1" Obsolete="false" />
<Function Name="transformCoordinate" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="getElement" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="setElement" Mask="tif" RequiredArguments="2" Obsolete="false" />
<Function Name="getVector3" Mask="ti" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="Vec2">
<Property Name="x" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="y" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="addPolar" Mask="tff" RequiredArguments="2" Obsolete="false" />
<Function Name="interpolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="extrapolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalInterpolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalExtrapolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="cartesianToPolar" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Vec3">
<Property Name="x" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="y" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="z" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="length" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="squaredLength" ReadOnly="true" Obsolete="false" Type="number" />
<Function Name="distance" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="squaredDistance" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="dotProduct" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="absDotProduct" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="normalise" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="crossProduct" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="midPoint" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="addPolar" Mask="tff" RequiredArguments="2" Obsolete="false" />
<Function Name="addSpherical" Mask="tfff" RequiredArguments="3" Obsolete="false" />
<Function Name="interpolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="extrapolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalInterpolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalExtrapolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="cartesianToPolar" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="cartesianToSpherical" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Event">
<Class Name="CancellableEvent">
<Function Name="preventDefault" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="isDefaultPrevented" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
</Class>
<Class Name="Timer" />
<Class Name="KeyEvent">
<Property Name="keyCode" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="scanCode" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="mod" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="repeat" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="down" ReadOnly="true" Obsolete="false" Type="bool" />
<Function Name="preventDefault" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="isDefaultPrevented" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="XmlElement">
<Property Name="childrenCount" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="children" ReadOnly="true" Obsolete="false" />
<Property Name="parent" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="text" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="attributes" ReadOnly="true" Obsolete="false" />
<Function Name="clear" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getStringAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="getBoolAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="getIntegerAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="getFloatAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="XmlDocument">
<Property Name="rootElement" ReadOnly="true" Obsolete="false" Type="Object" />
<Function Name="load" Mask="tx" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="Resource">
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="isStarted" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isStarting" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="exports" ReadOnly="true" Obsolete="false" />
<Function Name="start" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="stop" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="restart" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getExport" Mask="ts" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="Client">
<Property Name="index" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="game" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="gameVersion" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="player" ReadOnly="false" Obsolete="false" Type="Object" />
<Property Name="administrator" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="console" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="ip" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="ping" ReadOnly="true" Obsolete="false" Type="int" />
<Function Name="despawnPlayer" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="disconnect" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="setData" Mask="ts.|b" RequiredArguments="2" Obsolete="false" />
<Function Name="removeData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="removeAllData" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Element">
<Property Name="id" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="type" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="isLocal" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isSyncer" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isOwner" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="syncer" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="owner" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="dimension" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="onAllDimensions" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="parent" ReadOnly="false" Obsolete="false" Type="Object" />
<Property Name="children" ReadOnly="true" Obsolete="false" />
<Property Name="name" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="resource" ReadOnly="false" Obsolete="false" Type="Object" />
<Function Name="isType" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="getData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="setData" Mask="ts.|b" RequiredArguments="2" Obsolete="false" />
<Function Name="removeData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="removeAllData" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setSyncer" Mask="ti|b" RequiredArguments="1" Obsolete="false" />
<Class Name="Transformable">
<Property Name="position" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="streamInDistance" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="streamOutDistance" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="getRotation" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setRotation" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Class Name="Entity">
<Property Name="modelIndex" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="interior" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="matrix" ReadOnly="false" Obsolete="false" Type="Matrix4x4" />
<Property Name="heading" ReadOnly="false" Obsolete="false" Type="number" />
<Class Name="Physical">
<Property Name="velocity" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="turnVelocity" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Class Name="Ped">
<Property Name="vehicle" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="seat" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="health" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="armour" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="weapon" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="weaponAmmunition" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="weaponClipAmmunition" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="weaponState" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="isEnteringVehicle" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isExitingVehicle" ReadOnly="true" Obsolete="false" Type="bool" />
<Function Name="warpIntoVehicle" Mask="txi" RequiredArguments="2" Obsolete="false" />
<Class Name="Player" />
</Class>
<Class Name="Vehicle">
<Property Name="locked" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="carLock" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="engine" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="colour1" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="colour2" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="colour3" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="colour4" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="strongGrip" ReadOnly="false" Obsolete="false" Type="bool" />
<Function Name="setColours" Mask="tii" RequiredArguments="2" Obsolete="false" />
<Function Name="setRGBColours" Mask="tii" RequiredArguments="2" Obsolete="false" />
<Function Name="randomiseColours" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="fix" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getOccupant" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="getOccupants" Mask="t" RequiredArguments="0" Obsolete="false" />
<Class Name="Train">
<Property Name="track" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="trackPosition" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="speed" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="derailed" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="headlights" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="taillights" ReadOnly="false" Obsolete="false" Type="bool" />
</Class>
</Class>
<Class Name="Object" />
</Class>
<Class Name="Building" />
</Class>
<Class Name="Blip" />
<Class Name="Pickup" />
<Class Name="Marker" />
<Class Name="CarGenerator" />
</Class>
</Class>
<Namespace Name="reflection">
<Function Name="clone" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="move" Mask="xx" RequiredArguments="2" Obsolete="false" />
<Function Name="tostring" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="createFunction" Mask="c" RequiredArguments="1" Obsolete="false" />
<Function Name="call" Mask="x" RequiredArguments="1" Obsolete="false" />
<Class Name="Function" />
</Namespace>
<Namespace Name="module">
<Namespace Name="hashing">
<Function Name="encodeBase64" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="decodeBase64" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="md5" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha1" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha224" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha256" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha384" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha512" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="ripemd128" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="ripemd160" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="ripemd256" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="ripemd320" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="whirlpool" Mask="" RequiredArguments="0" Obsolete="false" />
</Namespace>
<Namespace Name="geoip">
<Function Name="getCountryName" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getCountryISO" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getContinentName" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getContinentCode" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getCityName" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getPostalCode" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getSubdivisionName" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getSubdivisionISO" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getTimeZoneName" Mask="" RequiredArguments="0" Obsolete="false" />
</Namespace>
<Namespace Name="mysql">
<Function Name="connect" Mask="" RequiredArguments="0" Obsolete="false" />
<Class Name="Connection">
<Property Name="ping" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="insertId" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="affectedRows" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="warningCount" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="errorNum" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="error" ReadOnly="true" Obsolete="false" Type="void" />
<Function Name="query" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="close" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="escapeString" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="selectDatabase" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="changeUser" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="info" Mask="" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Result">
<Property Name="numRows" ReadOnly="true" Obsolete="false" Type="void" />
<Function Name="free" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="fetchAssoc" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="fetchAssoc" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="fetchRow" Mask="" RequiredArguments="0" Obsolete="false" />
</Class>
</Namespace>
<Namespace Name="smtp">
<Function Name="send" Mask="" RequiredArguments="0" Obsolete="false" />
</Namespace>
</Namespace>
<Namespace Name="sdl">
<Property Name="platform" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="ticks" ReadOnly="true" Obsolete="false" Type="int" />
<Function Name="getModState" Mask="" RequiredArguments="0" Obsolete="false" />
</Namespace>
<Namespace Name="platform">
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="modState" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="ticks" ReadOnly="true" Obsolete="false" Type="int" />
</Namespace>
<Namespace Name="server">
<Property Name="game" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="name" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="gameMode" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="port" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="maxClients" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="rcon" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="rconPort" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="listed" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="httpServer" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="httpPort" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="minClientVersion" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="syncInterval" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="syncMethod" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="duplicateNames" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="streamInDistance" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="streamOutDistance" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="pickupStreamInDistance" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="pickupStreamOutDistance" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="logPath" ReadOnly="true" Obsolete="false" Type="string" />
<Function Name="setRule" Mask="ss" RequiredArguments="2" Obsolete="false" />
<Function Name="getRule" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="banIP" Mask="s|i" RequiredArguments="1" Obsolete="false" />
<Function Name="unbanIP" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="unbanAllIPs" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="isIPBanned" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="shutdown" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getCVar" Mask="s" RequiredArguments="1" Obsolete="false" />
</Namespace>
<Namespace Name="gta">
<Property Name="weather" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="ssvBridgeEnabled" ReadOnly="false" Obsolete="false" Type="bool" />
<Function Name="forceWeather" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="createVehicle" Mask="i|v" RequiredArguments="1" Obsolete="false" />
<Function Name="createBlipAttachedTo" Mask="xi|iibb" RequiredArguments="2" Obsolete="false" />
<Function Name="createBuilding" Mask="i|v" RequiredArguments="1" Obsolete="false" />
<Function Name="createObject" Mask="i|v" RequiredArguments="1" Obsolete="false" />
<Function Name="createBlip" Mask="iv|ii" RequiredArguments="2" Obsolete="false" />
<Function Name="createPickup" Mask="i|vi" RequiredArguments="1" Obsolete="false" />
<Function Name="createSphere" Mask="v|f" RequiredArguments="1" Obsolete="false" />
<Function Name="createPlayer" Mask="i|v" RequiredArguments="1" Obsolete="false" />
<Function Name="createCivilian" Mask="i|v" RequiredArguments="1" Obsolete="false" />
<Function Name="hostSession" Mask="xii" RequiredArguments="3" Obsolete="false" />
<Function Name="joinSession" Mask="xx" RequiredArguments="2" Obsolete="false" />
<Class Name="World" />
<Namespace Name="time">
<Property Name="minuteDuration" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="hour" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="minute" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="second" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="day" ReadOnly="false" Obsolete="false" Type="number" />
</Namespace>
</Namespace>
</Namespace>
</Documentation>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" ?>
<EventTypes>
<!--Called when a pickup is collected-->
<EventType Name="OnPickupCollected" Hash="4105239817" Arguments="2" CanPreventDefault="false" />
<!--Called when a ped starts uncrouching-->
<EventType Name="OnPedUncrouch" Hash="561660263" Arguments="1" CanPreventDefault="false" />
<!--Called when a ped starts jumping-->
<EventType Name="OnPedJump" Hash="4272336407" Arguments="1" CanPreventDefault="false" />
<!--Called when a ped starts falling to floor-->
<EventType Name="OnPedFall" Hash="2722461453" Arguments="4" CanPreventDefault="false" />
<!--Called when a ped starts crouching-->
<EventType Name="OnPedCrouch" Hash="1096855702" Arguments="1" CanPreventDefault="false" />
<!--Called when a ped is spawned.-->
<EventType Name="OnPedSpawn" Hash="3880839897" Arguments="1" CanPreventDefault="false" />
<!--Called when a ped is wasted (from attacker client).-->
<EventType Name="OnWastePed" Hash="1462492871" Arguments="4" CanPreventDefault="false" />
<!--Called when a ped is exiting a vehicle.-->
<EventType Name="OnPedExitVehicle" Hash="3163626874" Arguments="2" CanPreventDefault="false" />
<!--Called when a resource starts-->
<EventType Name="OnResourceStart" Hash="1143708828" Arguments="1" CanPreventDefault="true" />
<!--Called when a player types a command-->
<EventType Name="OnPlayerCommand" Hash="1638826555" Arguments="3" CanPreventDefault="true" />
<!--Called every process-->
<EventType Name="OnProcess" Hash="3150131130" Arguments="1" CanPreventDefault="false" />
<!--Called when a resource stops-->
<EventType Name="OnResourceStop" Hash="1347867548" Arguments="2" CanPreventDefault="true" />
<!--Called when an element is about to stream in-->
<EventType Name="OnElementStreamIn" Hash="2759455221" Arguments="2" CanPreventDefault="true" />
<!--Called when a player has connected and is joining-->
<EventType Name="OnPlayerJoin" Hash="3624951888" Arguments="1" CanPreventDefault="false" />
<!--Called when the player has joined the game-->
<EventType Name="OnPlayerJoined" Hash="3833973824" Arguments="1" CanPreventDefault="false" />
<!--Called when a player disconnects-->
<EventType Name="OnPlayerQuit" Hash="3017502482" Arguments="2" CanPreventDefault="false" />
<!--Called when a player is attempting to connect-->
<EventType Name="OnPlayerConnect" Hash="2611712496" Arguments="1" CanPreventDefault="true" />
<!--Called when the server finished the start sequence-->
<EventType Name="OnServerStart" Hash="3318682471" Arguments="0" CanPreventDefault="false" />
<!--Called when a player chats-->
<EventType Name="OnPlayerChat" Hash="2515290669" Arguments="2" CanPreventDefault="true" />
<!--Called when an element is about to be destroyed-->
<EventType Name="OnElementDestroy" Hash="696839637" Arguments="1" CanPreventDefault="true" />
<!--Called when a ped is wasted.-->
<EventType Name="OnPedWasted" Hash="3129373940" Arguments="4" CanPreventDefault="false" />
<!--Called when a ped is entering a vehicle.-->
<EventType Name="OnPedEnterVehicle" Hash="2529136464" Arguments="3" CanPreventDefault="false" />
</EventTypes>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" ?>
<Commands>
<Command Name="gamestats" Hash="3782704029" />
<Command Name="say" Hash="4241071205" />
<Command Name="exit" Hash="2483651598" />
<Command Name="quit" Hash="1135269781" />
<Command Name="clear" Hash="3853644038" />
<Command Name="connect" Hash="1959786783" />
<Command Name="reconnect" Hash="1240758083" />
<Command Name="console" Hash="906219446" />
<Command Name="cvar" Hash="2588334565" />
<Command Name="q" Hash="4110462503" />
<Command Name="disconnect" Hash="3820433" />
<Command Name="fpscounter" Hash="2973827809" />
<Command Name="dumpdoc" Hash="3404143852" />
<Command Name="chatscale" Hash="402639070" />
<Command Name="help" Hash="143088812" />
</Commands>

View File

@@ -0,0 +1,577 @@
<?xml version="1.0" ?>
<Defines>
<Define Name="KEYSTATE_UP" Value="0" />
<Define Name="KEYSTATE_DOWN" Value="1" />
<Define Name="KEYSTATE_BOTH" Value="2" />
<Define Name="SDL_SCANCODE_UNKNOWN" Value="0" />
<Define Name="SDL_SCANCODE_A" Value="4" />
<Define Name="SDL_SCANCODE_B" Value="5" />
<Define Name="SDL_SCANCODE_C" Value="6" />
<Define Name="SDL_SCANCODE_D" Value="7" />
<Define Name="SDL_SCANCODE_E" Value="8" />
<Define Name="SDL_SCANCODE_F" Value="9" />
<Define Name="SDL_SCANCODE_G" Value="10" />
<Define Name="SDL_SCANCODE_H" Value="11" />
<Define Name="SDL_SCANCODE_I" Value="12" />
<Define Name="SDL_SCANCODE_J" Value="13" />
<Define Name="SDL_SCANCODE_K" Value="14" />
<Define Name="SDL_SCANCODE_L" Value="15" />
<Define Name="SDL_SCANCODE_M" Value="16" />
<Define Name="SDL_SCANCODE_N" Value="17" />
<Define Name="SDL_SCANCODE_O" Value="18" />
<Define Name="SDL_SCANCODE_P" Value="19" />
<Define Name="SDL_SCANCODE_Q" Value="20" />
<Define Name="SDL_SCANCODE_R" Value="21" />
<Define Name="SDL_SCANCODE_S" Value="22" />
<Define Name="SDL_SCANCODE_T" Value="23" />
<Define Name="SDL_SCANCODE_U" Value="24" />
<Define Name="SDL_SCANCODE_V" Value="25" />
<Define Name="SDL_SCANCODE_W" Value="26" />
<Define Name="SDL_SCANCODE_X" Value="27" />
<Define Name="SDL_SCANCODE_Y" Value="28" />
<Define Name="SDL_SCANCODE_Z" Value="29" />
<Define Name="SDL_SCANCODE_1" Value="30" />
<Define Name="SDL_SCANCODE_2" Value="31" />
<Define Name="SDL_SCANCODE_3" Value="32" />
<Define Name="SDL_SCANCODE_4" Value="33" />
<Define Name="SDL_SCANCODE_5" Value="34" />
<Define Name="SDL_SCANCODE_6" Value="35" />
<Define Name="SDL_SCANCODE_7" Value="36" />
<Define Name="SDL_SCANCODE_8" Value="37" />
<Define Name="SDL_SCANCODE_9" Value="38" />
<Define Name="SDL_SCANCODE_0" Value="39" />
<Define Name="SDL_SCANCODE_RETURN" Value="40" />
<Define Name="SDL_SCANCODE_ESCAPE" Value="41" />
<Define Name="SDL_SCANCODE_BACKSPACE" Value="42" />
<Define Name="SDL_SCANCODE_TAB" Value="43" />
<Define Name="SDL_SCANCODE_SPACE" Value="44" />
<Define Name="SDL_SCANCODE_MINUS" Value="45" />
<Define Name="SDL_SCANCODE_EQUALS" Value="46" />
<Define Name="SDL_SCANCODE_LEFTBRACKET" Value="47" />
<Define Name="SDL_SCANCODE_RIGHTBRACKET" Value="48" />
<Define Name="SDL_SCANCODE_BACKSLASH" Value="49" />
<Define Name="SDL_SCANCODE_NONUSHASH" Value="50" />
<Define Name="SDL_SCANCODE_SEMICOLON" Value="51" />
<Define Name="SDL_SCANCODE_APOSTROPHE" Value="52" />
<Define Name="SDL_SCANCODE_GRAVE" Value="53" />
<Define Name="SDL_SCANCODE_COMMA" Value="54" />
<Define Name="SDL_SCANCODE_PERIOD" Value="55" />
<Define Name="SDL_SCANCODE_SLASH" Value="56" />
<Define Name="SDL_SCANCODE_CAPSLOCK" Value="57" />
<Define Name="SDL_SCANCODE_F1" Value="58" />
<Define Name="SDL_SCANCODE_F2" Value="59" />
<Define Name="SDL_SCANCODE_F3" Value="60" />
<Define Name="SDL_SCANCODE_F4" Value="61" />
<Define Name="SDL_SCANCODE_F5" Value="62" />
<Define Name="SDL_SCANCODE_F6" Value="63" />
<Define Name="SDL_SCANCODE_F7" Value="64" />
<Define Name="SDL_SCANCODE_F8" Value="65" />
<Define Name="SDL_SCANCODE_F9" Value="66" />
<Define Name="SDL_SCANCODE_F10" Value="67" />
<Define Name="SDL_SCANCODE_F11" Value="68" />
<Define Name="SDL_SCANCODE_F12" Value="69" />
<Define Name="SDL_SCANCODE_PRINTSCREEN" Value="70" />
<Define Name="SDL_SCANCODE_SCROLLLOCK" Value="71" />
<Define Name="SDL_SCANCODE_PAUSE" Value="72" />
<Define Name="SDL_SCANCODE_INSERT" Value="73" />
<Define Name="SDL_SCANCODE_HOME" Value="74" />
<Define Name="SDL_SCANCODE_PAGEUP" Value="75" />
<Define Name="SDL_SCANCODE_DELETE" Value="76" />
<Define Name="SDL_SCANCODE_END" Value="77" />
<Define Name="SDL_SCANCODE_PAGEDOWN" Value="78" />
<Define Name="SDL_SCANCODE_RIGHT" Value="79" />
<Define Name="SDL_SCANCODE_LEFT" Value="80" />
<Define Name="SDL_SCANCODE_DOWN" Value="81" />
<Define Name="SDL_SCANCODE_UP" Value="82" />
<Define Name="SDL_SCANCODE_NUMLOCKCLEAR" Value="83" />
<Define Name="SDL_SCANCODE_KP_DIVIDE" Value="84" />
<Define Name="SDL_SCANCODE_KP_MULTIPLY" Value="85" />
<Define Name="SDL_SCANCODE_KP_MINUS" Value="86" />
<Define Name="SDL_SCANCODE_KP_PLUS" Value="87" />
<Define Name="SDL_SCANCODE_KP_ENTER" Value="88" />
<Define Name="SDL_SCANCODE_KP_1" Value="89" />
<Define Name="SDL_SCANCODE_KP_2" Value="90" />
<Define Name="SDL_SCANCODE_KP_3" Value="91" />
<Define Name="SDL_SCANCODE_KP_4" Value="92" />
<Define Name="SDL_SCANCODE_KP_5" Value="93" />
<Define Name="SDL_SCANCODE_KP_6" Value="94" />
<Define Name="SDL_SCANCODE_KP_7" Value="95" />
<Define Name="SDL_SCANCODE_KP_8" Value="96" />
<Define Name="SDL_SCANCODE_KP_9" Value="97" />
<Define Name="SDL_SCANCODE_KP_0" Value="98" />
<Define Name="SDL_SCANCODE_KP_PERIOD" Value="99" />
<Define Name="SDL_SCANCODE_NONUSBACKSLASH" Value="100" />
<Define Name="SDL_SCANCODE_APPLICATION" Value="101" />
<Define Name="SDL_SCANCODE_POWER" Value="102" />
<Define Name="SDL_SCANCODE_KP_EQUALS" Value="103" />
<Define Name="SDL_SCANCODE_F13" Value="104" />
<Define Name="SDL_SCANCODE_F14" Value="105" />
<Define Name="SDL_SCANCODE_F15" Value="106" />
<Define Name="SDL_SCANCODE_F16" Value="107" />
<Define Name="SDL_SCANCODE_F17" Value="108" />
<Define Name="SDL_SCANCODE_F18" Value="109" />
<Define Name="SDL_SCANCODE_F19" Value="110" />
<Define Name="SDL_SCANCODE_F20" Value="111" />
<Define Name="SDL_SCANCODE_F21" Value="112" />
<Define Name="SDL_SCANCODE_F22" Value="113" />
<Define Name="SDL_SCANCODE_F23" Value="114" />
<Define Name="SDL_SCANCODE_F24" Value="115" />
<Define Name="SDL_SCANCODE_EXECUTE" Value="116" />
<Define Name="SDL_SCANCODE_HELP" Value="117" />
<Define Name="SDL_SCANCODE_MENU" Value="118" />
<Define Name="SDL_SCANCODE_SELECT" Value="119" />
<Define Name="SDL_SCANCODE_STOP" Value="120" />
<Define Name="SDL_SCANCODE_AGAIN" Value="121" />
<Define Name="SDL_SCANCODE_UNDO" Value="122" />
<Define Name="SDL_SCANCODE_CUT" Value="123" />
<Define Name="SDL_SCANCODE_COPY" Value="124" />
<Define Name="SDL_SCANCODE_PASTE" Value="125" />
<Define Name="SDL_SCANCODE_FIND" Value="126" />
<Define Name="SDL_SCANCODE_MUTE" Value="127" />
<Define Name="SDL_SCANCODE_VOLUMEUP" Value="128" />
<Define Name="SDL_SCANCODE_VOLUMEDOWN" Value="129" />
<Define Name="SDL_SCANCODE_KP_COMMA" Value="133" />
<Define Name="SDL_SCANCODE_KP_EQUALSAS400" Value="134" />
<Define Name="SDL_SCANCODE_INTERNATIONAL1" Value="135" />
<Define Name="SDL_SCANCODE_INTERNATIONAL2" Value="136" />
<Define Name="SDL_SCANCODE_INTERNATIONAL3" Value="137" />
<Define Name="SDL_SCANCODE_INTERNATIONAL4" Value="138" />
<Define Name="SDL_SCANCODE_INTERNATIONAL5" Value="139" />
<Define Name="SDL_SCANCODE_INTERNATIONAL6" Value="140" />
<Define Name="SDL_SCANCODE_INTERNATIONAL7" Value="141" />
<Define Name="SDL_SCANCODE_INTERNATIONAL8" Value="142" />
<Define Name="SDL_SCANCODE_INTERNATIONAL9" Value="143" />
<Define Name="SDL_SCANCODE_LANG1" Value="144" />
<Define Name="SDL_SCANCODE_LANG2" Value="145" />
<Define Name="SDL_SCANCODE_LANG3" Value="146" />
<Define Name="SDL_SCANCODE_LANG4" Value="147" />
<Define Name="SDL_SCANCODE_LANG5" Value="148" />
<Define Name="SDL_SCANCODE_LANG6" Value="149" />
<Define Name="SDL_SCANCODE_LANG7" Value="150" />
<Define Name="SDL_SCANCODE_LANG8" Value="151" />
<Define Name="SDL_SCANCODE_LANG9" Value="152" />
<Define Name="SDL_SCANCODE_ALTERASE" Value="153" />
<Define Name="SDL_SCANCODE_SYSREQ" Value="154" />
<Define Name="SDL_SCANCODE_CANCEL" Value="155" />
<Define Name="SDL_SCANCODE_CLEAR" Value="156" />
<Define Name="SDL_SCANCODE_PRIOR" Value="157" />
<Define Name="SDL_SCANCODE_RETURN2" Value="158" />
<Define Name="SDL_SCANCODE_SEPARATOR" Value="159" />
<Define Name="SDL_SCANCODE_OUT" Value="160" />
<Define Name="SDL_SCANCODE_OPER" Value="161" />
<Define Name="SDL_SCANCODE_CLEARAGAIN" Value="162" />
<Define Name="SDL_SCANCODE_CRSEL" Value="163" />
<Define Name="SDL_SCANCODE_EXSEL" Value="164" />
<Define Name="SDL_SCANCODE_KP_00" Value="176" />
<Define Name="SDL_SCANCODE_KP_000" Value="177" />
<Define Name="SDL_SCANCODE_THOUSANDSSEPARATOR" Value="178" />
<Define Name="SDL_SCANCODE_DECIMALSEPARATOR" Value="179" />
<Define Name="SDL_SCANCODE_CURRENCYUNIT" Value="180" />
<Define Name="SDL_SCANCODE_CURRENCYSUBUNIT" Value="181" />
<Define Name="SDL_SCANCODE_KP_LEFTPAREN" Value="182" />
<Define Name="SDL_SCANCODE_KP_RIGHTPAREN" Value="183" />
<Define Name="SDL_SCANCODE_KP_LEFTBRACE" Value="184" />
<Define Name="SDL_SCANCODE_KP_RIGHTBRACE" Value="185" />
<Define Name="SDL_SCANCODE_KP_TAB" Value="186" />
<Define Name="SDL_SCANCODE_KP_BACKSPACE" Value="187" />
<Define Name="SDL_SCANCODE_KP_A" Value="188" />
<Define Name="SDL_SCANCODE_KP_B" Value="189" />
<Define Name="SDL_SCANCODE_KP_C" Value="190" />
<Define Name="SDL_SCANCODE_KP_D" Value="191" />
<Define Name="SDL_SCANCODE_KP_E" Value="192" />
<Define Name="SDL_SCANCODE_KP_F" Value="193" />
<Define Name="SDL_SCANCODE_KP_XOR" Value="194" />
<Define Name="SDL_SCANCODE_KP_POWER" Value="195" />
<Define Name="SDL_SCANCODE_KP_PERCENT" Value="196" />
<Define Name="SDL_SCANCODE_KP_LESS" Value="197" />
<Define Name="SDL_SCANCODE_KP_GREATER" Value="198" />
<Define Name="SDL_SCANCODE_KP_AMPERSAND" Value="199" />
<Define Name="SDL_SCANCODE_KP_DBLAMPERSAND" Value="200" />
<Define Name="SDL_SCANCODE_KP_VERTICALBAR" Value="201" />
<Define Name="SDL_SCANCODE_KP_DBLVERTICALBAR" Value="202" />
<Define Name="SDL_SCANCODE_KP_COLON" Value="203" />
<Define Name="SDL_SCANCODE_KP_HASH" Value="204" />
<Define Name="SDL_SCANCODE_KP_SPACE" Value="205" />
<Define Name="SDL_SCANCODE_KP_AT" Value="206" />
<Define Name="SDL_SCANCODE_KP_EXCLAM" Value="207" />
<Define Name="SDL_SCANCODE_KP_MEMSTORE" Value="208" />
<Define Name="SDL_SCANCODE_KP_MEMRECALL" Value="209" />
<Define Name="SDL_SCANCODE_KP_MEMCLEAR" Value="210" />
<Define Name="SDL_SCANCODE_KP_MEMADD" Value="211" />
<Define Name="SDL_SCANCODE_KP_MEMSUBTRACT" Value="212" />
<Define Name="SDL_SCANCODE_KP_MEMMULTIPLY" Value="213" />
<Define Name="SDL_SCANCODE_KP_MEMDIVIDE" Value="214" />
<Define Name="SDL_SCANCODE_KP_PLUSMINUS" Value="215" />
<Define Name="SDL_SCANCODE_KP_CLEAR" Value="216" />
<Define Name="SDL_SCANCODE_KP_CLEARENTRY" Value="217" />
<Define Name="SDL_SCANCODE_KP_BINARY" Value="218" />
<Define Name="SDL_SCANCODE_KP_OCTAL" Value="219" />
<Define Name="SDL_SCANCODE_KP_DECIMAL" Value="220" />
<Define Name="SDL_SCANCODE_KP_HEXADECIMAL" Value="221" />
<Define Name="SDL_SCANCODE_LCTRL" Value="224" />
<Define Name="SDL_SCANCODE_LSHIFT" Value="225" />
<Define Name="SDL_SCANCODE_LALT" Value="226" />
<Define Name="SDL_SCANCODE_LGUI" Value="227" />
<Define Name="SDL_SCANCODE_RCTRL" Value="228" />
<Define Name="SDL_SCANCODE_RSHIFT" Value="229" />
<Define Name="SDL_SCANCODE_RALT" Value="230" />
<Define Name="SDL_SCANCODE_RGUI" Value="231" />
<Define Name="SDL_SCANCODE_MODE" Value="257" />
<Define Name="SDL_SCANCODE_AUDIONEXT" Value="258" />
<Define Name="SDL_SCANCODE_AUDIOPREV" Value="259" />
<Define Name="SDL_SCANCODE_AUDIOSTOP" Value="260" />
<Define Name="SDL_SCANCODE_AUDIOPLAY" Value="261" />
<Define Name="SDL_SCANCODE_AUDIOMUTE" Value="262" />
<Define Name="SDL_SCANCODE_MEDIASELECT" Value="263" />
<Define Name="SDL_SCANCODE_WWW" Value="264" />
<Define Name="SDL_SCANCODE_MAIL" Value="265" />
<Define Name="SDL_SCANCODE_CALCULATOR" Value="266" />
<Define Name="SDL_SCANCODE_COMPUTER" Value="267" />
<Define Name="SDL_SCANCODE_AC_SEARCH" Value="268" />
<Define Name="SDL_SCANCODE_AC_HOME" Value="269" />
<Define Name="SDL_SCANCODE_AC_BACK" Value="270" />
<Define Name="SDL_SCANCODE_AC_FORWARD" Value="271" />
<Define Name="SDL_SCANCODE_AC_STOP" Value="272" />
<Define Name="SDL_SCANCODE_AC_REFRESH" Value="273" />
<Define Name="SDL_SCANCODE_AC_BOOKMARKS" Value="274" />
<Define Name="SDL_SCANCODE_BRIGHTNESSDOWN" Value="275" />
<Define Name="SDL_SCANCODE_BRIGHTNESSUP" Value="276" />
<Define Name="SDL_SCANCODE_DISPLAYSWITCH" Value="277" />
<Define Name="SDL_SCANCODE_KBDILLUMTOGGLE" Value="278" />
<Define Name="SDL_SCANCODE_KBDILLUMDOWN" Value="279" />
<Define Name="SDL_SCANCODE_KBDILLUMUP" Value="280" />
<Define Name="SDL_SCANCODE_EJECT" Value="281" />
<Define Name="SDL_SCANCODE_SLEEP" Value="282" />
<Define Name="SDL_SCANCODE_APP1" Value="283" />
<Define Name="SDL_SCANCODE_APP2" Value="284" />
<Define Name="SDL_SCANCODE_AUDIOREWIND" Value="285" />
<Define Name="SDL_SCANCODE_AUDIOFASTFORWARD" Value="286" />
<Define Name="SDL_NUM_SCANCODES" Value="512" />
<Define Name="SDLK_UNKNOWN" Value="0" />
<Define Name="SDLK_RETURN" Value="13" />
<Define Name="SDLK_ESCAPE" Value="27" />
<Define Name="SDLK_BACKSPACE" Value="8" />
<Define Name="SDLK_TAB" Value="9" />
<Define Name="SDLK_SPACE" Value="32" />
<Define Name="SDLK_EXCLAIM" Value="33" />
<Define Name="SDLK_QUOTEDBL" Value="34" />
<Define Name="SDLK_HASH" Value="35" />
<Define Name="SDLK_PERCENT" Value="37" />
<Define Name="SDLK_DOLLAR" Value="36" />
<Define Name="SDLK_AMPERSAND" Value="38" />
<Define Name="SDLK_QUOTE" Value="39" />
<Define Name="SDLK_LEFTPAREN" Value="40" />
<Define Name="SDLK_RIGHTPAREN" Value="41" />
<Define Name="SDLK_ASTERISK" Value="42" />
<Define Name="SDLK_PLUS" Value="43" />
<Define Name="SDLK_COMMA" Value="44" />
<Define Name="SDLK_MINUS" Value="45" />
<Define Name="SDLK_PERIOD" Value="46" />
<Define Name="SDLK_SLASH" Value="47" />
<Define Name="SDLK_0" Value="48" />
<Define Name="SDLK_1" Value="49" />
<Define Name="SDLK_2" Value="50" />
<Define Name="SDLK_3" Value="51" />
<Define Name="SDLK_4" Value="52" />
<Define Name="SDLK_5" Value="53" />
<Define Name="SDLK_6" Value="54" />
<Define Name="SDLK_7" Value="55" />
<Define Name="SDLK_8" Value="56" />
<Define Name="SDLK_9" Value="57" />
<Define Name="SDLK_COLON" Value="58" />
<Define Name="SDLK_SEMICOLON" Value="59" />
<Define Name="SDLK_LESS" Value="60" />
<Define Name="SDLK_EQUALS" Value="61" />
<Define Name="SDLK_GREATER" Value="62" />
<Define Name="SDLK_QUESTION" Value="63" />
<Define Name="SDLK_AT" Value="64" />
<Define Name="SDLK_LEFTBRACKET" Value="91" />
<Define Name="SDLK_BACKSLASH" Value="92" />
<Define Name="SDLK_RIGHTBRACKET" Value="93" />
<Define Name="SDLK_CARET" Value="94" />
<Define Name="SDLK_UNDERSCORE" Value="95" />
<Define Name="SDLK_BACKQUOTE" Value="96" />
<Define Name="SDLK_a" Value="97" />
<Define Name="SDLK_b" Value="98" />
<Define Name="SDLK_c" Value="99" />
<Define Name="SDLK_d" Value="100" />
<Define Name="SDLK_e" Value="101" />
<Define Name="SDLK_f" Value="102" />
<Define Name="SDLK_g" Value="103" />
<Define Name="SDLK_h" Value="104" />
<Define Name="SDLK_i" Value="105" />
<Define Name="SDLK_j" Value="106" />
<Define Name="SDLK_k" Value="107" />
<Define Name="SDLK_l" Value="108" />
<Define Name="SDLK_m" Value="109" />
<Define Name="SDLK_n" Value="110" />
<Define Name="SDLK_o" Value="111" />
<Define Name="SDLK_p" Value="112" />
<Define Name="SDLK_q" Value="113" />
<Define Name="SDLK_r" Value="114" />
<Define Name="SDLK_s" Value="115" />
<Define Name="SDLK_t" Value="116" />
<Define Name="SDLK_u" Value="117" />
<Define Name="SDLK_v" Value="118" />
<Define Name="SDLK_w" Value="119" />
<Define Name="SDLK_x" Value="120" />
<Define Name="SDLK_y" Value="121" />
<Define Name="SDLK_z" Value="122" />
<Define Name="SDLK_CAPSLOCK" Value="1073741881" />
<Define Name="SDLK_F1" Value="1073741882" />
<Define Name="SDLK_F2" Value="1073741883" />
<Define Name="SDLK_F3" Value="1073741884" />
<Define Name="SDLK_F4" Value="1073741885" />
<Define Name="SDLK_F5" Value="1073741886" />
<Define Name="SDLK_F6" Value="1073741887" />
<Define Name="SDLK_F7" Value="1073741888" />
<Define Name="SDLK_F8" Value="1073741889" />
<Define Name="SDLK_F9" Value="1073741890" />
<Define Name="SDLK_F10" Value="1073741891" />
<Define Name="SDLK_F11" Value="1073741892" />
<Define Name="SDLK_F12" Value="1073741893" />
<Define Name="SDLK_PRINTSCREEN" Value="1073741894" />
<Define Name="SDLK_SCROLLLOCK" Value="1073741895" />
<Define Name="SDLK_PAUSE" Value="1073741896" />
<Define Name="SDLK_INSERT" Value="1073741897" />
<Define Name="SDLK_HOME" Value="1073741898" />
<Define Name="SDLK_PAGEUP" Value="1073741899" />
<Define Name="SDLK_DELETE" Value="127" />
<Define Name="SDLK_END" Value="1073741901" />
<Define Name="SDLK_PAGEDOWN" Value="1073741902" />
<Define Name="SDLK_RIGHT" Value="1073741903" />
<Define Name="SDLK_LEFT" Value="1073741904" />
<Define Name="SDLK_DOWN" Value="1073741905" />
<Define Name="SDLK_UP" Value="1073741906" />
<Define Name="SDLK_NUMLOCKCLEAR" Value="1073741907" />
<Define Name="SDLK_KP_DIVIDE" Value="1073741908" />
<Define Name="SDLK_KP_MULTIPLY" Value="1073741909" />
<Define Name="SDLK_KP_MINUS" Value="1073741910" />
<Define Name="SDLK_KP_PLUS" Value="1073741911" />
<Define Name="SDLK_KP_ENTER" Value="1073741912" />
<Define Name="SDLK_KP_1" Value="1073741913" />
<Define Name="SDLK_KP_2" Value="1073741914" />
<Define Name="SDLK_KP_3" Value="1073741915" />
<Define Name="SDLK_KP_4" Value="1073741916" />
<Define Name="SDLK_KP_5" Value="1073741917" />
<Define Name="SDLK_KP_6" Value="1073741918" />
<Define Name="SDLK_KP_7" Value="1073741919" />
<Define Name="SDLK_KP_8" Value="1073741920" />
<Define Name="SDLK_KP_9" Value="1073741921" />
<Define Name="SDLK_KP_0" Value="1073741922" />
<Define Name="SDLK_KP_PERIOD" Value="1073741923" />
<Define Name="SDLK_APPLICATION" Value="1073741925" />
<Define Name="SDLK_POWER" Value="1073741926" />
<Define Name="SDLK_KP_EQUALS" Value="1073741927" />
<Define Name="SDLK_F13" Value="1073741928" />
<Define Name="SDLK_F14" Value="1073741929" />
<Define Name="SDLK_F15" Value="1073741930" />
<Define Name="SDLK_F16" Value="1073741931" />
<Define Name="SDLK_F17" Value="1073741932" />
<Define Name="SDLK_F18" Value="1073741933" />
<Define Name="SDLK_F19" Value="1073741934" />
<Define Name="SDLK_F20" Value="1073741935" />
<Define Name="SDLK_F21" Value="1073741936" />
<Define Name="SDLK_F22" Value="1073741937" />
<Define Name="SDLK_F23" Value="1073741938" />
<Define Name="SDLK_F24" Value="1073741939" />
<Define Name="SDLK_EXECUTE" Value="1073741940" />
<Define Name="SDLK_HELP" Value="1073741941" />
<Define Name="SDLK_MENU" Value="1073741942" />
<Define Name="SDLK_SELECT" Value="1073741943" />
<Define Name="SDLK_STOP" Value="1073741944" />
<Define Name="SDLK_AGAIN" Value="1073741945" />
<Define Name="SDLK_UNDO" Value="1073741946" />
<Define Name="SDLK_CUT" Value="1073741947" />
<Define Name="SDLK_COPY" Value="1073741948" />
<Define Name="SDLK_PASTE" Value="1073741949" />
<Define Name="SDLK_FIND" Value="1073741950" />
<Define Name="SDLK_MUTE" Value="1073741951" />
<Define Name="SDLK_VOLUMEUP" Value="1073741952" />
<Define Name="SDLK_VOLUMEDOWN" Value="1073741953" />
<Define Name="SDLK_KP_COMMA" Value="1073741957" />
<Define Name="SDLK_KP_EQUALSAS400" Value="1073741958" />
<Define Name="SDLK_ALTERASE" Value="1073741977" />
<Define Name="SDLK_SYSREQ" Value="1073741978" />
<Define Name="SDLK_CANCEL" Value="1073741979" />
<Define Name="SDLK_CLEAR" Value="1073741980" />
<Define Name="SDLK_PRIOR" Value="1073741981" />
<Define Name="SDLK_RETURN2" Value="1073741982" />
<Define Name="SDLK_SEPARATOR" Value="1073741983" />
<Define Name="SDLK_OUT" Value="1073741984" />
<Define Name="SDLK_OPER" Value="1073741985" />
<Define Name="SDLK_CLEARAGAIN" Value="1073741986" />
<Define Name="SDLK_CRSEL" Value="1073741987" />
<Define Name="SDLK_EXSEL" Value="1073741988" />
<Define Name="SDLK_KP_00" Value="1073742000" />
<Define Name="SDLK_KP_000" Value="1073742001" />
<Define Name="SDLK_THOUSANDSSEPARATOR" Value="1073742002" />
<Define Name="SDLK_DECIMALSEPARATOR" Value="1073742003" />
<Define Name="SDLK_CURRENCYUNIT" Value="1073742004" />
<Define Name="SDLK_CURRENCYSUBUNIT" Value="1073742005" />
<Define Name="SDLK_KP_LEFTPAREN" Value="1073742006" />
<Define Name="SDLK_KP_RIGHTPAREN" Value="1073742007" />
<Define Name="SDLK_KP_LEFTBRACE" Value="1073742008" />
<Define Name="SDLK_KP_RIGHTBRACE" Value="1073742009" />
<Define Name="SDLK_KP_TAB" Value="1073742010" />
<Define Name="SDLK_KP_BACKSPACE" Value="1073742011" />
<Define Name="SDLK_KP_A" Value="1073742012" />
<Define Name="SDLK_KP_B" Value="1073742013" />
<Define Name="SDLK_KP_C" Value="1073742014" />
<Define Name="SDLK_KP_D" Value="1073742015" />
<Define Name="SDLK_KP_E" Value="1073742016" />
<Define Name="SDLK_KP_F" Value="1073742017" />
<Define Name="SDLK_KP_XOR" Value="1073742018" />
<Define Name="SDLK_KP_POWER" Value="1073742019" />
<Define Name="SDLK_KP_PERCENT" Value="1073742020" />
<Define Name="SDLK_KP_LESS" Value="1073742021" />
<Define Name="SDLK_KP_GREATER" Value="1073742022" />
<Define Name="SDLK_KP_AMPERSAND" Value="1073742023" />
<Define Name="SDLK_KP_DBLAMPERSAND" Value="1073742024" />
<Define Name="SDLK_KP_VERTICALBAR" Value="1073742025" />
<Define Name="SDLK_KP_DBLVERTICALBAR" Value="1073742026" />
<Define Name="SDLK_KP_COLON" Value="1073742027" />
<Define Name="SDLK_KP_HASH" Value="1073742028" />
<Define Name="SDLK_KP_SPACE" Value="1073742029" />
<Define Name="SDLK_KP_AT" Value="1073742030" />
<Define Name="SDLK_KP_EXCLAM" Value="1073742031" />
<Define Name="SDLK_KP_MEMSTORE" Value="1073742032" />
<Define Name="SDLK_KP_MEMRECALL" Value="1073742033" />
<Define Name="SDLK_KP_MEMCLEAR" Value="1073742034" />
<Define Name="SDLK_KP_MEMADD" Value="1073742035" />
<Define Name="SDLK_KP_MEMSUBTRACT" Value="1073742036" />
<Define Name="SDLK_KP_MEMMULTIPLY" Value="1073742037" />
<Define Name="SDLK_KP_MEMDIVIDE" Value="1073742038" />
<Define Name="SDLK_KP_PLUSMINUS" Value="1073742039" />
<Define Name="SDLK_KP_CLEAR" Value="1073742040" />
<Define Name="SDLK_KP_CLEARENTRY" Value="1073742041" />
<Define Name="SDLK_KP_BINARY" Value="1073742042" />
<Define Name="SDLK_KP_OCTAL" Value="1073742043" />
<Define Name="SDLK_KP_DECIMAL" Value="1073742044" />
<Define Name="SDLK_KP_HEXADECIMAL" Value="1073742045" />
<Define Name="SDLK_LCTRL" Value="1073742048" />
<Define Name="SDLK_LSHIFT" Value="1073742049" />
<Define Name="SDLK_LALT" Value="1073742050" />
<Define Name="SDLK_LGUI" Value="1073742051" />
<Define Name="SDLK_RCTRL" Value="1073742052" />
<Define Name="SDLK_RSHIFT" Value="1073742053" />
<Define Name="SDLK_RALT" Value="1073742054" />
<Define Name="SDLK_RGUI" Value="1073742055" />
<Define Name="SDLK_MODE" Value="1073742081" />
<Define Name="SDLK_AUDIONEXT" Value="1073742082" />
<Define Name="SDLK_AUDIOPREV" Value="1073742083" />
<Define Name="SDLK_AUDIOSTOP" Value="1073742084" />
<Define Name="SDLK_AUDIOPLAY" Value="1073742085" />
<Define Name="SDLK_AUDIOMUTE" Value="1073742086" />
<Define Name="SDLK_MEDIASELECT" Value="1073742087" />
<Define Name="SDLK_WWW" Value="1073742088" />
<Define Name="SDLK_MAIL" Value="1073742089" />
<Define Name="SDLK_CALCULATOR" Value="1073742090" />
<Define Name="SDLK_COMPUTER" Value="1073742091" />
<Define Name="SDLK_AC_SEARCH" Value="1073742092" />
<Define Name="SDLK_AC_HOME" Value="1073742093" />
<Define Name="SDLK_AC_BACK" Value="1073742094" />
<Define Name="SDLK_AC_FORWARD" Value="1073742095" />
<Define Name="SDLK_AC_STOP" Value="1073742096" />
<Define Name="SDLK_AC_REFRESH" Value="1073742097" />
<Define Name="SDLK_AC_BOOKMARKS" Value="1073742098" />
<Define Name="SDLK_BRIGHTNESSDOWN" Value="1073742099" />
<Define Name="SDLK_BRIGHTNESSUP" Value="1073742100" />
<Define Name="SDLK_DISPLAYSWITCH" Value="1073742101" />
<Define Name="SDLK_KBDILLUMTOGGLE" Value="1073742102" />
<Define Name="SDLK_KBDILLUMDOWN" Value="1073742103" />
<Define Name="SDLK_KBDILLUMUP" Value="1073742104" />
<Define Name="SDLK_EJECT" Value="1073742105" />
<Define Name="SDLK_SLEEP" Value="1073742106" />
<Define Name="KMOD_NONE" Value="0" />
<Define Name="KMOD_LSHIFT" Value="1" />
<Define Name="KMOD_RSHIFT" Value="2" />
<Define Name="KMOD_LCTRL" Value="64" />
<Define Name="KMOD_RCTRL" Value="128" />
<Define Name="KMOD_LALT" Value="256" />
<Define Name="KMOD_RALT" Value="512" />
<Define Name="KMOD_LGUI" Value="1024" />
<Define Name="KMOD_RGUI" Value="2048" />
<Define Name="KMOD_NUM" Value="4096" />
<Define Name="KMOD_CAPS" Value="8192" />
<Define Name="KMOD_MODE" Value="16384" />
<Define Name="KMOD_RESERVED" Value="32768" />
<Define Name="KMOD_CTRL" Value="192" />
<Define Name="KMOD_SHIFT" Value="3" />
<Define Name="KMOD_ALT" Value="768" />
<Define Name="KMOD_GUI" Value="3072" />
<Define Name="SEEK_SET" Value="0" />
<Define Name="SEEK_CUR" Value="1" />
<Define Name="SEEK_END" Value="2" />
<Define Name="LOGTYPE_NONE" Value="0" />
<Define Name="LOGTYPE_VERBOSE" Value="1" />
<Define Name="LOGTYPE_DEBUG" Value="2" />
<Define Name="LOGTYPE_INFO" Value="3" />
<Define Name="LOGTYPE_WARN" Value="4" />
<Define Name="LOGTYPE_ERROR" Value="5" />
<Define Name="LOGTYPE_CRITICAL" Value="6" />
<Define Name="COLOUR_TRANSPARENT" Value="0" />
<Define Name="COLOUR_WHITE" Value="4294967295" />
<Define Name="COLOUR_BLACK" Value="4278190080" />
<Define Name="COLOUR_RED" Value="4294901760" />
<Define Name="COLOUR_LIME" Value="4278255360" />
<Define Name="COLOUR_BLUE" Value="4278190335" />
<Define Name="COLOUR_YELLOW" Value="4294967040" />
<Define Name="COLOUR_AQUA" Value="4278255615" />
<Define Name="COLOUR_FUCHSIA" Value="4294902015" />
<Define Name="COLOUR_SKYBLUE" Value="4284927231" />
<Define Name="COLOUR_SILVER" Value="4291019715" />
<Define Name="COLOUR_GREEN" Value="4278222592" />
<Define Name="COLOUR_ORANGE" Value="4294934272" />
<Define Name="INVALID_NETWORK_ID" Value="-1" />
<Define Name="INVALID_CLIENT_ID" Value="-1" />
<Define Name="CHAT_TYPE_NONE" Value="0" />
<Define Name="CHAT_TYPE_CHAT" Value="1" />
<Define Name="CHAT_TYPE_INFO" Value="2" />
<Define Name="CHAT_TYPE_DEBUG" Value="3" />
<Define Name="NONE" Value="0" />
<Define Name="MAX_PEDS" Value="128" />
<Define Name="MAX_VEHICLES" Value="128" />
<Define Name="ELEMENT_ELEMENT" Value="0" />
<Define Name="ELEMENT_ENTITY" Value="6" />
<Define Name="ELEMENT_PED" Value="14" />
<Define Name="ELEMENT_PLAYER" Value="30" />
<Define Name="ELEMENT_VEHICLE" Value="38" />
<Define Name="GAME_UNKNOWN" Value="0" />
<Define Name="GAME_MAFIA_ONE" Value="10" />
<Define Name="GAME_MAFIA_TWO" Value="11" />
<Define Name="GAME_MAFIA_THREE" Value="12" />
<Define Name="GAME_MAFIA_ONE_DE" Value="13" />
<Define Name="WEAPON_KNUCKLEDUSTER" Value="2" />
<Define Name="WEAPON_KNIFE" Value="3" />
<Define Name="WEAPON_BASEBALLBAT" Value="4" />
<Define Name="WEAPON_MOLOTOV" Value="5" />
<Define Name="WEAPON_COLTDETECTIVESPECIAL" Value="6" />
<Define Name="WEAPON_SW_MAGNUM" Value="7" />
<Define Name="WEAPON_SW_MP" Value="8" />
<Define Name="WEAPON_COLT1911" Value="9" />
<Define Name="WEAPON_TOMMYGUN" Value="10" />
<Define Name="WEAPON_PUMPSHOTGUN" Value="11" />
<Define Name="WEAPON_SAWEDOFF" Value="12" />
<Define Name="WEAPON_SPRINGFIELD" Value="13" />
<Define Name="WEAPON_MOSINNAGANT" Value="13" />
<Define Name="WEAPON_GRENADE" Value="15" />
<Define Name="WEAPON_BUCKET" Value="17" />
<Define Name="WEAPON_STEELBAR" Value="20" />
<Define Name="WEAPON_CROWBAR" Value="25" />
<Define Name="WEAPON_WOODENPLANK" Value="28" />
<Define Name="WEAPON_BOTTLE" Value="29" />
<Define Name="WEAPON_SWORD" Value="31" />
<Define Name="WEAPON_DOGSHEAD" Value="32" />
<Define Name="PEDBEHAVIOR_NOREACT" Value="4" />
<Define Name="PEDBEHAVIOR_NOREACT_GUARDPLAYER" Value="2" />
<Define Name="PEDBEHAVIOR_REACTALL" Value="0" />
<Define Name="PEDBEHAVIOR_REACTTOATTACKS_ATTACK" Value="64" />
<Define Name="PEDBEHAVIOR_REACTTOATTACKS_AWAYORATTACK" Value="32" />
<Define Name="PEDBEHAVIOR_REACTTOPLAYER_AWAY" Value="16" />
<Define Name="PEDBEHAVIOR_REACTTOPLAYERHIT_ATTACK" Value="8" />
<Define Name="CLIENT_VERSION_MAJOR" Value="1" />
<Define Name="CLIENT_VERSION_MINOR" Value="0" />
<Define Name="CLIENT_VERSION_PATCH" Value="0" />
<Define Name="CLIENT_VERSION_BUILD" Value="0" />
</Defines>

View File

@@ -0,0 +1,459 @@
<?xml version="1.0" ?>
<Documentation>
<!--
Mask Values
b - bool
i - int32
f - float
s - string
c - function/callback
x - class/instance
z - vector2D
v - vector3D
t - thiscall
| - optional arguments
* - infinite arguments
. - any type
-->
<Namespace Name="global">
<Property Name="platform" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="thisResource" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="localClient" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="localPlayer" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="isConnected" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isConnecting" ReadOnly="true" Obsolete="false" Type="bool" />
<Function Name="toColour" Mask="iii|i" RequiredArguments="3" Obsolete="false" />
<Function Name="collectAllGarbage" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="inPoly" Mask="z*" RequiredArguments="1" Obsolete="false" />
<Function Name="addEvent" Mask="s|i" RequiredArguments="1" Obsolete="false" />
<Function Name="addEventHandler" Mask="sf" RequiredArguments="2" Obsolete="false" />
<Function Name="removeEventHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="bindEventHandler" Mask="sxf" RequiredArguments="3" Obsolete="false" />
<Function Name="unbindEventHandler" Mask="sx" RequiredArguments="2" Obsolete="false" />
<Function Name="triggerEvent" Mask="s|x*" RequiredArguments="1" Obsolete="false" />
<Function Name="addCommandHandler" Mask="sc|b" RequiredArguments="2" Obsolete="false" />
<Function Name="removeCommandHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="hasCommandHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="consoleCommand" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="setTimeout" Mask="ci*" RequiredArguments="2" Obsolete="false" />
<Function Name="setInterval" Mask="ci*" RequiredArguments="2" Obsolete="false" />
<Function Name="setImmediate" Mask="c*" RequiredArguments="1" Obsolete="false" />
<Function Name="clearTimeout" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="clearInterval" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="clearImmediate" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="bindKey" Mask="iic" RequiredArguments="3" Obsolete="false" />
<Function Name="unbindKey" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="unbindAllKeys" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="findResourceByName" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="getResources" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="exportFunction" Mask="c" RequiredArguments="1" Obsolete="false" />
<Function Name="openFile" Mask="s|b" RequiredArguments="1" Obsolete="false" />
<Function Name="createFile" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="loadTextFile" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="saveTextFile" Mask="ss" RequiredArguments="2" Obsolete="false" />
<Function Name="addNetworkHandler" Mask="sc" RequiredArguments="2" Obsolete="false" />
<Function Name="removeNetworkHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="getConsole" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getClients" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getClient" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="destroyElement" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="getClientFromPlayerElement" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementsByType" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementFromId" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementFromName" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="addToWorld" Mask="x" RequiredArguments="1" Obsolete="true" />
<Function Name="registerNetObject" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="connect" Mask="si|s" RequiredArguments="2" Obsolete="false" />
<Function Name="disconnect" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="message" Mask="s|i" RequiredArguments="1" Obsolete="false" />
<Function Name="triggerNetworkEvent" Mask="s*" RequiredArguments="1" Obsolete="false" />
<Function Name="setChatWindowEnabled" Mask="b" RequiredArguments="1" Obsolete="false" />
<Function Name="isScancodePressed" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="isKeyDown" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="getPeds" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getPlayers" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getVehicles" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getScreenFromWorldPosition" Mask="v" RequiredArguments="1" Obsolete="false" />
<Class Name="Stream">
<Property Name="length" ReadOnly="true" Obsolete="false" Type="int64" />
<Property Name="position" ReadOnly="true" Obsolete="false" Type="int64" />
<Function Name="close" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readBytes" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="readString" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readLine" Mask="t" RequiredArguments="0" Obsolete="true" />
<Function Name="writeBytes" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="writeString" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="readInt8" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt8" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readInt16" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt16" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readInt32" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt32" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readInt64" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt64" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readFloat" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readDouble" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="writeInt8" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt8" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeInt16" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt16" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeInt32" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt32" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeInt64" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt64" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeFloat" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="writeDouble" Mask="tf" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="TextReader">
<Function Name="close" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="loadText" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readLine" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readCharacter" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Matrix4x4">
<Property Name="m11" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m12" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m13" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m14" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m21" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m22" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m23" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m24" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m31" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m32" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m33" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m34" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m41" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m42" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m43" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m44" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="setIdentity" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setTranslate" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="setScale" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotateX" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotateY" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotateZ" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotate" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="setMultiply" Mask="txx*" RequiredArguments="2" Obsolete="false" />
<Function Name="multiply" Mask="tx*" RequiredArguments="1" Obsolete="false" />
<Function Name="setInverse" Mask="tx" RequiredArguments="1" Obsolete="false" />
<Function Name="transformCoordinate" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="getElement" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="setElement" Mask="tif" RequiredArguments="2" Obsolete="false" />
<Function Name="getVector3" Mask="ti" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="Vec2">
<Property Name="x" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="y" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="addPolar" Mask="tff" RequiredArguments="2" Obsolete="false" />
<Function Name="interpolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="extrapolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalInterpolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalExtrapolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="cartesianToPolar" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Vec3">
<Property Name="x" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="y" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="z" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="length" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="squaredLength" ReadOnly="true" Obsolete="false" Type="number" />
<Function Name="distance" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="squaredDistance" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="dotProduct" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="absDotProduct" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="normalise" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="crossProduct" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="midPoint" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="addPolar" Mask="tff" RequiredArguments="2" Obsolete="false" />
<Function Name="addSpherical" Mask="tfff" RequiredArguments="3" Obsolete="false" />
<Function Name="interpolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="extrapolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalInterpolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalExtrapolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="cartesianToPolar" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="cartesianToSpherical" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Event">
<Class Name="CancellableEvent">
<Function Name="preventDefault" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="isDefaultPrevented" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
</Class>
<Class Name="Timer" />
<Class Name="KeyEvent">
<Property Name="keyCode" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="scanCode" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="mod" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="repeat" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="down" ReadOnly="true" Obsolete="false" Type="bool" />
<Function Name="preventDefault" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="isDefaultPrevented" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="XmlElement">
<Property Name="childrenCount" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="children" ReadOnly="true" Obsolete="false" />
<Property Name="parent" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="text" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="attributes" ReadOnly="true" Obsolete="false" />
<Function Name="clear" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getStringAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="getBoolAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="getIntegerAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="getFloatAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="XmlDocument">
<Property Name="rootElement" ReadOnly="true" Obsolete="false" Type="Object" />
<Function Name="load" Mask="tx" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="Resource">
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="isStarted" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isStarting" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="exports" ReadOnly="true" Obsolete="false" />
<Property Name="isReady" ReadOnly="true" Obsolete="false" Type="bool" />
<Function Name="start" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="stop" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="restart" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getExport" Mask="ts" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="GUIElement">
<Property Name="name" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="left" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="top" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="right" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="bottom" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="width" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="height" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="x" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="y" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="focusBringsToTop" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="visible" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="useClip" ReadOnly="false" Obsolete="false" Type="bool" />
<Function Name="bringToTop" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="invalidate" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setDocked" Mask="t" RequiredArguments="0" Obsolete="false" />
<Class Name="GUIPage">
<Function Name="addElement" Mask="tx" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementFromName" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Class Name="GUIWindow">
<Property Name="title" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="text" ReadOnly="false" Obsolete="false" Type="string" />
<Function Name="addClientElement" Mask="tx" RequiredArguments="1" Obsolete="false" />
</Class>
</Class>
<Class Name="GUIButton" />
<Class Name="GUIRectangle" />
<Class Name="GUIText" />
<Class Name="GUIHtmlView">
<Property Name="offset" ReadOnly="true" Obsolete="false" Type="Vector2D" />
<Property Name="maxOffset" ReadOnly="true" Obsolete="false" Type="Vector2D" />
<Property Name="document" ReadOnly="true" Obsolete="false" Type="Object" />
<Function Name="open" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="addOffset" Mask="tz" RequiredArguments="1" Obsolete="false" />
<Function Name="updateLayout" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
</Class>
<Class Name="GUIHtmlElement">
<Property Name="text" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="parent" ReadOnly="true" Obsolete="false" Type="Object" />
<Function Name="getChild" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="select" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="selectAll" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="clear" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="orphan" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setInnerHtml" Mask="ts" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="Client">
<Property Name="index" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="game" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="gameVersion" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="player" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="administrator" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="console" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="ip" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="ping" ReadOnly="true" Obsolete="false" Type="int" />
<Function Name="despawnPlayer" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="disconnect" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="setData" Mask="ts.|b" RequiredArguments="2" Obsolete="false" />
<Function Name="removeData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="removeAllData" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Element">
<Property Name="id" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="type" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="netFlags" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="isLocal" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isSyncer" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isOwner" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="syncer" ReadOnly="false" Obsolete="false" Type="Object" />
<Property Name="syncerId" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="dimension" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="parent" ReadOnly="false" Obsolete="false" Type="Object" />
<Property Name="children" ReadOnly="true" Obsolete="false" />
<Property Name="name" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="resource" ReadOnly="false" Obsolete="false" Type="Object" />
<Property Name="streamInDistance" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="streamOutDistance" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="position" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="rotation" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Function Name="isType" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="getData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="setData" Mask="ts.|b" RequiredArguments="2" Obsolete="false" />
<Function Name="removeData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="removeAllData" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setSyncer" Mask="tx|b" RequiredArguments="1" Obsolete="false" />
<Function Name="isCreatedFor" Mask="tx" RequiredArguments="1" Obsolete="false" />
<Function Name="clearExistsFor" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setExistsFor" Mask="txb" RequiredArguments="2" Obsolete="false" />
<Function Name="existsFor" Mask="tx" RequiredArguments="1" Obsolete="false" />
<Function Name="getRotation" Mask="t" RequiredArguments="0" Obsolete="true" />
<Function Name="setRotation" Mask="tv" RequiredArguments="1" Obsolete="true" />
<Class Name="Entity">
<Property Name="position" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="rotation" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="heading" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="model" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="modelIndex" ReadOnly="false" Obsolete="false" Type="string" />
<Class Name="Ped">
<Property Name="vehicle" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="skin" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="health" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="animationState" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="animationStateLocal" ReadOnly="true" Obsolete="false" Type="int" />
<Function Name="kill" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="respawn" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="clearWeapons" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="giveWeapon" Mask="tiii" RequiredArguments="3" Obsolete="false" />
<Function Name="hasWeapon" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="takeWeapon" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="dropWeapon" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="warpIntoVehicle" Mask="tvi" RequiredArguments="2" Obsolete="false" />
<Function Name="removeFromVehicle" Mask="tvi" RequiredArguments="2" Obsolete="false" />
<Function Name="addAnimation" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="setBehavior" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Class Name="Player" />
</Class>
<Class Name="Vehicle">
<Property Name="siren" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="lights" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="engine" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="speedLimit" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="gear" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="wheelAngle" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="fuel" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="speed" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="turnVelocity" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="velocity" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="engineHealth" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="health" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="engineRPM" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="explode" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="repair" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getOccupant" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="getOccupants" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
</Class>
</Class>
<Class Name="NetObjectFlags">
<Property Name="registered" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="deleting" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="onAllDimensions" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="forcedSyncer" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="findSyncer" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="sendSync" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="distanceStreaming" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="alwaysExistForSyncer" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="defaultExistance" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="transient" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="onlySyncIfDetached" ReadOnly="false" Obsolete="false" Type="bool" />
</Class>
<Class Name="Surface">
<Class Name="Texture" />
</Class>
<Namespace Name="reflection">
<Function Name="clone" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="move" Mask="xx" RequiredArguments="2" Obsolete="false" />
<Function Name="tostring" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="createFunction" Mask="c" RequiredArguments="1" Obsolete="false" />
<Function Name="call" Mask="x" RequiredArguments="1" Obsolete="false" />
<Class Name="Function" />
</Namespace>
<Namespace Name="module" />
<Namespace Name="sdl">
<Property Name="platform" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="ticks" ReadOnly="true" Obsolete="false" Type="int" />
<Function Name="getModState" Mask="" RequiredArguments="0" Obsolete="false" />
</Namespace>
<Namespace Name="platform">
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="modState" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="ticks" ReadOnly="true" Obsolete="false" Type="int" />
</Namespace>
<Namespace Name="audio">
<Function Name="createSound" Mask="xb" RequiredArguments="2" Obsolete="false" />
<Function Name="createSoundFromURL" Mask="s" RequiredArguments="1" Obsolete="false" />
<Class Name="Sound">
<Property Name="position" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="volume" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="play" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="stop" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
</Namespace>
<Namespace Name="lucasFont">
<Function Name="createFont" Mask="xf" RequiredArguments="2" Obsolete="false" />
<Function Name="createDefaultFont" Mask="fs|s" RequiredArguments="2" Obsolete="false" />
<Function Name="enumFontFamilies" Mask="c" RequiredArguments="1" Obsolete="false" />
<Class Name="Font">
<Property Name="size" ReadOnly="true" Obsolete="false" Type="number" />
<Function Name="render" Mask="tszffffi|bbbb" RequiredArguments="7" Obsolete="false" />
<Function Name="measure" Mask="tsffff|bb" RequiredArguments="5" Obsolete="false" />
</Class>
</Namespace>
<Namespace Name="gui">
<Property Name="cursorPosition" ReadOnly="true" Obsolete="false" Type="Vector2D" />
<Property Name="cursorEnabled" ReadOnly="true" Obsolete="false" Type="bool" />
<Function Name="addElement" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="destroyElement" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="destroyElements" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getElementFromName" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="showCursor" Mask="b|b" RequiredArguments="1" Obsolete="false" />
</Namespace>
<Namespace Name="elements" />
<Namespace Name="mafia">
<Property Name="mapName" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="game" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="width" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="height" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="aspectRatio" ReadOnly="true" Obsolete="false" Type="number" />
<Function Name="createPed" Mask="svf" RequiredArguments="3" Obsolete="false" />
<Function Name="createVehicle" Mask="svf" RequiredArguments="3" Obsolete="false" />
<Function Name="createExplosion" Mask="vff" RequiredArguments="3" Obsolete="false" />
<Function Name="fadeCamera" Mask="bf|i" RequiredArguments="2" Obsolete="false" />
<Function Name="setPlayerControl" Mask="b" RequiredArguments="1" Obsolete="false" />
<Function Name="setTrafficEnabled" Mask="b" RequiredArguments="1" Obsolete="false" />
<Function Name="changeMap" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="createPlayer" Mask="svf" RequiredArguments="3" Obsolete="false" />
<Function Name="setLocalPlayer" Mask="x" RequiredArguments="1" Obsolete="false" />
<Namespace Name="hud">
<Function Name="message" Mask="si" RequiredArguments="2" Obsolete="false" />
<Function Name="enableMap" Mask="b" RequiredArguments="1" Obsolete="false" />
<Function Name="announce" Mask="sf" RequiredArguments="2" Obsolete="false" />
<Function Name="showCountdown" Mask="i" RequiredArguments="1" Obsolete="false" />
</Namespace>
</Namespace>
<Namespace Name="camera">
<Property Name="position" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="lookAtPosition" ReadOnly="false" Obsolete="false" Type="Vector3D" />
</Namespace>
<Namespace Name="graphics">
<Function Name="loadBMP" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="loadPNG" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="drawRectangle" Mask="xzz|iiiifzzzz" RequiredArguments="3" Obsolete="false" />
</Namespace>
</Namespace>
</Documentation>

View File

@@ -0,0 +1,103 @@
<?xml version="1.0" ?>
<EventTypes>
<!--Called right before the hud is drawn, you should draw your HUD here if you want it under the hud-->
<EventType Name="OnDrawHUD" Hash="2504546524" Arguments="0" CanPreventDefault="true" />
<!--Called when a keyboard key is down-->
<EventType Name="OnKeyDown" Hash="3091440445" Arguments="3" CanPreventDefault="false" />
<!--Called when a resource starts-->
<EventType Name="OnResourceStart" Hash="1143708828" Arguments="1" CanPreventDefault="true" />
<!--Called when an element is about to stream in-->
<EventType Name="OnElementStreamIn" Hash="2759455221" Arguments="2" CanPreventDefault="true" />
<!--Called when a resource stops-->
<EventType Name="OnResourceStop" Hash="1347867548" Arguments="2" CanPreventDefault="true" />
<!---->
<EventType Name="OnLocalPlayerExitSphere" Hash="105319985" Arguments="1" CanPreventDefault="false" />
<!--Called when a GUIElement is clicked on-->
<EventType Name="OnGUIClick" Hash="1620463676" Arguments="1" CanPreventDefault="false" />
<!--Called when the camera is about to be processed-->
<EventType Name="OnCameraProcess" Hash="4077277522" Arguments="0" CanPreventDefault="true" />
<!--Called whenever a ped jacks a vehicle-->
<EventType Name="OnPedJackVehicle" Hash="3295144583" Arguments="0" CanPreventDefault="false" />
<!--Called after all the hud is drawn, you should draw your HUD here if you want it over the hud-->
<EventType Name="OnDrawnHUD" Hash="1969344644" Arguments="0" CanPreventDefault="false" />
<!--Called after OnRender2D, usually post processing would be done here-->
<EventType Name="OnPostRender2D" Hash="1025891209" Arguments="0" CanPreventDefault="false" />
<!--Called when all the files are downloaded-->
<EventType Name="OnResourceReady" Hash="4089924796" Arguments="1" CanPreventDefault="false" />
<!--Called whenever an entity is processed-->
<EventType Name="OnEntityProcess" Hash="850679850" Arguments="1" CanPreventDefault="true" />
<!--Called when an element is about to be destroyed-->
<EventType Name="OnElementDestroy" Hash="696839637" Arguments="1" CanPreventDefault="true" />
<!--Called when anchor tags are clicked in a GUIHtmlView-->
<EventType Name="OnGUIAnchorClick" Hash="1882824246" Arguments="3" CanPreventDefault="true" />
<!--Called when a key is typed-->
<EventType Name="OnCharacter" Hash="318128971" Arguments="1" CanPreventDefault="false" />
<!--Called whenever something happens-->
<EventType Name="OnExampleEvent" Hash="3708674487" Arguments="1" CanPreventDefault="true" />
<!--Called whenever the map/mission is fully loaded and ready to play-->
<EventType Name="OnMapLoaded" Hash="3234142120" Arguments="0" CanPreventDefault="false" />
<!--Called whenever the key is pressed-->
<EventType Name="OnKeyPressed" Hash="694509307" Arguments="0" CanPreventDefault="false" />
<!--Called whenever a ped has been hit-->
<EventType Name="OnPedInflictDamage" Hash="1391854299" Arguments="0" CanPreventDefault="false" />
<!--Called every render-->
<EventType Name="OnRender" Hash="2466144783" Arguments="0" CanPreventDefault="false" />
<!--Called whenever a ped dies-->
<EventType Name="OnPedDeath" Hash="2417618960" Arguments="0" CanPreventDefault="false" />
<!--Called whenever a ped spawns-->
<EventType Name="OnPedSpawn" Hash="3880839897" Arguments="0" CanPreventDefault="false" />
<!--Called whenever a ped starts entering a vehicle-->
<EventType Name="OnPedEnteringVehicle" Hash="3211811326" Arguments="0" CanPreventDefault="false" />
<!--Called when a cursor button is down-->
<EventType Name="OnCursorDown" Hash="3618352285" Arguments="1" CanPreventDefault="false" />
<!--Called whenever a ped finishes entering a vehicle-->
<EventType Name="OnPedEnteredVehicle" Hash="800199306" Arguments="0" CanPreventDefault="false" />
<!--Called whenever a ped starts exiting a vehicle-->
<EventType Name="OnPedExitingVehicle" Hash="353075125" Arguments="0" CanPreventDefault="false" />
<!--Called when the window is focused-->
<EventType Name="OnFocus" Hash="1989030060" Arguments="0" CanPreventDefault="false" />
<!--Called whenever a ped finishes exited a vehicle-->
<EventType Name="OnPedExitedVehicle" Hash="1591215844" Arguments="0" CanPreventDefault="false" />
<!--Called when the mouse leaves the window-->
<EventType Name="OnMouseLeave" Hash="3102340603" Arguments="0" CanPreventDefault="false" />
<!--Called when a cursor button is up-->
<EventType Name="OnCursorUp" Hash="2031527000" Arguments="1" CanPreventDefault="false" />
<!--Called every process-->
<EventType Name="OnProcess" Hash="3150131130" Arguments="1" CanPreventDefault="false" />
<!--Called every prerender-->
<EventType Name="OnPreRender" Hash="2235820386" Arguments="0" CanPreventDefault="false" />
<!--Called when 2D shit should be rendered-->
<EventType Name="OnRender2D" Hash="3260181898" Arguments="0" CanPreventDefault="false" />
<!--Called when a line will be output to the chatbox-->
<EventType Name="OnChatOutput" Hash="2275472839" Arguments="2" CanPreventDefault="true" />
<!--Called when a mouse button is down-->
<EventType Name="OnMouseDown" Hash="2632778956" Arguments="2" CanPreventDefault="false" />
<!--Called when a mouse button is up-->
<EventType Name="OnMouseUp" Hash="3080252785" Arguments="2" CanPreventDefault="false" />
<!--Called when the cursor moves-->
<EventType Name="OnCursorMove" Hash="610929630" Arguments="1" CanPreventDefault="false" />
<!--Called when the mouse scrolls-->
<EventType Name="OnMouseWheel" Hash="1116330591" Arguments="3" CanPreventDefault="false" />
<!--Called when a mouse moves-->
<EventType Name="OnMouseMove" Hash="1865196431" Arguments="3" CanPreventDefault="false" />
<!--Called when a mouse is connected-->
<EventType Name="OnMouseConnected" Hash="4137684318" Arguments="1" CanPreventDefault="false" />
<!--Called when a mouse is disconnected-->
<EventType Name="OnMouseDisconnected" Hash="2332645211" Arguments="1" CanPreventDefault="false" />
<!--Called when the window is defocused-->
<EventType Name="OnLostFocus" Hash="1036525539" Arguments="0" CanPreventDefault="false" />
<!--Called when a keyboard key is up-->
<EventType Name="OnKeyUp" Hash="1763402597" Arguments="3" CanPreventDefault="false" />
<!--Called when an element is about to stream out-->
<EventType Name="OnElementStreamOut" Hash="3852636898" Arguments="2" CanPreventDefault="true" />
<!--Called when disconnected from the server-->
<EventType Name="OnDisconnect" Hash="3221334991" Arguments="1" CanPreventDefault="false" />
<!---->
<EventType Name="OnLocalPlayerEnterSphere" Hash="3890156725" Arguments="1" CanPreventDefault="false" />
<!---->
<EventType Name="OnLocalPlayerEnteredVehicle" Hash="3395021369" Arguments="1" CanPreventDefault="false" />
<!---->
<EventType Name="OnLocalPlayerExitedVehicle" Hash="1654569001" Arguments="1" CanPreventDefault="false" />
<!---->
<EventType Name="OnLocalPlayerSwitchWeapon" Hash="3670373318" Arguments="2" CanPreventDefault="false" />
</EventTypes>

View File

@@ -0,0 +1,399 @@
<?xml version="1.0" ?>
<Commands>
<Command Name="jobwhitelist" Hash="2189523071" />
<Command Name="bizdelflooritems" Hash="158748106" />
<Command Name="bizpublic" Hash="2572551879" />
<Command Name="returnplr" Hash="2563135004" />
<Command Name="additemtype" Hash="1625056830" />
<Command Name="say" Hash="4241071205" />
<Command Name="freq" Hash="1475614133" />
<Command Name="items" Hash="3776899405" />
<Command Name="iplogin" Hash="3830114180" />
<Command Name="exit" Hash="2483651598" />
<Command Name="addjobrouteloc" Hash="2057882151" />
<Command Name="houseentrance" Hash="1732577001" />
<Command Name="houseclan" Hash="3573514699" />
<Command Name="aban" Hash="1063339661" />
<Command Name="vw" Hash="4141688848" />
<Command Name="autolastchar" Hash="3186897000" />
<Command Name="quit" Hash="1135269781" />
<Command Name="notips" Hash="3711348993" />
<Command Name="help" Hash="143088812" />
<Command Name="equip" Hash="4067673008" />
<Command Name="ccode" Hash="1323373828" />
<Command Name="start" Hash="2675529103" />
<Command Name="locale" Hash="1098958488" />
<Command Name="restart" Hash="3891864071" />
<Command Name="carrespawnclan" Hash="1840990743" />
<Command Name="deljobroute" Hash="3139178648" />
<Command Name="setemail" Hash="795930342" />
<Command Name="reloadcfg" Hash="2937436470" />
<Command Name="cmd" Hash="794565824" />
<Command Name="vehreloadall" Hash="1958007921" />
<Command Name="stopall" Hash="1683731152" />
<Command Name="stop" Hash="3109426870" />
<Command Name="refresh" Hash="1619108091" />
<Command Name="bizjob" Hash="1623679964" />
<Command Name="jobcolour" Hash="1906062370" />
<Command Name="subnetban" Hash="3446702509" />
<Command Name="bizdefaultitems" Hash="492108129" />
<Command Name="dumpdoc" Hash="3404143852" />
<Command Name="bizclan" Hash="2741917790" />
<Command Name="bizdeposit" Hash="4085204187" />
<Command Name="accent" Hash="1734464235" />
<Command Name="streamnameall" Hash="257040269" />
<Command Name="accents" Hash="749835561" />
<Command Name="bizfloor" Hash="991723021" />
<Command Name="bizowner" Hash="1245269599" />
<Command Name="jobrouteenabled" Hash="2783446125" />
<Command Name="bizreloadall" Hash="1391182304" />
<Command Name="accentlist" Hash="1686860130" />
<Command Name="login" Hash="2852702992" />
<Command Name="mute" Hash="3434705756" />
<Command Name="drop" Hash="1880425762" />
<Command Name="register" Hash="1610170388" />
<Command Name="bizstore" Hash="2047799380" />
<Command Name="gotoveh" Hash="1314378666" />
<Command Name="bizname" Hash="1656456532" />
<Command Name="changepass" Hash="1379839939" />
<Command Name="bizorder" Hash="1886403515" />
<Command Name="anims" Hash="3889228819" />
<Command Name="scrolllines" Hash="1527443730" />
<Command Name="gui" Hash="3573502200" />
<Command Name="2fa" Hash="3518788867" />
<Command Name="verifyemail" Hash="3201570836" />
<Command Name="loginalert" Hash="2359999903" />
<Command Name="siren" Hash="3683367432" />
<Command Name="mousecam" Hash="3206767913" />
<Command Name="bizbuyprice" Hash="655960419" />
<Command Name="delstaffflag" Hash="1313026715" />
<Command Name="bizexit" Hash="2828107612" />
<Command Name="chatautohide" Hash="4051244712" />
<Command Name="newchar" Hash="4170498675" />
<Command Name="anim" Hash="1739285595" />
<Command Name="lights" Hash="951890664" />
<Command Name="charban" Hash="994982700" />
<Command Name="biztill" Hash="869001970" />
<Command Name="an" Hash="2536834118" />
<Command Name="e" Hash="4024072794" />
<Command Name="addstaffflag" Hash="79289023" />
<Command Name="animlist" Hash="2302640798" />
<Command Name="vehjob" Hash="3344978244" />
<Command Name="clanchat" Hash="3592644293" />
<Command Name="stopanim" Hash="423975717" />
<Command Name="houseexit" Hash="3741361865" />
<Command Name="spawnveh" Hash="4087978827" />
<Command Name="acctban" Hash="2579355258" />
<Command Name="cban" Hash="2506657286" />
<Command Name="delplritem" Hash="2217077700" />
<Command Name="saban" Hash="1719006355" />
<Command Name="ipban" Hash="2759871306" />
<Command Name="delloglevel" Hash="3046139078" />
<Command Name="addbiz" Hash="3844119303" />
<Command Name="delbiz" Hash="1295584235" />
<Command Name="bizlock" Hash="3138871388" />
<Command Name="bizlights" Hash="2589891122" />
<Command Name="bizbuy" Hash="1419510099" />
<Command Name="addtrigresp" Hash="2942770628" />
<Command Name="bizfee" Hash="223799185" />
<Command Name="bizitemprice" Hash="3432680323" />
<Command Name="bizbalance" Hash="3394291228" />
<Command Name="bizstock" Hash="3463446083" />
<Command Name="bizwithdraw" Hash="4223432723" />
<Command Name="buy" Hash="3481502327" />
<Command Name="bizdelowner" Hash="3491490727" />
<Command Name="bizrank" Hash="3034649527" />
<Command Name="bizblip" Hash="688162896" />
<Command Name="bizpickup" Hash="3816558887" />
<Command Name="bizinfo" Hash="4145138181" />
<Command Name="cmdenabletype" Hash="3401887628" />
<Command Name="bizflooritems" Hash="3152039807" />
<Command Name="bizentrance" Hash="3384296964" />
<Command Name="nosave" Hash="3967601367" />
<Command Name="bizinttype" Hash="1993387962" />
<Command Name="vehrespawnclan" Hash="2839312157" />
<Command Name="bizdelstorageitems" Hash="640974901" />
<Command Name="bizdealership" Hash="1448970834" />
<Command Name="deljobrouteloc" Hash="630262577" />
<Command Name="me" Hash="2891092674" />
<Command Name="setgui" Hash="2722470096" />
<Command Name="do" Hash="2638594197" />
<Command Name="radioreloadall" Hash="240903479" />
<Command Name="s" Hash="453955339" />
<Command Name="shout" Hash="3228108389" />
<Command Name="lock" Hash="2274335502" />
<Command Name="setjobblips" Hash="3692573588" />
<Command Name="talk" Hash="2669991355" />
<Command Name="local" Hash="2346092776" />
<Command Name="l" Hash="2517025534" />
<Command Name="setlang" Hash="80385616" />
<Command Name="testguiprompt" Hash="1276898732" />
<Command Name="reloademailcfg" Hash="3863532754" />
<Command Name="w" Hash="476252946" />
<Command Name="gotobiz" Hash="175433282" />
<Command Name="whisper" Hash="1339834624" />
<Command Name="clan" Hash="2683740940" />
<Command Name="jobroutestartmsg" Hash="3050645607" />
<Command Name="addclan" Hash="4056447230" />
<Command Name="c" Hash="112844655" />
<Command Name="adminchat" Hash="1592899621" />
<Command Name="admins" Hash="2732594447" />
<Command Name="a" Hash="3904355907" />
<Command Name="gotospawn" Hash="1617509273" />
<Command Name="achat" Hash="648643670" />
<Command Name="houseowner" Hash="3391862861" />
<Command Name="m" Hash="3775001192" />
<Command Name="clans" Hash="304575875" />
<Command Name="testguierror" Hash="491890956" />
<Command Name="clanranks" Hash="374891081" />
<Command Name="clanflags" Hash="3602613223" />
<Command Name="clearstaffflags" Hash="1933688633" />
<Command Name="delclan" Hash="1490865981" />
<Command Name="oldveh" Hash="2876867678" />
<Command Name="nearveh" Hash="1881612975" />
<Command Name="clanaddrank" Hash="2620943916" />
<Command Name="stoproute" Hash="3037172349" />
<Command Name="clandelrank" Hash="892131823" />
<Command Name="clansetrank" Hash="3351619564" />
<Command Name="clanowner" Hash="316548129" />
<Command Name="clantag" Hash="3681023611" />
<Command Name="clanranktag" Hash="1772177415" />
<Command Name="clanmembertag" Hash="959912259" />
<Command Name="clanrankname" Hash="3030127040" />
<Command Name="clanranklevel" Hash="3892778233" />
<Command Name="clanmembertitle" Hash="3517062004" />
<Command Name="getplrveh" Hash="3278782420" />
<Command Name="clanaddrankflag" Hash="2541715106" />
<Command Name="clanrankflags" Hash="2045286736" />
<Command Name="clandelrankflag" Hash="2989628358" />
<Command Name="clanaddmemberflag" Hash="2650664065" />
<Command Name="clandelmemberflag" Hash="2712990392" />
<Command Name="armour" Hash="2549936275" />
<Command Name="cmddisabletype" Hash="3293268402" />
<Command Name="bindkey" Hash="1227425763" />
<Command Name="cmdenable" Hash="4119993794" />
<Command Name="cmddisable" Hash="4076768664" />
<Command Name="jobblip" Hash="2619537769" />
<Command Name="settime" Hash="1515686519" />
<Command Name="setminuteduration" Hash="3347405783" />
<Command Name="jobroutelocarrivemsg" Hash="2806715855" />
<Command Name="setweather" Hash="296092028" />
<Command Name="setsnow" Hash="54572929" />
<Command Name="setlogo" Hash="3511519265" />
<Command Name="setguicolours" Hash="1253001477" />
<Command Name="newcharspawn" Hash="3561425132" />
<Command Name="newcharcash" Hash="1263771093" />
<Command Name="addgrounditem" Hash="766381040" />
<Command Name="newcharskin" Hash="1335038066" />
<Command Name="vehrespawnempty" Hash="37869538" />
<Command Name="reloaddbcfg" Hash="2688744694" />
<Command Name="reloadlocalecfg" Hash="3323883086" />
<Command Name="reloadaccentcfg" Hash="1762311642" />
<Command Name="setbizblips" Hash="2208865773" />
<Command Name="docmdall" Hash="3550628791" />
<Command Name="sethouseblips" Hash="3851708594" />
<Command Name="bizstorage" Hash="853459670" />
<Command Name="setbizpickups" Hash="2871853734" />
<Command Name="sethousepickups" Hash="1540957074" />
<Command Name="kick" Hash="517332741" />
<Command Name="setjobpickups" Hash="1690177862" />
<Command Name="dbquery" Hash="1161190191" />
<Command Name="scode" Hash="771850886" />
<Command Name="gmx" Hash="1012197459" />
<Command Name="rt" Hash="196656302" />
<Command Name="saveall" Hash="1031238566" />
<Command Name="docmd" Hash="432538647" />
<Command Name="addloglevel" Hash="2430402978" />
<Command Name="loglevel" Hash="3600896637" />
<Command Name="streamurlall" Hash="432433149" />
<Command Name="forceresetpass" Hash="2586824369" />
<Command Name="fixblips" Hash="3117299078" />
<Command Name="fixpickups" Hash="4113146230" />
<Command Name="carrespawnbiz" Hash="2668944323" />
<Command Name="cars" Hash="2512854292" />
<Command Name="resetambience" Hash="2196473743" />
<Command Name="testguiinfo" Hash="2560043709" />
<Command Name="jobroutefinishmsg" Hash="4059033309" />
<Command Name="tax" Hash="2390866550" />
<Command Name="wealth" Hash="1012568925" />
<Command Name="givemoney" Hash="3084115026" />
<Command Name="forcepayday" Hash="152293771" />
<Command Name="speak" Hash="4227147363" />
<Command Name="testemail" Hash="3217958560" />
<Command Name="commands" Hash="2587759404" />
<Command Name="enter" Hash="3111174254" />
<Command Name="cmds" Hash="2152026535" />
<Command Name="info" Hash="3414765911" />
<Command Name="pos" Hash="2161764012" />
<Command Name="veh" Hash="4108237688" />
<Command Name="warpinveh" Hash="1511727410" />
<Command Name="v" Hash="1801730948" />
<Command Name="car" Hash="2000545437" />
<Command Name="spawncar" Hash="1883948718" />
<Command Name="skin" Hash="41510942" />
<Command Name="vehdelowner" Hash="1446958743" />
<Command Name="trigresp" Hash="3910880795" />
<Command Name="skins" Hash="3775105792" />
<Command Name="addjobloc" Hash="3531129112" />
<Command Name="clothes" Hash="813282444" />
<Command Name="changeskin" Hash="2654409721" />
<Command Name="addhouse" Hash="872977526" />
<Command Name="delhouse" Hash="919344075" />
<Command Name="take" Hash="937258619" />
<Command Name="housereloadall" Hash="2365497957" />
<Command Name="getveh" Hash="438514653" />
<Command Name="quitjob" Hash="4168778638" />
<Command Name="houseinfo" Hash="2155877264" />
<Command Name="engine" Hash="3903330957" />
<Command Name="addtrigcond" Hash="2950893705" />
<Command Name="geoip" Hash="1182365374" />
<Command Name="housebuy" Hash="3262448210" />
<Command Name="addveh" Hash="2701373167" />
<Command Name="housedesc" Hash="1086099091" />
<Command Name="cursor" Hash="3313461902" />
<Command Name="houselock" Hash="3431381449" />
<Command Name="houselights" Hash="1768421772" />
<Command Name="drag" Hash="1833282923" />
<Command Name="housebuyprice" Hash="2313447822" />
<Command Name="up" Hash="1133833840" />
<Command Name="houserentprice" Hash="2866086582" />
<Command Name="houseblip" Hash="1586844101" />
<Command Name="gps" Hash="1424645575" />
<Command Name="housepickup" Hash="272986777" />
<Command Name="houseinttype" Hash="1526335570" />
<Command Name="i" Hash="3865851505" />
<Command Name="item" Hash="521872670" />
<Command Name="additem" Hash="1898315500" />
<Command Name="delgrounditem" Hash="300357065" />
<Command Name="delplritems" Hash="2273569865" />
<Command Name="itemtypeuseval" Hash="4115341070" />
<Command Name="pickup" Hash="1100888573" />
<Command Name="put" Hash="2928708052" />
<Command Name="inventory" Hash="2972535350" />
<Command Name="use" Hash="2494680139" />
<Command Name="inv" Hash="4200577949" />
<Command Name="houseitems" Hash="3830822780" />
<Command Name="buylist" Hash="1273281402" />
<Command Name="vehbuyprice" Hash="2705069139" />
<Command Name="power" Hash="2877948320" />
<Command Name="radio" Hash="3762690831" />
<Command Name="r" Hash="1812594589" />
<Command Name="itemtypeusetype" Hash="1457290076" />
<Command Name="itemtypeorderprice" Hash="1622827053" />
<Command Name="itemtyperiskmult" Hash="298256682" />
<Command Name="itemtypeenabled" Hash="1424486221" />
<Command Name="jobaddplayerbl" Hash="3037502154" />
<Command Name="takejob" Hash="2690682686" />
<Command Name="startwork" Hash="307130076" />
<Command Name="setstars" Hash="3388953278" />
<Command Name="stopwork" Hash="765483006" />
<Command Name="health" Hash="3470402323" />
<Command Name="startjob" Hash="4288994387" />
<Command Name="stopjob" Hash="2761630709" />
<Command Name="uniform" Hash="4130109879" />
<Command Name="passenger" Hash="1005578461" />
<Command Name="department" Hash="3441287562" />
<Command Name="d" Hash="2564639436" />
<Command Name="delveh" Hash="152714755" />
<Command Name="fare" Hash="1456298103" />
<Command Name="detain" Hash="3221757631" />
<Command Name="search" Hash="3035683751" />
<Command Name="startroute" Hash="1616395680" />
<Command Name="jobbl" Hash="779699388" />
<Command Name="addjob" Hash="2919626095" />
<Command Name="deljobloc" Hash="1739246254" />
<Command Name="addjobroute" Hash="2656138748" />
<Command Name="jobtoggle" Hash="2928606311" />
<Command Name="jobroutename" Hash="2017870989" />
<Command Name="jobroutepay" Hash="1116013836" />
<Command Name="jobroutelocnextmsg" Hash="1672851411" />
<Command Name="jobroutevehcolours" Hash="1488821428" />
<Command Name="jobroutedelays" Hash="1645912336" />
<Command Name="jobpickup" Hash="3405408273" />
<Command Name="jobwl" Hash="432841384" />
<Command Name="jobblacklist" Hash="1922085790" />
<Command Name="freeze" Hash="1183970330" />
<Command Name="radiostations" Hash="3940254175" />
<Command Name="jobaddplayerwl" Hash="2193194206" />
<Command Name="jobdelplayerbl" Hash="2420244398" />
<Command Name="jobreloadall" Hash="2284567617" />
<Command Name="jobinfo" Hash="1110948668" />
<Command Name="vehpublic" Hash="3482619154" />
<Command Name="joblocinfo" Hash="3048238516" />
<Command Name="unbindkey" Hash="1293547552" />
<Command Name="keybinds" Hash="839428196" />
<Command Name="lang" Hash="822707298" />
<Command Name="language" Hash="3571151285" />
<Command Name="idea" Hash="176933445" />
<Command Name="bug" Hash="898416404" />
<Command Name="yes" Hash="1978086825" />
<Command Name="no" Hash="1739204639" />
<Command Name="stuck" Hash="1518825670" />
<Command Name="radiostation" Hash="28088017" />
<Command Name="radiovolume" Hash="1214320345" />
<Command Name="unmute" Hash="567433405" />
<Command Name="infiniterun" Hash="872561642" />
<Command Name="unfreeze" Hash="2907185820" />
<Command Name="goto" Hash="1382046848" />
<Command Name="gethere" Hash="390671735" />
<Command Name="vehinfo" Hash="157447745" />
<Command Name="gotopos" Hash="978357886" />
<Command Name="lastveh" Hash="1130556078" />
<Command Name="gotohouse" Hash="2545077731" />
<Command Name="gotojob" Hash="1095862314" />
<Command Name="gotoloc" Hash="853263374" />
<Command Name="fr" Hash="3430272718" />
<Command Name="ba" Hash="749160980" />
<Command Name="lt" Hash="3757671281" />
<Command Name="vehrentprice" Hash="1386181794" />
<Command Name="dn" Hash="3930255363" />
<Command Name="int" Hash="340908721" />
<Command Name="staffflags" Hash="3021358894" />
<Command Name="getstaffflags" Hash="3580006325" />
<Command Name="nonrpname" Hash="1622484520" />
<Command Name="setskin" Hash="934967852" />
<Command Name="setname" Hash="1809869876" />
<Command Name="setaccent" Hash="2041102865" />
<Command Name="plrinfo" Hash="1743625616" />
<Command Name="getplrhouse" Hash="2410855153" />
<Command Name="getplrbiz" Hash="2269973052" />
<Command Name="ip" Hash="2783163181" />
<Command Name="plrsync" Hash="2152683965" />
<Command Name="switchchar" Hash="925728418" />
<Command Name="usechar" Hash="1390554915" />
<Command Name="addtrig" Hash="2612767502" />
<Command Name="deltrig" Hash="850336973" />
<Command Name="deltrigcond" Hash="2326689261" />
<Command Name="deltrigresp" Hash="2318039200" />
<Command Name="triggers" Hash="248416589" />
<Command Name="trigcond" Hash="3919528790" />
<Command Name="trigtoggle" Hash="3621806868" />
<Command Name="tempveh" Hash="3698377893" />
<Command Name="oldcar" Hash="681236923" />
<Command Name="lastcar" Hash="3229726539" />
<Command Name="unlock" Hash="1793372399" />
<Command Name="vehrespawnpublic" Hash="3922930954" />
<Command Name="vehowner" Hash="997636202" />
<Command Name="vehclan" Hash="1562240026" />
<Command Name="vehbiz" Hash="2353348396" />
<Command Name="vehrank" Hash="1251127283" />
<Command Name="vehpark" Hash="116144677" />
<Command Name="vehrespawnall" Hash="4068906615" />
<Command Name="vehrespawnjob" Hash="843450194" />
<Command Name="vehrespawnplr" Hash="359490131" />
<Command Name="vehrespawnbiz" Hash="2036558138" />
<Command Name="vehrespawn" Hash="2026210653" />
<Command Name="carrespawnall" Hash="351347854" />
<Command Name="carrespawnempty" Hash="3796941249" />
<Command Name="carrespawnjob" Hash="3560027563" />
<Command Name="carrespawnplr" Hash="4078620842" />
<Command Name="carrespawnpublic" Hash="1263815958" />
<Command Name="carrespawn" Hash="164999966" />
<Command Name="carreloadall" Hash="1616522302" />
<Command Name="vehrent" Hash="3230862042" />
<Command Name="vehstoprent" Hash="3033622543" />
<Command Name="vehbuy" Hash="4080743371" />
<Command Name="vehcolour" Hash="249087681" />
<Command Name="vehlivery" Hash="2590964950" />
<Command Name="vehrepair" Hash="2059704110" />
</Commands>

View File

@@ -0,0 +1,545 @@
<?xml version="1.0" ?>
<Defines>
<Define Name="KEYSTATE_UP" Value="0" />
<Define Name="KEYSTATE_DOWN" Value="1" />
<Define Name="KEYSTATE_BOTH" Value="2" />
<Define Name="SDL_SCANCODE_UNKNOWN" Value="0" />
<Define Name="SDL_SCANCODE_A" Value="4" />
<Define Name="SDL_SCANCODE_B" Value="5" />
<Define Name="SDL_SCANCODE_C" Value="6" />
<Define Name="SDL_SCANCODE_D" Value="7" />
<Define Name="SDL_SCANCODE_E" Value="8" />
<Define Name="SDL_SCANCODE_F" Value="9" />
<Define Name="SDL_SCANCODE_G" Value="10" />
<Define Name="SDL_SCANCODE_H" Value="11" />
<Define Name="SDL_SCANCODE_I" Value="12" />
<Define Name="SDL_SCANCODE_J" Value="13" />
<Define Name="SDL_SCANCODE_K" Value="14" />
<Define Name="SDL_SCANCODE_L" Value="15" />
<Define Name="SDL_SCANCODE_M" Value="16" />
<Define Name="SDL_SCANCODE_N" Value="17" />
<Define Name="SDL_SCANCODE_O" Value="18" />
<Define Name="SDL_SCANCODE_P" Value="19" />
<Define Name="SDL_SCANCODE_Q" Value="20" />
<Define Name="SDL_SCANCODE_R" Value="21" />
<Define Name="SDL_SCANCODE_S" Value="22" />
<Define Name="SDL_SCANCODE_T" Value="23" />
<Define Name="SDL_SCANCODE_U" Value="24" />
<Define Name="SDL_SCANCODE_V" Value="25" />
<Define Name="SDL_SCANCODE_W" Value="26" />
<Define Name="SDL_SCANCODE_X" Value="27" />
<Define Name="SDL_SCANCODE_Y" Value="28" />
<Define Name="SDL_SCANCODE_Z" Value="29" />
<Define Name="SDL_SCANCODE_1" Value="30" />
<Define Name="SDL_SCANCODE_2" Value="31" />
<Define Name="SDL_SCANCODE_3" Value="32" />
<Define Name="SDL_SCANCODE_4" Value="33" />
<Define Name="SDL_SCANCODE_5" Value="34" />
<Define Name="SDL_SCANCODE_6" Value="35" />
<Define Name="SDL_SCANCODE_7" Value="36" />
<Define Name="SDL_SCANCODE_8" Value="37" />
<Define Name="SDL_SCANCODE_9" Value="38" />
<Define Name="SDL_SCANCODE_0" Value="39" />
<Define Name="SDL_SCANCODE_RETURN" Value="40" />
<Define Name="SDL_SCANCODE_ESCAPE" Value="41" />
<Define Name="SDL_SCANCODE_BACKSPACE" Value="42" />
<Define Name="SDL_SCANCODE_TAB" Value="43" />
<Define Name="SDL_SCANCODE_SPACE" Value="44" />
<Define Name="SDL_SCANCODE_MINUS" Value="45" />
<Define Name="SDL_SCANCODE_EQUALS" Value="46" />
<Define Name="SDL_SCANCODE_LEFTBRACKET" Value="47" />
<Define Name="SDL_SCANCODE_RIGHTBRACKET" Value="48" />
<Define Name="SDL_SCANCODE_BACKSLASH" Value="49" />
<Define Name="SDL_SCANCODE_NONUSHASH" Value="50" />
<Define Name="SDL_SCANCODE_SEMICOLON" Value="51" />
<Define Name="SDL_SCANCODE_APOSTROPHE" Value="52" />
<Define Name="SDL_SCANCODE_GRAVE" Value="53" />
<Define Name="SDL_SCANCODE_COMMA" Value="54" />
<Define Name="SDL_SCANCODE_PERIOD" Value="55" />
<Define Name="SDL_SCANCODE_SLASH" Value="56" />
<Define Name="SDL_SCANCODE_CAPSLOCK" Value="57" />
<Define Name="SDL_SCANCODE_F1" Value="58" />
<Define Name="SDL_SCANCODE_F2" Value="59" />
<Define Name="SDL_SCANCODE_F3" Value="60" />
<Define Name="SDL_SCANCODE_F4" Value="61" />
<Define Name="SDL_SCANCODE_F5" Value="62" />
<Define Name="SDL_SCANCODE_F6" Value="63" />
<Define Name="SDL_SCANCODE_F7" Value="64" />
<Define Name="SDL_SCANCODE_F8" Value="65" />
<Define Name="SDL_SCANCODE_F9" Value="66" />
<Define Name="SDL_SCANCODE_F10" Value="67" />
<Define Name="SDL_SCANCODE_F11" Value="68" />
<Define Name="SDL_SCANCODE_F12" Value="69" />
<Define Name="SDL_SCANCODE_PRINTSCREEN" Value="70" />
<Define Name="SDL_SCANCODE_SCROLLLOCK" Value="71" />
<Define Name="SDL_SCANCODE_PAUSE" Value="72" />
<Define Name="SDL_SCANCODE_INSERT" Value="73" />
<Define Name="SDL_SCANCODE_HOME" Value="74" />
<Define Name="SDL_SCANCODE_PAGEUP" Value="75" />
<Define Name="SDL_SCANCODE_DELETE" Value="76" />
<Define Name="SDL_SCANCODE_END" Value="77" />
<Define Name="SDL_SCANCODE_PAGEDOWN" Value="78" />
<Define Name="SDL_SCANCODE_RIGHT" Value="79" />
<Define Name="SDL_SCANCODE_LEFT" Value="80" />
<Define Name="SDL_SCANCODE_DOWN" Value="81" />
<Define Name="SDL_SCANCODE_UP" Value="82" />
<Define Name="SDL_SCANCODE_NUMLOCKCLEAR" Value="83" />
<Define Name="SDL_SCANCODE_KP_DIVIDE" Value="84" />
<Define Name="SDL_SCANCODE_KP_MULTIPLY" Value="85" />
<Define Name="SDL_SCANCODE_KP_MINUS" Value="86" />
<Define Name="SDL_SCANCODE_KP_PLUS" Value="87" />
<Define Name="SDL_SCANCODE_KP_ENTER" Value="88" />
<Define Name="SDL_SCANCODE_KP_1" Value="89" />
<Define Name="SDL_SCANCODE_KP_2" Value="90" />
<Define Name="SDL_SCANCODE_KP_3" Value="91" />
<Define Name="SDL_SCANCODE_KP_4" Value="92" />
<Define Name="SDL_SCANCODE_KP_5" Value="93" />
<Define Name="SDL_SCANCODE_KP_6" Value="94" />
<Define Name="SDL_SCANCODE_KP_7" Value="95" />
<Define Name="SDL_SCANCODE_KP_8" Value="96" />
<Define Name="SDL_SCANCODE_KP_9" Value="97" />
<Define Name="SDL_SCANCODE_KP_0" Value="98" />
<Define Name="SDL_SCANCODE_KP_PERIOD" Value="99" />
<Define Name="SDL_SCANCODE_NONUSBACKSLASH" Value="100" />
<Define Name="SDL_SCANCODE_APPLICATION" Value="101" />
<Define Name="SDL_SCANCODE_POWER" Value="102" />
<Define Name="SDL_SCANCODE_KP_EQUALS" Value="103" />
<Define Name="SDL_SCANCODE_F13" Value="104" />
<Define Name="SDL_SCANCODE_F14" Value="105" />
<Define Name="SDL_SCANCODE_F15" Value="106" />
<Define Name="SDL_SCANCODE_F16" Value="107" />
<Define Name="SDL_SCANCODE_F17" Value="108" />
<Define Name="SDL_SCANCODE_F18" Value="109" />
<Define Name="SDL_SCANCODE_F19" Value="110" />
<Define Name="SDL_SCANCODE_F20" Value="111" />
<Define Name="SDL_SCANCODE_F21" Value="112" />
<Define Name="SDL_SCANCODE_F22" Value="113" />
<Define Name="SDL_SCANCODE_F23" Value="114" />
<Define Name="SDL_SCANCODE_F24" Value="115" />
<Define Name="SDL_SCANCODE_EXECUTE" Value="116" />
<Define Name="SDL_SCANCODE_HELP" Value="117" />
<Define Name="SDL_SCANCODE_MENU" Value="118" />
<Define Name="SDL_SCANCODE_SELECT" Value="119" />
<Define Name="SDL_SCANCODE_STOP" Value="120" />
<Define Name="SDL_SCANCODE_AGAIN" Value="121" />
<Define Name="SDL_SCANCODE_UNDO" Value="122" />
<Define Name="SDL_SCANCODE_CUT" Value="123" />
<Define Name="SDL_SCANCODE_COPY" Value="124" />
<Define Name="SDL_SCANCODE_PASTE" Value="125" />
<Define Name="SDL_SCANCODE_FIND" Value="126" />
<Define Name="SDL_SCANCODE_MUTE" Value="127" />
<Define Name="SDL_SCANCODE_VOLUMEUP" Value="128" />
<Define Name="SDL_SCANCODE_VOLUMEDOWN" Value="129" />
<Define Name="SDL_SCANCODE_KP_COMMA" Value="133" />
<Define Name="SDL_SCANCODE_KP_EQUALSAS400" Value="134" />
<Define Name="SDL_SCANCODE_INTERNATIONAL1" Value="135" />
<Define Name="SDL_SCANCODE_INTERNATIONAL2" Value="136" />
<Define Name="SDL_SCANCODE_INTERNATIONAL3" Value="137" />
<Define Name="SDL_SCANCODE_INTERNATIONAL4" Value="138" />
<Define Name="SDL_SCANCODE_INTERNATIONAL5" Value="139" />
<Define Name="SDL_SCANCODE_INTERNATIONAL6" Value="140" />
<Define Name="SDL_SCANCODE_INTERNATIONAL7" Value="141" />
<Define Name="SDL_SCANCODE_INTERNATIONAL8" Value="142" />
<Define Name="SDL_SCANCODE_INTERNATIONAL9" Value="143" />
<Define Name="SDL_SCANCODE_LANG1" Value="144" />
<Define Name="SDL_SCANCODE_LANG2" Value="145" />
<Define Name="SDL_SCANCODE_LANG3" Value="146" />
<Define Name="SDL_SCANCODE_LANG4" Value="147" />
<Define Name="SDL_SCANCODE_LANG5" Value="148" />
<Define Name="SDL_SCANCODE_LANG6" Value="149" />
<Define Name="SDL_SCANCODE_LANG7" Value="150" />
<Define Name="SDL_SCANCODE_LANG8" Value="151" />
<Define Name="SDL_SCANCODE_LANG9" Value="152" />
<Define Name="SDL_SCANCODE_ALTERASE" Value="153" />
<Define Name="SDL_SCANCODE_SYSREQ" Value="154" />
<Define Name="SDL_SCANCODE_CANCEL" Value="155" />
<Define Name="SDL_SCANCODE_CLEAR" Value="156" />
<Define Name="SDL_SCANCODE_PRIOR" Value="157" />
<Define Name="SDL_SCANCODE_RETURN2" Value="158" />
<Define Name="SDL_SCANCODE_SEPARATOR" Value="159" />
<Define Name="SDL_SCANCODE_OUT" Value="160" />
<Define Name="SDL_SCANCODE_OPER" Value="161" />
<Define Name="SDL_SCANCODE_CLEARAGAIN" Value="162" />
<Define Name="SDL_SCANCODE_CRSEL" Value="163" />
<Define Name="SDL_SCANCODE_EXSEL" Value="164" />
<Define Name="SDL_SCANCODE_KP_00" Value="176" />
<Define Name="SDL_SCANCODE_KP_000" Value="177" />
<Define Name="SDL_SCANCODE_THOUSANDSSEPARATOR" Value="178" />
<Define Name="SDL_SCANCODE_DECIMALSEPARATOR" Value="179" />
<Define Name="SDL_SCANCODE_CURRENCYUNIT" Value="180" />
<Define Name="SDL_SCANCODE_CURRENCYSUBUNIT" Value="181" />
<Define Name="SDL_SCANCODE_KP_LEFTPAREN" Value="182" />
<Define Name="SDL_SCANCODE_KP_RIGHTPAREN" Value="183" />
<Define Name="SDL_SCANCODE_KP_LEFTBRACE" Value="184" />
<Define Name="SDL_SCANCODE_KP_RIGHTBRACE" Value="185" />
<Define Name="SDL_SCANCODE_KP_TAB" Value="186" />
<Define Name="SDL_SCANCODE_KP_BACKSPACE" Value="187" />
<Define Name="SDL_SCANCODE_KP_A" Value="188" />
<Define Name="SDL_SCANCODE_KP_B" Value="189" />
<Define Name="SDL_SCANCODE_KP_C" Value="190" />
<Define Name="SDL_SCANCODE_KP_D" Value="191" />
<Define Name="SDL_SCANCODE_KP_E" Value="192" />
<Define Name="SDL_SCANCODE_KP_F" Value="193" />
<Define Name="SDL_SCANCODE_KP_XOR" Value="194" />
<Define Name="SDL_SCANCODE_KP_POWER" Value="195" />
<Define Name="SDL_SCANCODE_KP_PERCENT" Value="196" />
<Define Name="SDL_SCANCODE_KP_LESS" Value="197" />
<Define Name="SDL_SCANCODE_KP_GREATER" Value="198" />
<Define Name="SDL_SCANCODE_KP_AMPERSAND" Value="199" />
<Define Name="SDL_SCANCODE_KP_DBLAMPERSAND" Value="200" />
<Define Name="SDL_SCANCODE_KP_VERTICALBAR" Value="201" />
<Define Name="SDL_SCANCODE_KP_DBLVERTICALBAR" Value="202" />
<Define Name="SDL_SCANCODE_KP_COLON" Value="203" />
<Define Name="SDL_SCANCODE_KP_HASH" Value="204" />
<Define Name="SDL_SCANCODE_KP_SPACE" Value="205" />
<Define Name="SDL_SCANCODE_KP_AT" Value="206" />
<Define Name="SDL_SCANCODE_KP_EXCLAM" Value="207" />
<Define Name="SDL_SCANCODE_KP_MEMSTORE" Value="208" />
<Define Name="SDL_SCANCODE_KP_MEMRECALL" Value="209" />
<Define Name="SDL_SCANCODE_KP_MEMCLEAR" Value="210" />
<Define Name="SDL_SCANCODE_KP_MEMADD" Value="211" />
<Define Name="SDL_SCANCODE_KP_MEMSUBTRACT" Value="212" />
<Define Name="SDL_SCANCODE_KP_MEMMULTIPLY" Value="213" />
<Define Name="SDL_SCANCODE_KP_MEMDIVIDE" Value="214" />
<Define Name="SDL_SCANCODE_KP_PLUSMINUS" Value="215" />
<Define Name="SDL_SCANCODE_KP_CLEAR" Value="216" />
<Define Name="SDL_SCANCODE_KP_CLEARENTRY" Value="217" />
<Define Name="SDL_SCANCODE_KP_BINARY" Value="218" />
<Define Name="SDL_SCANCODE_KP_OCTAL" Value="219" />
<Define Name="SDL_SCANCODE_KP_DECIMAL" Value="220" />
<Define Name="SDL_SCANCODE_KP_HEXADECIMAL" Value="221" />
<Define Name="SDL_SCANCODE_LCTRL" Value="224" />
<Define Name="SDL_SCANCODE_LSHIFT" Value="225" />
<Define Name="SDL_SCANCODE_LALT" Value="226" />
<Define Name="SDL_SCANCODE_LGUI" Value="227" />
<Define Name="SDL_SCANCODE_RCTRL" Value="228" />
<Define Name="SDL_SCANCODE_RSHIFT" Value="229" />
<Define Name="SDL_SCANCODE_RALT" Value="230" />
<Define Name="SDL_SCANCODE_RGUI" Value="231" />
<Define Name="SDL_SCANCODE_MODE" Value="257" />
<Define Name="SDL_SCANCODE_AUDIONEXT" Value="258" />
<Define Name="SDL_SCANCODE_AUDIOPREV" Value="259" />
<Define Name="SDL_SCANCODE_AUDIOSTOP" Value="260" />
<Define Name="SDL_SCANCODE_AUDIOPLAY" Value="261" />
<Define Name="SDL_SCANCODE_AUDIOMUTE" Value="262" />
<Define Name="SDL_SCANCODE_MEDIASELECT" Value="263" />
<Define Name="SDL_SCANCODE_WWW" Value="264" />
<Define Name="SDL_SCANCODE_MAIL" Value="265" />
<Define Name="SDL_SCANCODE_CALCULATOR" Value="266" />
<Define Name="SDL_SCANCODE_COMPUTER" Value="267" />
<Define Name="SDL_SCANCODE_AC_SEARCH" Value="268" />
<Define Name="SDL_SCANCODE_AC_HOME" Value="269" />
<Define Name="SDL_SCANCODE_AC_BACK" Value="270" />
<Define Name="SDL_SCANCODE_AC_FORWARD" Value="271" />
<Define Name="SDL_SCANCODE_AC_STOP" Value="272" />
<Define Name="SDL_SCANCODE_AC_REFRESH" Value="273" />
<Define Name="SDL_SCANCODE_AC_BOOKMARKS" Value="274" />
<Define Name="SDL_SCANCODE_BRIGHTNESSDOWN" Value="275" />
<Define Name="SDL_SCANCODE_BRIGHTNESSUP" Value="276" />
<Define Name="SDL_SCANCODE_DISPLAYSWITCH" Value="277" />
<Define Name="SDL_SCANCODE_KBDILLUMTOGGLE" Value="278" />
<Define Name="SDL_SCANCODE_KBDILLUMDOWN" Value="279" />
<Define Name="SDL_SCANCODE_KBDILLUMUP" Value="280" />
<Define Name="SDL_SCANCODE_EJECT" Value="281" />
<Define Name="SDL_SCANCODE_SLEEP" Value="282" />
<Define Name="SDL_SCANCODE_APP1" Value="283" />
<Define Name="SDL_SCANCODE_APP2" Value="284" />
<Define Name="SDL_SCANCODE_AUDIOREWIND" Value="285" />
<Define Name="SDL_SCANCODE_AUDIOFASTFORWARD" Value="286" />
<Define Name="SDL_NUM_SCANCODES" Value="512" />
<Define Name="SDLK_UNKNOWN" Value="0" />
<Define Name="SDLK_RETURN" Value="13" />
<Define Name="SDLK_ESCAPE" Value="27" />
<Define Name="SDLK_BACKSPACE" Value="8" />
<Define Name="SDLK_TAB" Value="9" />
<Define Name="SDLK_SPACE" Value="32" />
<Define Name="SDLK_EXCLAIM" Value="33" />
<Define Name="SDLK_QUOTEDBL" Value="34" />
<Define Name="SDLK_HASH" Value="35" />
<Define Name="SDLK_PERCENT" Value="37" />
<Define Name="SDLK_DOLLAR" Value="36" />
<Define Name="SDLK_AMPERSAND" Value="38" />
<Define Name="SDLK_QUOTE" Value="39" />
<Define Name="SDLK_LEFTPAREN" Value="40" />
<Define Name="SDLK_RIGHTPAREN" Value="41" />
<Define Name="SDLK_ASTERISK" Value="42" />
<Define Name="SDLK_PLUS" Value="43" />
<Define Name="SDLK_COMMA" Value="44" />
<Define Name="SDLK_MINUS" Value="45" />
<Define Name="SDLK_PERIOD" Value="46" />
<Define Name="SDLK_SLASH" Value="47" />
<Define Name="SDLK_0" Value="48" />
<Define Name="SDLK_1" Value="49" />
<Define Name="SDLK_2" Value="50" />
<Define Name="SDLK_3" Value="51" />
<Define Name="SDLK_4" Value="52" />
<Define Name="SDLK_5" Value="53" />
<Define Name="SDLK_6" Value="54" />
<Define Name="SDLK_7" Value="55" />
<Define Name="SDLK_8" Value="56" />
<Define Name="SDLK_9" Value="57" />
<Define Name="SDLK_COLON" Value="58" />
<Define Name="SDLK_SEMICOLON" Value="59" />
<Define Name="SDLK_LESS" Value="60" />
<Define Name="SDLK_EQUALS" Value="61" />
<Define Name="SDLK_GREATER" Value="62" />
<Define Name="SDLK_QUESTION" Value="63" />
<Define Name="SDLK_AT" Value="64" />
<Define Name="SDLK_LEFTBRACKET" Value="91" />
<Define Name="SDLK_BACKSLASH" Value="92" />
<Define Name="SDLK_RIGHTBRACKET" Value="93" />
<Define Name="SDLK_CARET" Value="94" />
<Define Name="SDLK_UNDERSCORE" Value="95" />
<Define Name="SDLK_BACKQUOTE" Value="96" />
<Define Name="SDLK_a" Value="97" />
<Define Name="SDLK_b" Value="98" />
<Define Name="SDLK_c" Value="99" />
<Define Name="SDLK_d" Value="100" />
<Define Name="SDLK_e" Value="101" />
<Define Name="SDLK_f" Value="102" />
<Define Name="SDLK_g" Value="103" />
<Define Name="SDLK_h" Value="104" />
<Define Name="SDLK_i" Value="105" />
<Define Name="SDLK_j" Value="106" />
<Define Name="SDLK_k" Value="107" />
<Define Name="SDLK_l" Value="108" />
<Define Name="SDLK_m" Value="109" />
<Define Name="SDLK_n" Value="110" />
<Define Name="SDLK_o" Value="111" />
<Define Name="SDLK_p" Value="112" />
<Define Name="SDLK_q" Value="113" />
<Define Name="SDLK_r" Value="114" />
<Define Name="SDLK_s" Value="115" />
<Define Name="SDLK_t" Value="116" />
<Define Name="SDLK_u" Value="117" />
<Define Name="SDLK_v" Value="118" />
<Define Name="SDLK_w" Value="119" />
<Define Name="SDLK_x" Value="120" />
<Define Name="SDLK_y" Value="121" />
<Define Name="SDLK_z" Value="122" />
<Define Name="SDLK_CAPSLOCK" Value="1073741881" />
<Define Name="SDLK_F1" Value="1073741882" />
<Define Name="SDLK_F2" Value="1073741883" />
<Define Name="SDLK_F3" Value="1073741884" />
<Define Name="SDLK_F4" Value="1073741885" />
<Define Name="SDLK_F5" Value="1073741886" />
<Define Name="SDLK_F6" Value="1073741887" />
<Define Name="SDLK_F7" Value="1073741888" />
<Define Name="SDLK_F8" Value="1073741889" />
<Define Name="SDLK_F9" Value="1073741890" />
<Define Name="SDLK_F10" Value="1073741891" />
<Define Name="SDLK_F11" Value="1073741892" />
<Define Name="SDLK_F12" Value="1073741893" />
<Define Name="SDLK_PRINTSCREEN" Value="1073741894" />
<Define Name="SDLK_SCROLLLOCK" Value="1073741895" />
<Define Name="SDLK_PAUSE" Value="1073741896" />
<Define Name="SDLK_INSERT" Value="1073741897" />
<Define Name="SDLK_HOME" Value="1073741898" />
<Define Name="SDLK_PAGEUP" Value="1073741899" />
<Define Name="SDLK_DELETE" Value="127" />
<Define Name="SDLK_END" Value="1073741901" />
<Define Name="SDLK_PAGEDOWN" Value="1073741902" />
<Define Name="SDLK_RIGHT" Value="1073741903" />
<Define Name="SDLK_LEFT" Value="1073741904" />
<Define Name="SDLK_DOWN" Value="1073741905" />
<Define Name="SDLK_UP" Value="1073741906" />
<Define Name="SDLK_NUMLOCKCLEAR" Value="1073741907" />
<Define Name="SDLK_KP_DIVIDE" Value="1073741908" />
<Define Name="SDLK_KP_MULTIPLY" Value="1073741909" />
<Define Name="SDLK_KP_MINUS" Value="1073741910" />
<Define Name="SDLK_KP_PLUS" Value="1073741911" />
<Define Name="SDLK_KP_ENTER" Value="1073741912" />
<Define Name="SDLK_KP_1" Value="1073741913" />
<Define Name="SDLK_KP_2" Value="1073741914" />
<Define Name="SDLK_KP_3" Value="1073741915" />
<Define Name="SDLK_KP_4" Value="1073741916" />
<Define Name="SDLK_KP_5" Value="1073741917" />
<Define Name="SDLK_KP_6" Value="1073741918" />
<Define Name="SDLK_KP_7" Value="1073741919" />
<Define Name="SDLK_KP_8" Value="1073741920" />
<Define Name="SDLK_KP_9" Value="1073741921" />
<Define Name="SDLK_KP_0" Value="1073741922" />
<Define Name="SDLK_KP_PERIOD" Value="1073741923" />
<Define Name="SDLK_APPLICATION" Value="1073741925" />
<Define Name="SDLK_POWER" Value="1073741926" />
<Define Name="SDLK_KP_EQUALS" Value="1073741927" />
<Define Name="SDLK_F13" Value="1073741928" />
<Define Name="SDLK_F14" Value="1073741929" />
<Define Name="SDLK_F15" Value="1073741930" />
<Define Name="SDLK_F16" Value="1073741931" />
<Define Name="SDLK_F17" Value="1073741932" />
<Define Name="SDLK_F18" Value="1073741933" />
<Define Name="SDLK_F19" Value="1073741934" />
<Define Name="SDLK_F20" Value="1073741935" />
<Define Name="SDLK_F21" Value="1073741936" />
<Define Name="SDLK_F22" Value="1073741937" />
<Define Name="SDLK_F23" Value="1073741938" />
<Define Name="SDLK_F24" Value="1073741939" />
<Define Name="SDLK_EXECUTE" Value="1073741940" />
<Define Name="SDLK_HELP" Value="1073741941" />
<Define Name="SDLK_MENU" Value="1073741942" />
<Define Name="SDLK_SELECT" Value="1073741943" />
<Define Name="SDLK_STOP" Value="1073741944" />
<Define Name="SDLK_AGAIN" Value="1073741945" />
<Define Name="SDLK_UNDO" Value="1073741946" />
<Define Name="SDLK_CUT" Value="1073741947" />
<Define Name="SDLK_COPY" Value="1073741948" />
<Define Name="SDLK_PASTE" Value="1073741949" />
<Define Name="SDLK_FIND" Value="1073741950" />
<Define Name="SDLK_MUTE" Value="1073741951" />
<Define Name="SDLK_VOLUMEUP" Value="1073741952" />
<Define Name="SDLK_VOLUMEDOWN" Value="1073741953" />
<Define Name="SDLK_KP_COMMA" Value="1073741957" />
<Define Name="SDLK_KP_EQUALSAS400" Value="1073741958" />
<Define Name="SDLK_ALTERASE" Value="1073741977" />
<Define Name="SDLK_SYSREQ" Value="1073741978" />
<Define Name="SDLK_CANCEL" Value="1073741979" />
<Define Name="SDLK_CLEAR" Value="1073741980" />
<Define Name="SDLK_PRIOR" Value="1073741981" />
<Define Name="SDLK_RETURN2" Value="1073741982" />
<Define Name="SDLK_SEPARATOR" Value="1073741983" />
<Define Name="SDLK_OUT" Value="1073741984" />
<Define Name="SDLK_OPER" Value="1073741985" />
<Define Name="SDLK_CLEARAGAIN" Value="1073741986" />
<Define Name="SDLK_CRSEL" Value="1073741987" />
<Define Name="SDLK_EXSEL" Value="1073741988" />
<Define Name="SDLK_KP_00" Value="1073742000" />
<Define Name="SDLK_KP_000" Value="1073742001" />
<Define Name="SDLK_THOUSANDSSEPARATOR" Value="1073742002" />
<Define Name="SDLK_DECIMALSEPARATOR" Value="1073742003" />
<Define Name="SDLK_CURRENCYUNIT" Value="1073742004" />
<Define Name="SDLK_CURRENCYSUBUNIT" Value="1073742005" />
<Define Name="SDLK_KP_LEFTPAREN" Value="1073742006" />
<Define Name="SDLK_KP_RIGHTPAREN" Value="1073742007" />
<Define Name="SDLK_KP_LEFTBRACE" Value="1073742008" />
<Define Name="SDLK_KP_RIGHTBRACE" Value="1073742009" />
<Define Name="SDLK_KP_TAB" Value="1073742010" />
<Define Name="SDLK_KP_BACKSPACE" Value="1073742011" />
<Define Name="SDLK_KP_A" Value="1073742012" />
<Define Name="SDLK_KP_B" Value="1073742013" />
<Define Name="SDLK_KP_C" Value="1073742014" />
<Define Name="SDLK_KP_D" Value="1073742015" />
<Define Name="SDLK_KP_E" Value="1073742016" />
<Define Name="SDLK_KP_F" Value="1073742017" />
<Define Name="SDLK_KP_XOR" Value="1073742018" />
<Define Name="SDLK_KP_POWER" Value="1073742019" />
<Define Name="SDLK_KP_PERCENT" Value="1073742020" />
<Define Name="SDLK_KP_LESS" Value="1073742021" />
<Define Name="SDLK_KP_GREATER" Value="1073742022" />
<Define Name="SDLK_KP_AMPERSAND" Value="1073742023" />
<Define Name="SDLK_KP_DBLAMPERSAND" Value="1073742024" />
<Define Name="SDLK_KP_VERTICALBAR" Value="1073742025" />
<Define Name="SDLK_KP_DBLVERTICALBAR" Value="1073742026" />
<Define Name="SDLK_KP_COLON" Value="1073742027" />
<Define Name="SDLK_KP_HASH" Value="1073742028" />
<Define Name="SDLK_KP_SPACE" Value="1073742029" />
<Define Name="SDLK_KP_AT" Value="1073742030" />
<Define Name="SDLK_KP_EXCLAM" Value="1073742031" />
<Define Name="SDLK_KP_MEMSTORE" Value="1073742032" />
<Define Name="SDLK_KP_MEMRECALL" Value="1073742033" />
<Define Name="SDLK_KP_MEMCLEAR" Value="1073742034" />
<Define Name="SDLK_KP_MEMADD" Value="1073742035" />
<Define Name="SDLK_KP_MEMSUBTRACT" Value="1073742036" />
<Define Name="SDLK_KP_MEMMULTIPLY" Value="1073742037" />
<Define Name="SDLK_KP_MEMDIVIDE" Value="1073742038" />
<Define Name="SDLK_KP_PLUSMINUS" Value="1073742039" />
<Define Name="SDLK_KP_CLEAR" Value="1073742040" />
<Define Name="SDLK_KP_CLEARENTRY" Value="1073742041" />
<Define Name="SDLK_KP_BINARY" Value="1073742042" />
<Define Name="SDLK_KP_OCTAL" Value="1073742043" />
<Define Name="SDLK_KP_DECIMAL" Value="1073742044" />
<Define Name="SDLK_KP_HEXADECIMAL" Value="1073742045" />
<Define Name="SDLK_LCTRL" Value="1073742048" />
<Define Name="SDLK_LSHIFT" Value="1073742049" />
<Define Name="SDLK_LALT" Value="1073742050" />
<Define Name="SDLK_LGUI" Value="1073742051" />
<Define Name="SDLK_RCTRL" Value="1073742052" />
<Define Name="SDLK_RSHIFT" Value="1073742053" />
<Define Name="SDLK_RALT" Value="1073742054" />
<Define Name="SDLK_RGUI" Value="1073742055" />
<Define Name="SDLK_MODE" Value="1073742081" />
<Define Name="SDLK_AUDIONEXT" Value="1073742082" />
<Define Name="SDLK_AUDIOPREV" Value="1073742083" />
<Define Name="SDLK_AUDIOSTOP" Value="1073742084" />
<Define Name="SDLK_AUDIOPLAY" Value="1073742085" />
<Define Name="SDLK_AUDIOMUTE" Value="1073742086" />
<Define Name="SDLK_MEDIASELECT" Value="1073742087" />
<Define Name="SDLK_WWW" Value="1073742088" />
<Define Name="SDLK_MAIL" Value="1073742089" />
<Define Name="SDLK_CALCULATOR" Value="1073742090" />
<Define Name="SDLK_COMPUTER" Value="1073742091" />
<Define Name="SDLK_AC_SEARCH" Value="1073742092" />
<Define Name="SDLK_AC_HOME" Value="1073742093" />
<Define Name="SDLK_AC_BACK" Value="1073742094" />
<Define Name="SDLK_AC_FORWARD" Value="1073742095" />
<Define Name="SDLK_AC_STOP" Value="1073742096" />
<Define Name="SDLK_AC_REFRESH" Value="1073742097" />
<Define Name="SDLK_AC_BOOKMARKS" Value="1073742098" />
<Define Name="SDLK_BRIGHTNESSDOWN" Value="1073742099" />
<Define Name="SDLK_BRIGHTNESSUP" Value="1073742100" />
<Define Name="SDLK_DISPLAYSWITCH" Value="1073742101" />
<Define Name="SDLK_KBDILLUMTOGGLE" Value="1073742102" />
<Define Name="SDLK_KBDILLUMDOWN" Value="1073742103" />
<Define Name="SDLK_KBDILLUMUP" Value="1073742104" />
<Define Name="SDLK_EJECT" Value="1073742105" />
<Define Name="SDLK_SLEEP" Value="1073742106" />
<Define Name="KMOD_NONE" Value="0" />
<Define Name="KMOD_LSHIFT" Value="1" />
<Define Name="KMOD_RSHIFT" Value="2" />
<Define Name="KMOD_LCTRL" Value="64" />
<Define Name="KMOD_RCTRL" Value="128" />
<Define Name="KMOD_LALT" Value="256" />
<Define Name="KMOD_RALT" Value="512" />
<Define Name="KMOD_LGUI" Value="1024" />
<Define Name="KMOD_RGUI" Value="2048" />
<Define Name="KMOD_NUM" Value="4096" />
<Define Name="KMOD_CAPS" Value="8192" />
<Define Name="KMOD_MODE" Value="16384" />
<Define Name="KMOD_RESERVED" Value="32768" />
<Define Name="KMOD_CTRL" Value="192" />
<Define Name="KMOD_SHIFT" Value="3" />
<Define Name="KMOD_ALT" Value="768" />
<Define Name="KMOD_GUI" Value="3072" />
<Define Name="SEEK_SET" Value="0" />
<Define Name="SEEK_CUR" Value="1" />
<Define Name="SEEK_END" Value="2" />
<Define Name="LOGTYPE_NONE" Value="0" />
<Define Name="LOGTYPE_VERBOSE" Value="1" />
<Define Name="LOGTYPE_DEBUG" Value="2" />
<Define Name="LOGTYPE_INFO" Value="3" />
<Define Name="LOGTYPE_WARN" Value="4" />
<Define Name="LOGTYPE_ERROR" Value="5" />
<Define Name="LOGTYPE_CRITICAL" Value="6" />
<Define Name="COLOUR_TRANSPARENT" Value="0" />
<Define Name="COLOUR_WHITE" Value="4294967295" />
<Define Name="COLOUR_BLACK" Value="4278190080" />
<Define Name="COLOUR_RED" Value="4294901760" />
<Define Name="COLOUR_LIME" Value="4278255360" />
<Define Name="COLOUR_BLUE" Value="4278190335" />
<Define Name="COLOUR_YELLOW" Value="4294967040" />
<Define Name="COLOUR_AQUA" Value="4278255615" />
<Define Name="COLOUR_FUCHSIA" Value="4294902015" />
<Define Name="COLOUR_SKYBLUE" Value="4284927231" />
<Define Name="COLOUR_SILVER" Value="4291019715" />
<Define Name="COLOUR_GREEN" Value="4278222592" />
<Define Name="COLOUR_ORANGE" Value="4294934272" />
<Define Name="INVALID_NETWORK_ID" Value="-1" />
<Define Name="INVALID_CLIENT_ID" Value="-1" />
<Define Name="CHAT_TYPE_NONE" Value="0" />
<Define Name="CHAT_TYPE_CHAT" Value="1" />
<Define Name="CHAT_TYPE_INFO" Value="2" />
<Define Name="CHAT_TYPE_DEBUG" Value="3" />
<Define Name="SERVER_VERSION_MAJOR" Value="0" />
<Define Name="SERVER_VERSION_MINOR" Value="0" />
<Define Name="SERVER_VERSION_PATCH" Value="1" />
<Define Name="GAME_UNKNOWN" Value="0" />
<Define Name="GAME_MAFIA_ONE" Value="10" />
<Define Name="GAME_MAFIA_TWO" Value="11" />
<Define Name="GAME_MAFIA_THREE" Value="12" />
<Define Name="GAME_MAFIA_ONE_DE" Value="13" />
<Define Name="ELEMENT_ELEMENT" Value="0" />
<Define Name="ELEMENT_ENTITY" Value="6" />
<Define Name="ELEMENT_PED" Value="14" />
<Define Name="ELEMENT_PLAYER" Value="30" />
<Define Name="ELEMENT_VEHICLE" Value="38" />
</Defines>

View File

@@ -0,0 +1,424 @@
<?xml version="1.0" ?>
<Documentation>
<!--
Mask Values
b - bool
i - int32
f - float
s - string
c - function/callback
x - class/instance
z - vector2D
v - vector3D
t - thiscall
| - optional arguments
* - infinite arguments
. - any type
-->
<Namespace Name="global">
<Property Name="platform" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="thisResource" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="localClient" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="localPlayer" ReadOnly="true" Obsolete="false" Type="Object" />
<Function Name="toColour" Mask="iii|i" RequiredArguments="3" Obsolete="false" />
<Function Name="collectAllGarbage" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="inPoly" Mask="z*" RequiredArguments="1" Obsolete="false" />
<Function Name="addEvent" Mask="s|i" RequiredArguments="1" Obsolete="false" />
<Function Name="addEventHandler" Mask="sf" RequiredArguments="2" Obsolete="false" />
<Function Name="removeEventHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="bindEventHandler" Mask="sxf" RequiredArguments="3" Obsolete="false" />
<Function Name="unbindEventHandler" Mask="sx" RequiredArguments="2" Obsolete="false" />
<Function Name="triggerEvent" Mask="s|x*" RequiredArguments="1" Obsolete="false" />
<Function Name="addCommandHandler" Mask="sc|b" RequiredArguments="2" Obsolete="false" />
<Function Name="removeCommandHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="hasCommandHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="consoleCommand" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="setTimeout" Mask="ci*" RequiredArguments="2" Obsolete="false" />
<Function Name="setInterval" Mask="ci*" RequiredArguments="2" Obsolete="false" />
<Function Name="setImmediate" Mask="c*" RequiredArguments="1" Obsolete="false" />
<Function Name="clearTimeout" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="clearInterval" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="clearImmediate" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="bindKey" Mask="iic" RequiredArguments="3" Obsolete="false" />
<Function Name="unbindKey" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="unbindAllKeys" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="findResourceByName" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="getResources" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="exportFunction" Mask="c" RequiredArguments="1" Obsolete="false" />
<Function Name="openFile" Mask="s|b" RequiredArguments="1" Obsolete="false" />
<Function Name="createFile" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="loadTextFile" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="saveTextFile" Mask="ss" RequiredArguments="2" Obsolete="false" />
<Function Name="addNetworkHandler" Mask="sc" RequiredArguments="2" Obsolete="false" />
<Function Name="removeNetworkHandler" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="httpGet" Mask="sscc" RequiredArguments="4" Obsolete="false" />
<Function Name="message" Mask="s|i" RequiredArguments="1" Obsolete="false" />
<Function Name="messageClient" Mask="sx|i" RequiredArguments="2" Obsolete="false" />
<Function Name="messageAllExcept" Mask="sx|i" RequiredArguments="2" Obsolete="false" />
<Function Name="getConsole" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getClients" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getClient" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="destroyElement" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="getClientFromPlayerElement" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementsByType" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementFromId" Mask="i" RequiredArguments="1" Obsolete="false" />
<Function Name="getElementFromName" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="addToWorld" Mask="x" RequiredArguments="1" Obsolete="true" />
<Function Name="registerNetObject" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="triggerNetworkEvent" Mask="sx*" RequiredArguments="2" Obsolete="false" />
<Function Name="spawnPlayer" Mask="xsv|f" RequiredArguments="3" Obsolete="false" />
<Class Name="Stream">
<Property Name="length" ReadOnly="true" Obsolete="false" Type="int64" />
<Property Name="position" ReadOnly="true" Obsolete="false" Type="int64" />
<Function Name="close" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readBytes" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="readString" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readLine" Mask="t" RequiredArguments="0" Obsolete="true" />
<Function Name="writeBytes" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="writeString" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="readInt8" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt8" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readInt16" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt16" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readInt32" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt32" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readInt64" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readUInt64" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readFloat" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readDouble" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="writeInt8" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt8" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeInt16" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt16" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeInt32" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt32" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeInt64" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeUInt64" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="writeFloat" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="writeDouble" Mask="tf" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="TextReader">
<Function Name="close" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="loadText" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readLine" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="readCharacter" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Matrix4x4">
<Property Name="m11" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m12" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m13" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m14" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m21" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m22" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m23" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m24" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m31" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m32" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m33" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m34" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m41" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m42" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m43" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="m44" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="setIdentity" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setTranslate" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="setScale" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotateX" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotateY" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotateZ" Mask="tf" RequiredArguments="1" Obsolete="false" />
<Function Name="setRotate" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="setMultiply" Mask="txx*" RequiredArguments="2" Obsolete="false" />
<Function Name="multiply" Mask="tx*" RequiredArguments="1" Obsolete="false" />
<Function Name="setInverse" Mask="tx" RequiredArguments="1" Obsolete="false" />
<Function Name="transformCoordinate" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="getElement" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="setElement" Mask="tif" RequiredArguments="2" Obsolete="false" />
<Function Name="getVector3" Mask="ti" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="Vec2">
<Property Name="x" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="y" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="addPolar" Mask="tff" RequiredArguments="2" Obsolete="false" />
<Function Name="interpolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="extrapolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalInterpolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalExtrapolate" Mask="tzf" RequiredArguments="2" Obsolete="false" />
<Function Name="cartesianToPolar" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Vec3">
<Property Name="x" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="y" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="z" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="length" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="squaredLength" ReadOnly="true" Obsolete="false" Type="number" />
<Function Name="distance" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="squaredDistance" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="dotProduct" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="absDotProduct" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="normalise" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="crossProduct" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="midPoint" Mask="tv" RequiredArguments="1" Obsolete="false" />
<Function Name="addPolar" Mask="tff" RequiredArguments="2" Obsolete="false" />
<Function Name="addSpherical" Mask="tfff" RequiredArguments="3" Obsolete="false" />
<Function Name="interpolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="extrapolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalInterpolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="sphericalExtrapolate" Mask="tvf" RequiredArguments="2" Obsolete="false" />
<Function Name="cartesianToPolar" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="cartesianToSpherical" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Event">
<Class Name="CancellableEvent">
<Function Name="preventDefault" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="isDefaultPrevented" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
</Class>
<Class Name="Timer" />
<Class Name="KeyEvent">
<Property Name="keyCode" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="scanCode" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="mod" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="repeat" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="down" ReadOnly="true" Obsolete="false" Type="bool" />
<Function Name="preventDefault" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="isDefaultPrevented" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="XmlElement">
<Property Name="childrenCount" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="children" ReadOnly="true" Obsolete="false" />
<Property Name="parent" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="text" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="attributes" ReadOnly="true" Obsolete="false" />
<Function Name="clear" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getStringAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="getBoolAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="getIntegerAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="getFloatAttribute" Mask="ts" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="XmlDocument">
<Property Name="rootElement" ReadOnly="true" Obsolete="false" Type="Object" />
<Function Name="load" Mask="tx" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="Resource">
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="isStarted" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isStarting" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="exports" ReadOnly="true" Obsolete="false" />
<Function Name="start" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="stop" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="restart" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getExport" Mask="ts" RequiredArguments="1" Obsolete="false" />
</Class>
<Class Name="Client">
<Property Name="index" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="game" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="gameVersion" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="player" ReadOnly="false" Obsolete="false" Type="Object" />
<Property Name="administrator" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="console" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="ip" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="ping" ReadOnly="true" Obsolete="false" Type="int" />
<Function Name="despawnPlayer" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="disconnect" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="setData" Mask="ts.|b" RequiredArguments="2" Obsolete="false" />
<Function Name="removeData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="removeAllData" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Element">
<Property Name="id" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="type" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="netFlags" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="isLocal" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isSyncer" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isOwner" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="syncer" ReadOnly="false" Obsolete="false" Type="Object" />
<Property Name="syncerId" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="dimension" ReadOnly="false" Obsolete="false" Type="int" />
<Property Name="parent" ReadOnly="false" Obsolete="false" Type="Object" />
<Property Name="children" ReadOnly="true" Obsolete="false" />
<Property Name="name" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="resource" ReadOnly="false" Obsolete="false" Type="Object" />
<Property Name="streamInDistance" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="streamOutDistance" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="position" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="rotation" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Function Name="isType" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="getData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="setData" Mask="ts.|b" RequiredArguments="2" Obsolete="false" />
<Function Name="removeData" Mask="ts" RequiredArguments="1" Obsolete="false" />
<Function Name="removeAllData" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setSyncer" Mask="tx|b" RequiredArguments="1" Obsolete="false" />
<Function Name="isCreatedFor" Mask="tx" RequiredArguments="1" Obsolete="false" />
<Function Name="clearExistsFor" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="setExistsFor" Mask="txb" RequiredArguments="2" Obsolete="false" />
<Function Name="existsFor" Mask="tx" RequiredArguments="1" Obsolete="false" />
<Function Name="getRotation" Mask="t" RequiredArguments="0" Obsolete="true" />
<Function Name="setRotation" Mask="tv" RequiredArguments="1" Obsolete="true" />
<Class Name="Entity">
<Property Name="model" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="heading" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="modelIndex" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="velocity" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="turnVelocity" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Property Name="rotationVelocity" ReadOnly="false" Obsolete="false" Type="Vector3D" />
<Class Name="Ped">
<Property Name="skin" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="vehicle" ReadOnly="true" Obsolete="false" Type="Object" />
<Property Name="seat" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="health" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="animationState" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="isEnteringVehicle" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="isExitingVehicle" ReadOnly="true" Obsolete="false" Type="bool" />
<Function Name="giveWeapon" Mask="ti|ii" RequiredArguments="1" Obsolete="false" />
<Class Name="Player" />
</Class>
<Class Name="Vehicle">
<Property Name="siren" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="engine" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="lights" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="fuel" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="wheelAngle" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="speedLimit" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="engineRPM" ReadOnly="false" Obsolete="false" Type="number" />
<Property Name="engineHealth" ReadOnly="false" Obsolete="false" Type="number" />
<Function Name="fix" Mask="t" RequiredArguments="0" Obsolete="false" />
<Function Name="getOccupant" Mask="ti" RequiredArguments="1" Obsolete="false" />
<Function Name="getOccupants" Mask="t" RequiredArguments="0" Obsolete="false" />
</Class>
</Class>
</Class>
<Class Name="NetObjectFlags">
<Property Name="registered" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="deleting" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="onAllDimensions" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="forcedSyncer" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="findSyncer" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="sendSync" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="distanceStreaming" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="alwaysExistForSyncer" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="defaultExistance" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="transient" ReadOnly="false" Obsolete="false" Type="bool" />
<Property Name="onlySyncIfDetached" ReadOnly="false" Obsolete="false" Type="bool" />
</Class>
<Namespace Name="reflection">
<Function Name="clone" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="move" Mask="xx" RequiredArguments="2" Obsolete="false" />
<Function Name="tostring" Mask="x" RequiredArguments="1" Obsolete="false" />
<Function Name="createFunction" Mask="c" RequiredArguments="1" Obsolete="false" />
<Function Name="call" Mask="x" RequiredArguments="1" Obsolete="false" />
<Class Name="Function" />
</Namespace>
<Namespace Name="module">
<Namespace Name="hashing">
<Function Name="encodeBase64" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="decodeBase64" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="md5" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha1" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha224" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha256" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha384" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="sha512" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="ripemd128" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="ripemd160" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="ripemd256" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="ripemd320" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="whirlpool" Mask="" RequiredArguments="0" Obsolete="false" />
</Namespace>
<Namespace Name="geoip">
<Function Name="getCountryName" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getCountryISO" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getContinentName" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getContinentCode" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getCityName" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getPostalCode" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getSubdivisionName" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getSubdivisionISO" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getTimeZoneName" Mask="" RequiredArguments="0" Obsolete="false" />
</Namespace>
<Namespace Name="mysql">
<Function Name="connect" Mask="" RequiredArguments="0" Obsolete="false" />
<Class Name="Connection">
<Property Name="ping" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="insertId" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="affectedRows" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="warningCount" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="errorNum" ReadOnly="true" Obsolete="false" Type="void" />
<Property Name="error" ReadOnly="true" Obsolete="false" Type="void" />
<Function Name="query" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="close" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="escapeString" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="selectDatabase" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="changeUser" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="info" Mask="" RequiredArguments="0" Obsolete="false" />
</Class>
<Class Name="Result">
<Property Name="numRows" ReadOnly="true" Obsolete="false" Type="void" />
<Function Name="free" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="fetchAssoc" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="fetchAssoc" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="fetchRow" Mask="" RequiredArguments="0" Obsolete="false" />
</Class>
</Namespace>
</Namespace>
<Namespace Name="sdl">
<Property Name="platform" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="ticks" ReadOnly="true" Obsolete="false" Type="int" />
<Function Name="getModState" Mask="" RequiredArguments="0" Obsolete="false" />
</Namespace>
<Namespace Name="platform">
<Property Name="name" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="modState" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="ticks" ReadOnly="true" Obsolete="false" Type="int" />
</Namespace>
<Namespace Name="server">
<Property Name="game" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="name" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="gameMode" ReadOnly="false" Obsolete="false" Type="string" />
<Property Name="port" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="maxClients" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="rcon" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="rconPort" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="listed" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="httpServer" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="httpPort" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="minClientVersion" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="syncInterval" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="syncMethod" ReadOnly="true" Obsolete="false" Type="int" />
<Property Name="duplicateNames" ReadOnly="true" Obsolete="false" Type="bool" />
<Property Name="streamInDistance" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="streamOutDistance" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="pickupStreamInDistance" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="pickupStreamOutDistance" ReadOnly="true" Obsolete="false" Type="number" />
<Property Name="logPath" ReadOnly="true" Obsolete="false" Type="string" />
<Property Name="syncLocalEntities" ReadOnly="true" Obsolete="false" Type="bool" />
<Function Name="setRule" Mask="ss" RequiredArguments="2" Obsolete="false" />
<Function Name="getRule" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="banIP" Mask="s|i" RequiredArguments="1" Obsolete="false" />
<Function Name="unbanIP" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="unbanAllIPs" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="isIPBanned" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="shutdown" Mask="" RequiredArguments="0" Obsolete="false" />
<Function Name="getCVar" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="setPassword" Mask="s" RequiredArguments="1" Obsolete="false" />
</Namespace>
<Namespace Name="mafia">
<Property Name="mapName" ReadOnly="true" Obsolete="false" Type="string" />
<Function Name="changeMap" Mask="s" RequiredArguments="1" Obsolete="false" />
<Function Name="createExplosion" Mask="vff" RequiredArguments="3" Obsolete="false" />
<Function Name="createVehicle" Mask="sv|f" RequiredArguments="2" Obsolete="false" />
<Function Name="createPlayer" Mask="sv|f" RequiredArguments="2" Obsolete="false" />
<Function Name="createPed" Mask="sv|f" RequiredArguments="2" Obsolete="false" />
<Function Name="fadeScreen" Mask="xbf|i" RequiredArguments="3" Obsolete="false" />
<Namespace Name="hud">
<Function Name="message" Mask="xsi" RequiredArguments="3" Obsolete="false" />
<Function Name="enableMap" Mask="xb" RequiredArguments="2" Obsolete="false" />
<Function Name="announce" Mask="xsf" RequiredArguments="3" Obsolete="false" />
<Function Name="showCountdown" Mask="xi" RequiredArguments="2" Obsolete="false" />
</Namespace>
</Namespace>
</Namespace>
</Documentation>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" ?>
<EventTypes>
<!--Called when a resource starts-->
<EventType Name="OnResourceStart" Hash="1143708828" Arguments="1" CanPreventDefault="true" />
<!--Called when an element is about to stream in-->
<EventType Name="OnElementStreamIn" Hash="2759455221" Arguments="2" CanPreventDefault="true" />
<!--Called when a resource stops-->
<EventType Name="OnResourceStop" Hash="1347867548" Arguments="2" CanPreventDefault="true" />
<!--Called when the player has joined the game-->
<EventType Name="OnPlayerJoined" Hash="3833973824" Arguments="1" CanPreventDefault="false" />
<!--Called when a player is attempting to connect-->
<EventType Name="OnPlayerConnect" Hash="2611712496" Arguments="1" CanPreventDefault="true" />
<!--Called when a player has connected and is joining-->
<EventType Name="OnPlayerJoin" Hash="3624951888" Arguments="1" CanPreventDefault="false" />
<!--Called every process-->
<EventType Name="OnProcess" Hash="3150131130" Arguments="1" CanPreventDefault="false" />
<!--Called when a player disconnects-->
<EventType Name="OnPlayerQuit" Hash="3017502482" Arguments="2" CanPreventDefault="false" />
<!--Called when a player types a command-->
<EventType Name="OnPlayerCommand" Hash="1638826555" Arguments="3" CanPreventDefault="true" />
<!--Called when a player chats-->
<EventType Name="OnPlayerChat" Hash="2515290669" Arguments="2" CanPreventDefault="true" />
<!--Called when the server finished the start sequence-->
<EventType Name="OnServerStart" Hash="3318682471" Arguments="0" CanPreventDefault="false" />
<!--Called when an element is about to stream out-->
<EventType Name="OnElementStreamOut" Hash="3852636898" Arguments="2" CanPreventDefault="true" />
<!--Called when an element is about to be destroyed-->
<EventType Name="OnElementDestroy" Hash="696839637" Arguments="1" CanPreventDefault="true" />
<!--Called when a ped is finished entering a vehicle.-->
<EventType Name="OnPedEnteredVehicle" Hash="800199306" Arguments="3" CanPreventDefault="false" />
<!--Called when a ped has finished exiting a vehicle.-->
<EventType Name="OnPedExitedVehicle" Hash="1591215844" Arguments="3" CanPreventDefault="false" />
<!--Called when a ped is started entering a vehicle.-->
<EventType Name="OnPedEnteringVehicle" Hash="3211811326" Arguments="3" CanPreventDefault="false" />
<!--Called when a ped has started exiting a vehicle.-->
<EventType Name="OnPedExitingVehicle" Hash="353075125" Arguments="3" CanPreventDefault="false" />
<!--Called when a ped dies.-->
<EventType Name="OnPedDeath" Hash="2417618960" Arguments="4" CanPreventDefault="false" />
<!--Called when a ped is spawned.-->
<EventType Name="OnPedSpawn" Hash="3880839897" Arguments="1" CanPreventDefault="false" />
<!--Called when a ped falls.-->
<EventType Name="OnPedFall" Hash="2722461453" Arguments="1" CanPreventDefault="false" />
</EventTypes>

458
locale/arabic.json Normal file
View File

@@ -0,0 +1,458 @@
{
"TranslationProvidedBy": "Kasir",
"LocaleEnglishName": "Arabic",
"LocaleNativeName": "عربى",
"LocaleOffer": ".الخادم متاح باللغة الإنجليزية.استخدم {1} لاستخدامه",
"LocaleChanged1": "لغتك الآن على {1}",
"LocaleChanged2": "سيعرض الخادم الآن الرسائل في {1}",
"LocaleChangedNote": "هذا لا يغير الرسائل من اللاعبين الآخرين",
"AccentsListHeader": "لهجآت",
"HeaderHelpMainList": "فئة الدعم",
"AccentNotFound": "اللكنة الحالية غير متوفرة",
"AccentSet": "قمت بتعيين لهجتك على {1}",
"InvalidAnimation": "هذه الرسوم المتحركة غير متوفرة",
"AnimationCommandTip": "استخدم {1} لمشاهدة قائمة الرسوم المتحركة المتاحة",
"InvalidAnimationDistance": "يجب المسافة تكون بين 0 و 3",
"AnimationStopCommandTip": "استخدم {1} لإيقاف الرسوم المتحركة",
"CantBanClient": "لا يمكنك حظر هذا الإعب",
"PlayerAccountBanned": "تم حظر حساب {1}",
"ClanNotFound": "لم يتم العثور على المجموعة",
"ClanNameTaken": "توجد مجموعة بهذا الاسم بالفعل",
"PlayerNotFound": "الاعب غير موجود",
"ClanCantRemoveRanks": "لا يمكنك إزالة رتب المجموعة",
"ClanCantAddRanks": "لأ يمكنك إضافة رتب",
"ClanRankNotFound": "رتبة غير موجودهـ",
"ClanCantChangeMemberTag": "ليس لديك الصلاحيات لتعديل على علامات رتب الاعضاء",
"ClanPlayerNotInSameClan": "الاعب غير موجود بمجموعتك",
"ClanCantChangeRankLevel": "ليس لديك صلاحيات لتغيير مستوى رتبة المجموعة",
"ClanCantChangeRankTag": "لا يمكنك تغيير علامات رتب المجموعة",
"NameNotRegistered": "اسمك غير مسجل! استخدم {1} لإنشاء حساب.",
"AutomaticLoginIPToggle": "IP تم تفعيل {1} تسجيل الدخول التلقائي عن طربق",
"CouldNotRegisterAccount": "حدثت مشكلة في إنشاء حسابك, يرجى التواصل بـ إلاداره.",
"RandomTipsToggle": "النصائح العشوائية{1}",
"ActionTipsToggle": "نصائح العمل{1}",
"AutoSpawnLastCharToggle": "النشر التلقائي كأخر حرف تم استخدامه هو {1}",
"AccountGUISettingToggle": "واجهة المستخدم الرسومية هي الآن {1}",
"On": "تشغيل",
"Off": "إيقاف",
"Yes": "موافق",
"No": "لا",
"True": "صحيح",
"False": "خطأ",
"Locked": "مغلق",
"Unlocked": "مفتوح",
"PasswordNotGoodEnough": "كلمة المرور الجديدة يجب أن تفي بالمتطلبات!",
"PasswordNeedsBase": " {1} يجب أن تحتوي كلمات المرور على الأقل",
"PasswordNeedsCapitals": "{1}من الأحرف الكبيرة",
"PasswordNeedsNumbers": "{1} أرقام",
"PasswordNeedsSymbols": "{1} حروف او رموز",
"PasswordsDontMatch": "كلمة المرور الجديدة وتأكيد كلمة المرور الجديدة ليسا متطابقين!!",
"PasswordChanged": "تم بنجاح تغيير كلمة المرور!",
"AutoLoggedInIP": "IP تم تسجيل دخولك تلقائيًا بواسطة!",
"WelcomeBack": "مرحبًا بك مرة أخرى في {1} ، {2}! من فضلك {3} للمتابعة.",
"WelcomeNewPlayer": "مرحبًا بك في {1} ، {2}! من فضلك {3} للعب.",
"InvalidPlayer": "اللاعب غير موجود!",
"InvalidBusiness": "لم يتم العثور على الأعمال!",
"InvalidHouse": "البيت غير موجود!",
"InvalidVehicle": "لم يتم ايجاد السيارة!",
"InvalidClan": "لم يتم العثور على المجموعة!",
"InvalidClanRank": "رتبة غير موجوده!",
"InvalidJob": "لم يتم العثور على الوظيفة!",
"InvalidItem": "العنصر غير موجود!",
"InvalidItemType": "نوع العنصر غير موجود!",
"InvalidRadioStation": "لم يتم العثور على محطة راديو!",
"InvalidGate": "البوابة غير موجودة!",
"EntersProperty": "يفتح الباب ويدخل {1}",
"ExitsProperty": "يفتح الباب ويخرج من {1}",
"EnterExitPropertyDoorLocked": "يحاول فتح الباب {1} ولكنه يفشل لأنه مغلق",
"PropertyNoInterior": "هذا ليس له جزء داخلي {1}، ولكن لا يزال بإمكانك استخدام الأوامر على أيقونة الباب.",
"NoBusinessWithItemType": "لا يوجد عمل مع هذا الخيار متاح",
"HeaderKeyBinds": "مفتاح الروابط",
"HeaderAccountHelp": "مساعدة الحساب",
"HeaderVehicleHelp": "تعليمات السيارة",
"HeaderVehicleDealershipHelp": "مساعدة بيع سيارات",
"HeaderJobHelp": "تعليمات الوظيفة",
"HeaderChatHelp": "تعليمات الدردشة",
"HeaderServerRules": "قوانين سيرفر",
"HeaderWebsiteInfo": "الموقع الرسمي",
"HeaderDiscordInfo": "ديسكورد",
"HeaderAnimationsList": "قائمة الرسوم المتحركة",
"HeaderPayAndSprayHelp": "الدفع ,ورشٌ المساعده",
"HeaderAmmunationHelp": "مساعدة الذخيرة",
"HeaderVehicleTuneupHelp": "مساعدة تعديل السيارة",
"HeaderBindableKeysHelp": "مفاتيح قابلة للربط",
"HeaderSkinHelp": "مساعدة الملابس / الجلد",
"HeaderBusinessHelp": "تعليمات الأعمال",
"HeaderClanHelp": "تعليمات المجموعة",
"HeaderPlayerVehiclesList": "مركبات المشغل ({1})",
"HeaderPlayerBusinessesList": "أعمال اللاعب ({1})",
"HeaderClansList": "قائمة المجموعة",
"HeaderAdminsList": "قائمة الادمن",
"HeaderBadgeInfo": "معلومات الشاره",
"HeaderAccentsList": "قائمة اللغة",
"HeaderPlayerInfo": "معلومات الاعب",
"HeaderWealthandTaxHelp": "معلومات المال",
"HeaderCommandInfo": "معلومات الإوامر ({1})",
"HeaderRadioHelp": "تعليمات راديو",
"HeaderRadioStationsList": "محطات الردايو",
"HeaderKeyBindsList": "قائمة روابط المفاتيح",
"RadioVolumeChanged": "{1} لقد {2} غيرت مستوى صوت البث اللاسلكى إلى٪",
"VolumeLevelNotNumber": "يجب أن يكون مستوى الصوت رقمًا",
"RadioStationLocationInvalid": "يجب أن تكون في سيارة أو منزل أو عمل أو لديك جهاز شخصي لتغيير المحطة!",
"ActionBusinessRadioStationChange": "تغيير محطة راديو الأعمال إلى {1} ({2})",
"ActionHouseRadioStationChange": "تغيير محطة راديو المنزل إلى {1} ({2})",
"ActionVehicleRadioStationChange": "يغير محطة راديو السيارة إلى {1} ({2})",
"ActionItemRadioStationChange": "يغير محطة {1} إلى {2} ({3})",
"RandomVehicleCommandsDisabled": "هذه مركبة مرور عشوائية ولا يمكن استخدام الأوامر لها.",
"HouseDoorLock": "البيت {1} {2}!",
"BusinessDoorLock": "الأعمال {1} {2}!",
"ServerGameModeRestarting": "يتم إعادة تشغيل وضع لعبة الخادم!",
"HeaderSelfItemList": "المخزون الخاص بك",
"HeaderPlayerItemList": "مخزون الاعب ({1})",
"HeaderHouseItemList": "بيت الاعب",
"HeaderBusinessFloorItemList": "جرد الأعمال (للبيع)",
"HeaderBusinessStorageItemList": "جرد الأعمال (التخزين)",
"HeaderItemItemList": "مخزون {1}",
"ItemSlotNotNumber": "يجب أن تكون خانة العنصر رقمًا",
"ItemSlotMustBeBetween": "The item slot must be between {1} and {2}!",
"UseItemBugged": "العنصر الذي تحاول استخدامه به التنصت. تم إرسال تقرير خطأ إلى مطوري الخادم.",
"PickupItemBugged": "العنصر الذي تحاول استلامه به التنصت. تم إرسال تقرير خطأ إلى مطوري الخادم.",
"DropItemBugged": "تم التنصت على العنصر الذي تحاول إسقاطه. تم إرسال تقرير خطأ إلى مطوري الخادم.",
"HandsBusy": "يديك مشغولتان",
"CantUseItemInSkinChange": "لا يمكنك استخدام عنصر أثناء تخصيص مظهرك",
"CantDropItemInSkinChange": "لا يمكنك إسقاط عنصر أثناء تخصيص مظهرك",
"CantPickupItemInSkinChange": "لا يمكنك التقاط عنصر أثناء تخصيص مظهرك",
"CantSwitchItemInSkinChange": "لا يمكنك تبديل عنصر أثناء تخصيص مظهرك",
"CantGiveItemInSkinChange": "لا يمكنك إعطاء عنصر أثناء تخصيص مظهرك",
"CantTakeItemInSkinChange": "لا يمكنك أن تأخذ عنصرًا أثناء تخصيص مظهرك",
"ItemUnequippableNoAmmo": "لا تحتوي الفتحة {1} الموجودة في الفتحة {2} على ذخيرة ، ولا يمكن تجهيزها!",
"NoSpaceSelfInventory": "ليس لديك أي مساحة إضافية في مخزونك",
"Business": "الاعمال",
"House": "البيت",
"Clan": "المجموعة",
"Vehicle": "السيارة",
"Item": "الاغراض",
"ItemType": "نوع العنصر",
"Gate": "بوابة",
"Door": "باب",
"ClanRank": "رتبة المجموعة",
"JobRank": "رتبة الوظيفة",
"RadioStation": "المحطة الإذاعية",
"Months": [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر"
],
"WeekDays": [
"الأحد",
"الإثنين",
"الثلاثاء",
"الاربعاء",
"الخميس",
"الجمعه",
"السبت"
],
"CardinalDirections": [
"شمال",
"الشمال الشرقي",
"شرق",
"الجنوب الشرقي",
"جنوب",
"جنوب غرب",
"غرب",
"الشمال الغربي"
],
"NewPlayerReadyToPlay": [
"لقد حصلت على بعض من المال. استخدم {1} للبحث عن أماكن لشراء العناصر.",
"إذا كنت بحاجة إلى المال،الوظائف هي النقاط الصفراء على الخريطة.",
"للحصول على سيارة ، قم بزيارة وكالة السيارات. يمكنك أيضًا استخدام سيارة مستأجرة بالقرب من السباون أو ركوب القطار",
"تأكد من قراءة {1} واستخدم {2} للحصول على معلومات."
],
"YourCurrentVehicleDeleted": "تم حذف السيارة التي كنت بداخلها.",
"Distance": "مسافة",
"Meters": "أمتار",
"Feet": "قدم",
"Kilometers": "كيلومترات",
"Miles": "اميال",
"MustBeVehicleDriver": "يجب أن تكون سائق السيارة!",
"PlayerJoinedServer": "انضم إلى اللعبة من {1}!",
"PlayerLeftServer": "غادر {1} اللعبة! ({1})",
"DisconnectReasons": [
"انقطع الإتصال",
"انقطع الاتصال",
"عميل غير مدعوم",
"تحذير للعبة",
"كلمة سر غير صحيحه",
"قابل للتنفيذ غير معتمد",
"انقطع الاتصال",
"حظر",
"فشل",
"اسم غير صالح",
"خطأ"
],
"TakeItemFromHouse": "يأخذ {1} من المنزل",
"TakeItemFromBusinessStorage": "يأخذ {1} من تخزين الشركة",
"TakeItemFromBusiness": "يأخذ {1} من الأعمال",
"TakeItemFromItem": "يأخذ {1} من {2}",
"TakeItemFromVehicleTrunk": "يأخذ {1} من صندوق السيارة",
"TakeItemFromVehicleDash": "يأخذ {1} من صندوق القفازات",
"JobEquipmentInventoryKeyBindTip": "معدات العمل في مخزونك. اضغط على {1} لمشاهدتها.",
"JobEquipmentInventoryCommandTip": "معدات العمل في مخزونك. استخدم {1} لمشاهدتها.",
"AccountHelp": [
"لا تشارك كلمة مرورك مع أي شخص آخر. لن يطالبك فريق عمل {1} بكلمة المرور مطلقًا",
"استخدم {1} لتغيير كلمة المرور الخاصة بك ، و {2} إذا نسيتها",
"بعض الإعدادات التي يمكنك استخدامها: {1}"
],
"VehicleHelp": [
"ستوفر مركباتك الشخصية أينما تتركها أنت أو أي شخص آخر!",
"قم بزيارة المعرض لشراء مركبات جديدة (استخدم {1} لمزيد من المعلومات)",
"Some commands: {1}",
"قم بزيارة مرآب ميكانيكي لإصلاح وتلوين وضبط سيارتك! {1} للحصول على معلومات"
],
"VehicleDealershipHelp": [
"قم بزيارة تاجر سيارات لشراء مركبات جديدة. استخدم {1} للعثور على واحد.",
"عند التاجر ، أدخل السيارة التي تريد شراءها ، وسيظهر لك السعر",
"إذا كنت ترغب في شراء السيارة ، فاستخدم {1} وستحصل على مفاتيح لاختبار قيادتها حول ساحة الانتظار.",
"ابتعد عن الوكالة مع السيارة الجديدة لتأكيد الشراء."
],
"JobHelp": [
"قم بزيارة مواقع العمل للحصول على وظيفة وكسب المال. ابحث عن علامات الصفراء على الخريطة",
"في موقع العمل ، استخدم {1} للحصول على الوظيفة. استخدم {2} لإنهاء عملك",
"استخدم {1} لبدء العمل. يمكنك أيضًا الحصول على وظيفة {2} و {3}",
"يتم تأمين معظم مركبات العمل. استخدم {1} بالقرب من واحد للدخول إليه.",
"عند دخول مركبة عمل ، ستظهر لك معلومات حول كيفية القيام بالمهمة."
],
"ChatHelp": [
"(IC)والشخصية(OOC)هناك نوعان رئيسيان من الدردشة: خارج الطابع الشخصي",
"الخلط بين هذين النوعين ليس لعب الأدوار المناسب. راجع {1} للحصول على معلومات.",
"بعض أوامر الدردشة: {1}",
"يتوفر لبعضها أسماء أقصر ({1} للتحدث ، {2} للصراخ ، إلخ)"
],
"ServerRulesHelp": [
".غير مسموح بها.انت لست سوبر مان(powergaming)الإجراءات غير الواقعية",
"لا يسمح بأدوار إرهابية",
"اتبع دائمًا التعليمات التي قدمها المشرفون والاداره",
"لا تخلط الدردشات (metagaming). لا يمكنك استخدام المعلومات في IC التي تم استلامها OOC",
"حافظ على اللغة الإنجليزية في الدردشات الرئيسية. إذا لم تكن جيدًا في اللغة الإنجليزية ، فاستخدم {1}"
],
"AnimationHelp": [
"تتيح لك الرسوم المتحركة تحسين لعب الأدوار من خلال الإجراءات المرئية",
"استخدم {1} أو {2} مع اسم لاستخدام الرسم المتحرك.",
"لمشاهدة قائمة الرسوم المتحركة ، استخدم {1}"
],
"WeaponHelp": [
"قم بزيارة متجر أسلحة لشراء أسلحة. استخدم {1} للعثور على واحد.",
"شراء سلاح يتطلب رخصة سلاح.",
"يتم إدارة تراخيص الأسلحة من قبل قسم الشرطة. قدم طلبًا للحصول على واحدة ",
"يمكن أيضًا شراء الأسلحة بشكل غير قانوني من بعض الشركات وتجار الأسلحة والعصابات."
],
"SkinHelp": [
"في متجر الملابس ، استخدم {1} لشراء الملابس",
"عندما يكون لديك عنصر من الملابس ، قم بتجهيزه واستخدامه مثل أي عنصر آخر لإظهار اختيار الجلد (حدد {1} لمعرفة كيفية استخدام العناصر)",
"Some skins are restricted to jobs, clans, or for other reasons."
],
"KeyBindHelp": [
"يمكنك تعيين روابط المفاتيح الخاصة بك. استخدم {1} لرؤية المفاتيح التي تم ربطها.",
"استخدم {1} لإضافة رابط مفتاح جديد و {2} لإزالة واحد.",
"المفاتيح الافتراضية هي: {1} لمحرك السيارة و {2} للأضواء و {3} للقفل / فتح القفل",
"اضغط على {1} لمشاهدة عناصرك و {2} لتجهيز عنصر أو {3} لإلغاء تجهيز الكل.",
"اضغط على {1} لاستخدام العنصر الذي تمسكه ، أو اضغط على {2} لإسقاطه ، أو اضغط على {3} لالتقاط عنصر من الأرض."
],
"BusinessHelp": [
"استخدم {1} لشراء العناصر أو {2} لمشاهدة قائمة بما هو معروض للبيع في أي شركة",
"تظهر الشركات بأسماء زرقاء فوق الرمز عند مدخلها.",
"أوامر صاحب العمل: {1}",
"ستظهر سيارة جديدة معروضة للبيع عندما تبتعد عن الوكيل."
],
"ClanHelp": [
"اطلب من الإدارة إنشاء تيم(القبيلة) (على غرار الفصائل / المجموعات / العائلات)",
"يتمتع مالكو التيم(القبيلة) بالسيطرة الكاملة على افراد المجموعة بمجرد إنشائها",
"أوامر القبيلة: {1}",
"أوامر القبيلة: {1}"
],
"RadioStationHelp": [
"استخدم {1} لتعيين المحطة لمركبتك أو منزلك أو عملك",
"استخدم {2} لمشاهدة قائمة المحطات",
"يمكنك تغيير حجم تدفق الراديو باستخدام {1} مع 0-100 كنسبة مئوية"
],
"WealthAndTaxHelp": [
"ضرائبك في يوم الدفع هي {1} بالمائة من ثروتك المحسوبة.",
"ثروتك المحسوبة هي مجموع إجمالي يعتمد على عدد المركبات والمنازل والشركات التي لديك.",
"كل سيارة {1} ، كل منزل {2} ، وكل عمل {3}",
"استخدم {1} لمعرفة ثروتك الحالية ، و {2} لمعرفة المبلغ الذي ستدفعه كضريبة في كل يوم دفع"
],
"MustBeInAVehicle": "يجب أن تكون في مركبة!",
"MustBeInOrNearVehicle": "أنت بحاجة إلى أن تكون في السيارة أو بالقرب منها!",
"MustBeInVehicleFrontSeat": "يجب أن تكون في المقاعد الأمامية للسيارة!",
"MustBeInVehicleDriverSeat": "يجب أن تكون السائق!",
"DontHaveVehicleKey": "ليس لديك مفتاح لهذه السيارة!",
"NoGateAccess": "لا يمكنك الوصول إلى هذه البوابة!",
"GateBroken": "هذه البوابة مكسورة!",
"GateHacked": "البوابة لا تستجيب!",
"RadioJammed": "تسمع صوتًا ثابتًا فقط من الراديو.",
"VehicleNotForSale": "هذه السيارة ليست للبيع!",
"VehicleNotForRent": "هذه السيارة ليست للإيجار!",
"BusinessNotForSale": "هذا العمل ليس للبيع!",
"BusinessNotForRent": "هذا العمل ليس للإيجار!",
"HouseNotForSale": "هذا المنزل ليس للبيع!",
"HouseNotForRent": "هذا المنزل ليس للإيجار!",
"DealershipPurchaseTestDrive": "قم بقيادة السيارة بعيدًا عن الوكالة لشرائها ، أو اخرج للإلغاء.",
"DealershipPurchaseExitedVehicle": "لقد ألغيت شراء السيارة بالخروج من السيارة!",
"VehiclePurchaseComplete": "هذه السيارة الآن لك!",
"VehiclePurchaseNotEnoughMoney": "ليس لديك ما يكفي من المال لشراء هذه السيارة!",
"HousePurchaseNotEnoughMoney": "ليس لديك ما يكفي من المال لشراء هذا المنزل!",
"BusinessPurchaseNotEnoughMoney": "ليس لديك ما يكفي من المال لشراء هذا العمل!",
"Locales": {
"English": "انجلزي",
"Russian": "روسي",
"Spanish": "الإسبانية",
"German": "الإلمانية",
"Dutch": "الهولندية",
"Polish": "البولندية"
},
"ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
"HeaderPlayerHousesList": "بيوت اللاعبين ({1})",
"HeaderPlayerStaffFlagsList": "أعلام طاقم العمل ({1})",
"HeaderStaffFlagsList": "أعلام الموظفين",
"NonRPName": "اسم غير RP! اختر واحدة جديدة:",
"InvalidStaffFlag": "لم يتم العثور على علم الموظفين!",
"InvalidClanFlag": "علم القبيلة غير موجود!",
"InvalidLocale": "اللغة غير موجودة!",
"HeaderJobUniformList": "زي العمل ({1})",
"HeaderJobEquipmentList": "معدات العمل ({1})",
"InvalidJobUniform": "زي العمل غير موجود!",
"InvalidJobEquipment": "لم يتم العثور على معدات العمل!",
"HeaderVehiclesInRangeList": "مركبات داخل {1}",
"NoVehiclesWithInRange": "لا توجد مركبات داخل {1}",
"AmountNotNumber": "المبلغ يجب أن يكون رقما!",
"NeedToBeWorking": "يجب أن تعمل! استخدم {1} في موقع العمل أو بالقرب من سيارات العمل.",
"NeedToBeOnJobRoute": "عليك أن تفعل طريق عمل! استخدم {1} في مركبة عمل",
"CurrentJobRouteDeleted": "تم حذف مسار العمل الذي كنت تعمل فيه بواسطة الإدمن",
"CurrentJobRouteVehicleColoursChanged": "تم تغيير ألوان السيارة لمسار وظيفتك بواسطة الإدمن",
"NotYourJob": "هذه ليست وظيفتك!",
"JobPoints": "يمكنك الحصول على وظيفة من خلال الذهاب إلى النقاط الصفراء على الخريطة.",
"QuitJobToTakeAnother": "إذا كنت تريد هذه الوظيفة ، فاستخدم {1} لإنهاء وظيفتك الحالية.",
"NotAJobVehicle": "هذه ليست وسيلة عمل!",
"NotYourJobVehicle": "هذه ليست مركبة عملك!",
"JobRouteDisabled": "تم تعطيل مسار العمل الذي كنت تسلكه بواسطة أحد الإداريين",
"HeaderPickupTypes": "أنواع الالتقاط",
"HeaderBlipTypes": "أنواع أيقونات الخريطة",
"InvalidGPSLocation": "لا توجد مواقع بهذا الاسم أو النوع",
"HeaderBusinessList": "الأعمال",
"VehicleForSale": "يمكن شراء {1} مقابل {2}! استخدم {3} إذا كنت ترغب في شرائه",
"VehicleForRent": "هذا {1} قابل للتأجير لـ {2}! استخدم {3} إذا كنت تريد استئجاره",
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
"LoginFailedInvalidPassword": "رمز مرور خاطئ! عدد المحاولات المتبقية: {1}",
"LoginFailedNoPassword": "يجب عليك إدخال كلمة المرور! ! عدد المحاولات المتبقية: {1}",
"RegistrationFailedNoPassword": "يجب عليك إدخال كلمة المرور!",
"RegistrationFailedNoPasswordConfirm": "يجب عليك تأكيد كلمة المرور!",
"RegistrationFailedNoEmail": "يجب إدخال البريد الإلكتروني!",
"AccountNameAlreadyRegistered": "تم تسجيل اسمك بالفعل!",
"AlreadyLoggedIn": "انت بالفعل بداخل!",
"RegistrationFailedInvalidEmail": "هذا البريد الإلكتروني غير صالح!",
"RegistrationFailedPasswordMismatch": "كلمات المرور غير متطابقة!",
"RegistrationFailedCreateError": "تعذر إنشاء حسابك!",
"RegistrationSuccess": "لقد تم إنشاء حسابك!",
"RegistrationEmailVerifyReminder": "لا تنس التحقق من بريدك الإلكتروني! تم إرسال رمز التحقق لك.",
"RegistrationCreateCharReminder": "للعب على الخادم ، ستحتاج إلى تكوين شخصية.",
"NoCharactersGUIMessage": "ليس لديك أحرف. هل ترغب في صنع واحدة؟",
"NoCharactersGUIWindowTitle": "لا أحرف",
"NoCharactersChatMessage": "ليس لديك أحرف. استخدم {1} لإنشاء واحدة.",
"NeedEmailFor2FA": "تحتاج إلى إضافة بريدك الإلكتروني إلى حسابك لاستخدام المصادقة ذات العاملين.",
"NeedEmailVerifiedFor2FA": "تحتاج إلى التحقق من بريدك الإلكتروني لاستخدام المصادقة ذات العاملين.",
"SetEmailHelpTip": "استخدم {1} لتعيين بريدك الإلكتروني.",
"VerifyEmailHelpTip": "استخدم {1} للتحقق من بريدك الإلكتروني.",
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
"NearbyRadio": "راديو قريب",
"FromRadio": "من الراديو",
"ToRadio": "في الراديو",
"NeedToEnterPropertyCommand": "تحتاج إلى إدخال {1} أولاً! استخدم {2} للدخول والخروج",
"NeedToEnterPropertyKeyPress": "تحتاج إلى إدخال {1} أولاً! اضغط على {2} للدخول والخروج",
"InventoryFullCantCarry": "ليس لديك أي مساحة لحمل هذا (جرد كامل)!",
"NotEnoughCashNeedAmountMore": "ليس لديك ما يكفي من المال! أنت بحاجة إلى {1} أكثر!",
"AmountMustBeMoreThan": "يجب أن يكون المبلغ أكثر من {1}!",
"WeaponBanned": "لا يسمح لك بشراء أو استخدام الأسلحة!",
"TimeNotNumber": "يجب أن يكون الوقت رقمًا",
"HeaderDefaultBusinessItemTypes": "قوالب عناصر الأعمال",
"FixingStuck": "إصلاح موقعك والعالم الافتراضي ...",
"CantUseCommandYet": "يجب أن تنتظر قبل أن تتمكن من استخدام هذا الأمر مرة أخرى!",
"NotATester": "أنت لست مختبرا!",
"AccessDenied": "تم الرفض",
"InvalidSkin": "هذا الجلد غير صالح!",
"HeaderInteriorTypes": "قائمة التصميمات الداخلية",
"ViewInventoryKeyPressTip": "اضغط على {1} لرؤية العناصر الخاصة بك",
"ViewInventoryCommandTip": "استخدم {1} لمشاهدة عناصرك",
"GUIAccountSettingToggle": "لقد قمت بتحويل {1} GUI",
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
"YourVehicleRespawned": "Your vehicle has been respawned",
"PlayerIPBanned": "{1} has been IP banned!",
"PlayerCharacterBanned": "{1} has been character banned!",
"PlayerSubNetBanned": "{1} has been subnet banned!",
"CantModifyBusiness": "You can't manage or modify this business",
"CantModifyHouse": "You can't manage or modify this house",
"ServerTimeSet": "{1} set the time to {2}",
"ServerWeatherSet": "{1} set the weather to {2}",
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
"ServerLogoSet": "{1} turned the server logo image {2}",
"ServerGUISet": "{1} turned GUI for this server {2}",
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
"ServerJobBlipsSet": "{1} turned all job blips {2}",
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
"BusinessBuyItemsLabel": "Use {1} to purchase items",
"PropertyEnterCommandLabel": "Use {1} to enter",
"PropertyEnterKeyPressLabel": "Press {1} to enter",
"PropertyForSaleLabel": "For sale: ${1}",
"PropertyForRentLabel": "For rent: ${1} every payday",
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
"Closed": "Closed",
"Open": "Open",
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
"TakeJobLabel": "Use {1} to work here",
"StartWorkLabel": "Use {1} to start working",
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
"JobLabel": "{1} Job",
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
"AllHousesReloaded": "All houses have been reloaded by an admin",
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
"PlayerKicked": "{1} has been kicked from the server",
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
"UnableToDoThat": "You aren't able to do that",
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
"SetVehicleClanConfirmTitle": "Warning!",
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
"SetItemPriceBelowOrderPriceTitle": "Warning!",
"MustOwnVehicle": "You don't own this vehicle!"
}

View File

@@ -1,397 +1,458 @@
{ {
"TranslationProvidedBy": "Renzuka Ctone", "TranslationProvidedBy": "Renzuka_Ctone",
"LocaleEnglishName": "Chinese", "LocaleEnglishName": "Simplified Chinese",
"LocaleNativeName": "Chinese", "LocaleNativeName": "简体中文",
"LocaleOffer": "This server is available in English. Use {1} to use it.", "LocaleOffer": "本服务器有可用的中文翻译版本,使用 {1} 以启用。",
"LocaleChanged1": "Your language is now set to {1}", "LocaleChanged1": "语言已设定为 {1}",
"LocaleChanged2": "The server will now display messages in {1}", "LocaleChanged2": "服务器现在将以 {1} 显示消息。",
"LocaleChangedNote": "This does not change messages from other players", "LocaleChangedNote": "这将不会影响到来自其他玩家的消息",
"AccentsListHeader": "Accents", "AccentsListHeader": "口音",
"HeaderHelpMainList": "Help Categories", "HeaderHelpMainList": "帮助类别",
"AccentNotFound": "Accent not found", "AccentNotFound": "口音不存在",
"AccentSet": "You set your accent to {1}", "AccentSet": " 口音已设置为 {1}",
"AnimationNotFound": "That animation doesn't exist", "InvalidAnimation": "该动作不存在",
"AnimationCommandTip": "Use {1} to see a list of valid animations", "AnimationCommandTip": "使用 {1} 以查看可用动作列表",
"AnimationInvalidDistance": "The distance must be between 0 and 3", "InvalidAnimationDistance": "范围必须在 0 到 3 之间",
"AnimationStopCommandTip": "Use {1} to stop your animation", "AnimationStopCommandTip": "使用 {1} 以停止当前动作",
"CantBanClient": "You cannot ban this person", "CantBanClient": "你无法封禁该玩家",
"PlayerAccountBanned": "{1} has been account banned", "PlayerAccountBanned": "{1} 的账号已被封禁",
"ClanNotFound": "Clan not found", "ClanNotFound": "帮派不存在",
"ClanNameTaken": "A clan with that name already exists", "ClanNameTaken": "该帮派名称已被占用",
"PlayerNotFound": "Player not found", "PlayerNotFound": "玩家不存在",
"ClanCantRemoveRanks": "You can't remove clan ranks", "ClanCantRemoveRanks": "无法清除帮派等级",
"ClanCantAddRanks": "You can't add clan ranks", "ClanCantAddRanks": "无法增加帮派等级",
"ClanRankNotFound": "Clan rank not found", "ClanRankNotFound": "帮派等级不存在",
"ClanCantChangeMemberTag": "You can not change clan member's tags", "ClanCantChangeMemberTag": "你无法更改帮派成员的标签",
"ClanPlayerNotInSameClan": "That player is not in your clan", "ClanPlayerNotInSameClan": "该玩家并不属于你的帮派",
"ClanCantChangeRankLevel": "You can not change clan rank's level", "ClanCantChangeRankLevel": "你无法改变帮派等级",
"ClanCantChangeRankTag": "You can not change clan rank's tags", "ClanCantChangeRankTag": "你无法改变帮派标签",
"NameNotRegistered": "Your name is not registered! Use {1} to make an account.", "NameNotRegistered": "你的游戏名尚未注册!使用 {1} 以创建一个新账户。",
"AutomaticLoginIPToggle": "Automatic login by IP is now {1}", "AutomaticLoginIPToggle": "通过 IP 自动登录功能 现已 {1}",
"CouldNotRegisterAccount": "There was a problem creating your account. Please contact an admin.", "CouldNotRegisterAccount": "在创建你的账户时遇到一些问题,请与管理员联系。",
"RandomTipsToggle": "Random tips are now {1}", "RandomTipsToggle": "随机提示信息现已 {1}",
"ActionTipsToggle": "Action tips are now {1}", "ActionTipsToggle": "操作帮助现已 {1}",
"AutoSpawnLastCharToggle": "Automatic spawn as last used character is {1}", "AutoSpawnLastCharToggle": "上次使用的角色 {1} 已自动复活。",
"AccountGUISettingToggle": "GUI is now {1}", "AccountGUISettingToggle": "GUI 现已 {1}",
"On": "On", "On": "开启",
"Off": "Off", "Off": "关闭",
"Yes": "Yes", "Yes": "",
"No": "No", "No": "",
"True": "True", "True": "",
"False": "False", "False": "",
"Locked": "Locked", "Locked": "锁定",
"Unlocked": "Unlocked", "Unlocked": "未锁定",
"PasswordNotGoodEnough": "The new password must meet the requirements!", "PasswordNotGoodEnough": "新密码必须符合要求!",
"PasswordNeedsBase": "Passwords must have at least {1}", "PasswordNeedsBase": "密码至少需要 {1}",
"PasswordNeedsCapitals": "{1} capital letters", "PasswordNeedsCapitals": "{1} 大写字母",
"PasswordNeedsNumbers": "{1} numbers", "PasswordNeedsNumbers": "{1} 数字",
"PasswordNeedsSymbols": "{1} symbols", "PasswordNeedsSymbols": "{1} 符号",
"PasswordsDontMatch": "The new password and confirm new password aren't the same!", "PasswordsDontMatch": "新密码和确认密码不一致!",
"PasswordChanged": "Your password has been changed!", "PasswordChanged": "已成功更改你的密码!",
"AutoLoggedInIP": "You have been automatically logged in by IP!", "AutoLoggedInIP": "已通过 IP 自动登录!",
"WelcomeBack": "Welcome back to {1}, {2}! Please {3} to continue.", "WelcomeBack": "欢迎回到 {1}, {2} 请 {3} 以继续。",
"WelcomeNewPlayer": "Welcome to {1}, {2}! Please {3} to play.", "WelcomeNewPlayer": "欢迎来到 {1}, {2}! 请 {3} 以开始游戏。",
"InvalidPlayer": "Player not found!", "InvalidPlayer": "玩家不存在!",
"InvalidBusiness": "Business not found!", "InvalidBusiness": "企业不存在!",
"InvalidHouse": "House not found!", "InvalidHouse": "住宅不存在!",
"InvalidVehicle": "Vehicle not found!", "InvalidVehicle": "载具不存在!",
"InvalidClan": "Clan not found!", "InvalidClan": "帮派不存在!",
"InvalidClanRank": "Clan rank not found!", "InvalidClanRank": "帮派等级不存在!",
"InvalidJob": "Job not found!", "InvalidJob": "职业不存在",
"InvalidItem": "Item not found!", "InvalidItem": "物品不存在!",
"InvalidItemType": "Item type not found!", "InvalidItemType": "物品种类不存在!",
"InvalidRadioStation": "Radio station not found!", "InvalidRadioStation": "电台不存在!",
"InvalidGate": "Gate not found!", "InvalidGate": "大门不存在!",
"EntersProperty": "opens the door and enters the {1}", "EntersProperty": "开门并进入 {1}",
"ExitsProperty": "opens the door and exits the {1}", "ExitsProperty": "开门并退出 {1}",
"EnterExitPropertyDoorLocked": "tries to open the {1} door but fails because it's locked", "EnterExitPropertyDoorLocked": "试图打开 {1} 之门,却发现已上锁。",
"PropertyNoInterior": "This {1} does not have an interior, but you can still use commands at the door icon.", "PropertyNoInterior": "{1} 暂无内部场景,但你仍可以在大门图标上使用相关指令。",
"NoBusinessWithItemType": "There is no business with that item available", "NoBusinessWithItemType": "暂无可用项目的企业",
"HeaderKeyBinds": "Key Binds", "HeaderKeyBinds": "快捷键设置",
"HeaderAccountHelp": "Account Help", "HeaderAccountHelp": "账户帮助",
"HeaderVehicleHelp": "Vehicle Help", "HeaderVehicleHelp": "载具帮助",
"HeaderVehicleDealershipHelp": "Vehicle Dealership Help", "HeaderVehicleDealershipHelp": "汽车经销商帮助 ",
"HeaderJobHelp": "Job Help", "HeaderJobHelp": "职业帮助",
"HeaderChatHelp": "Chat Help", "HeaderChatHelp": "聊天帮助",
"HeaderServerRules": "Server Rules", "HeaderServerRules": "服务器规则",
"HeaderWebsiteInfo": "Website", "HeaderWebsiteInfo": "官网",
"HeaderDiscordInfo": "Discord", "HeaderDiscordInfo": "Discord",
"HeaderAnimationsList": "Animation List", "HeaderAnimationsList": "动作列表",
"HeaderPayAndSprayHelp": "Pay and Spray Help", "HeaderPayAndSprayHelp": "有偿喷漆帮助",
"HeaderAmmunationHelp": "Ammunation Help", "HeaderAmmunationHelp": "弹药帮助",
"HeaderVehicleTuneupHelp": "Vehicle Tune Help", "HeaderVehicleTuneupHelp": "载具改装帮助",
"HeaderBindableKeysHelp": "Bindable Keys", "HeaderBindableKeysHelp": "可绑定的按键",
"HeaderSkinHelp": "Clothes/Skin Help", "HeaderSkinHelp": "服装/皮肤帮助",
"HeaderBusinessHelp": "Business Help", "HeaderBusinessHelp": "企业帮助",
"HeaderClanHelp": "Clan Help", "HeaderClanHelp": "帮派帮助",
"HeaderPlayerVehiclesList": "Player Vehicles ({1})", "HeaderPlayerVehiclesList": "玩家载具 ({1})",
"HeaderPlayerBusinessesList": "Player Businesses ({1})", "HeaderPlayerBusinessesList": "玩家企业 ({1})",
"HeaderClansList": "Clan List", "HeaderClansList": "帮派列表",
"HeaderAdminsList": "Admin List", "HeaderAdminsList": "管理员列表",
"HeaderBadgeInfo": "Badge Information", "HeaderBadgeInfo": "荣誉信息",
"HeaderAccentsList": "Accent List", "HeaderAccentsList": "口音列表",
"HeaderPlayerInfo": "Player Information ({1})", "HeaderPlayerInfo": "玩家信息 ({1})",
"HeaderWealthandTaxHelp": "Wealth and Tax Information", "HeaderWealthandTaxHelp": "资产与税收帮助",
"HeaderCommandInfo": "Command Information ({1})", "HeaderCommandInfo": "指令帮助 ({1})",
"HeaderRadioHelp": "Radio Help", "HeaderRadioHelp": "电台帮助",
"HeaderRadioStationsList": "Radio Stations", "HeaderRadioStationsList": "电台",
"HeaderKeyBindsList": "Key Binds List", "HeaderKeyBindsList": "按键绑定列表",
"RadioVolumeChanged": "{1} You changed your streaming radio volume to {2}%", "RadioVolumeChanged": "{1} 已将电台音量调整为 {2}%",
"VolumeLevelNotNumber": "The volume level must be a number", "VolumeLevelNotNumber": "确保输入的音量大小为有效数值",
"RadioStationLocationInvalid": "You must be in a vehicle, house, or business or have a personal device to change the station!", "RadioStationLocationInvalid": "你必须在车辆、住宅或企业中,或拥有个人设备才能更改电台!",
"ActionBusinessRadioStationChange": "changes the business radio station to {1} ({2})", "ActionBusinessRadioStationChange": "企业电台已设置为 {1} ({2})",
"ActionHouseRadioStationChange": "changes the house radio station to {1} ({2})", "ActionHouseRadioStationChange": "住宅电台已设置为 {1} ({2})",
"ActionVehicleRadioStationChange": "changes the vehicle radio station to {1} ({2})", "ActionVehicleRadioStationChange": "载具电台已设置为 {1} ({2})",
"ActionItemRadioStationChange": "changes the {1}'s station to {2} ({3})", "ActionItemRadioStationChange": "{1} 的电台已设置为 {2} ({3})",
"RandomVehicleCommandsDisabled": "This is a random traffic vehicle and commands can't be used for it.", "RandomVehicleCommandsDisabled": "这是一辆随机刷出的街车,无法对其使用指令。",
"HouseDoorLock": "House {1} {2}!", "HouseDoorLock": "住宅 {1} {2}!",
"BusinessDoorLock": "Business {1} {2}!", "BusinessDoorLock": "企业 {1} {2}!",
"ServerGameModeRestarting": "The server game mode is restarting!", "ServerGameModeRestarting": "游戏模式正在重启!",
"HeaderSelfItemList": "Your Inventory", "HeaderSelfItemList": "你的库存",
"HeaderPlayerItemList": "Player Inventory ({1})", "HeaderPlayerItemList": "玩家库存 ({1})",
"HeaderHouseItemList": "House Inventory", "HeaderHouseItemList": "住宅库存",
"HeaderBusinessFloorItemList": "Business Inventory (For Sale)", "HeaderBusinessFloorItemList": "企业库存 (供售)",
"HeaderBusinessStorageItemList": "Business Inventory (Storage)", "HeaderBusinessStorageItemList": "企业库存 (暂存)",
"HeaderItemItemList": "{1}'s Inventory", "HeaderItemItemList": "{1} 的库存",
"ItemSlotNotNumber": "The item slot must be a number", "ItemSlotNotNumber": "物体槽位必须为整数",
"ItemSlotMustBeBetween": "The item slot must be between {1} and {2}!", "ItemSlotMustBeBetween": "物体槽位应在 {1} {2} 之间!",
"UseItemBugged": "The item you're trying to use is bugged. A bug report has been sent to the server developers.", "UseItemBugged": "尝试操作的物品出现错误!错误报告已发送给服务器开发人员。",
"PickupItemBugged": "The item you're trying to pickup is bugged. A bug report has been sent to the server developers.", "PickupItemBugged": "尝试拾取的物品出现错误!错误报告已发送给服务器开发人员。",
"DropItemBugged": "The item you're trying to drop is bugged. A bug report has been sent to the server developers.", "DropItemBugged": "尝试丢弃的物品出现错误!错误报告已发送给服务器开发人员。",
"HandsBusy": "Your hands are busy", "HandsBusy": "操作繁忙",
"CantUseItemInSkinChange": "You can't use an item while customizing your appearance", "CantUseItemInSkinChange": "自定义外观时无法使用该物品",
"CantDropItemInSkinChange": "You can't drop an item while customizing your appearance", "CantDropItemInSkinChange": "自定义外观时无法丢弃该物品",
"CantPickupItemInSkinChange": "You can't pickup an item while customizing your appearance", "CantPickupItemInSkinChange": "自定义外观时无法拾取物品",
"CantSwitchItemInSkinChange": "You can't switch an item while customizing your appearance", "CantSwitchItemInSkinChange": "自定义外观时无法切换物品",
"CantGiveItemInSkinChange": "You can't give an item while customizing your appearance", "CantGiveItemInSkinChange": "自定义外观时无法赠送物品",
"CantTakeItemInSkinChange": "You can't take an item while customizing your appearance", "CantTakeItemInSkinChange": "自定义外观时无法取出物品",
"ItemUnequippableNoAmmo": "The {1} in slot {2} has no ammo, and can't be equipped!", "ItemUnequippableNoAmmo": "槽位 {2} {1} 弹药耗尽,无法装备!",
"NoSpaceSelfInventory": "You don't have any more space in your inventory", "NoSpaceSelfInventory": "库存已无更多空间",
"Business": "business", "Business": "企业",
"House": "house", "House": "住宅",
"Clan": "clan", "Clan": "帮派",
"Vehicle": "vehicle", "Vehicle": "载具",
"Item": "item", "Item": "物品",
"ItemType": "item type", "ItemType": "物品种类",
"Gate": "gate", "Gate": "大门",
"Door": "door", "Door": "",
"ClanRank": "clan rank", "ClanRank": "帮派等级",
"JobRank": "job rank", "JobRank": "职业等级",
"RadioStation": "radio station", "RadioStation": "电台",
"Months": [ "Months": [
"January", "一月",
"February", "二月",
"March", "三月",
"April", "四月",
"May", "五月",
"June", "六月",
"July", "七月",
"August", "八月",
"September", "九月",
"October", "十月",
"November", "十一月",
"December" "十二月"
], ],
"WeekDays": [ "WeekDays": [
"Sunday", "周日",
"Monday", "周一",
"Tuesday", "周二",
"Wednesday", "周三",
"Thursday", "周四",
"Friday", "周五",
"Saturday" "周六"
], ],
"CardinalDirections": [ "CardinalDirections": [
"North", "",
"Northeast", "东北",
"East", "",
"Southeast", "东南",
"South", "",
"Southwest", "西南",
"West", "西",
"Northwest" "西北"
], ],
"NewPlayerReadyToPlay": [ "NewPlayerReadyToPlay": [
"You have been given some cash. Use {1} to find places to buy items.", "你得到了一些现金,使用 {1} 以找到买东西的地方。",
"If you need money, jobs are the yellow dots on the radar.", "赚钱靠劳动,求职请前往雷达上的小黄点。",
"For a car, visit the car dealership. You can also use a rental vehicle near spawn or take the train", "买车可以到汽车经销店,你也可以在出生点附近租车或者直接乘火车。",
"Be sure to read the {1} and use {2} for info." "确保已阅读 {1},使用 {2} 以获取相关信息。"
], ],
"YourCurrentVehicleDeleted": "The vehicle you were in was deleted.", "YourCurrentVehicleDeleted": "你当前乘坐的车辆已被删除。",
"Distance": "Distance", "Distance": "距离",
"Meters": "Meters", "Meters": "",
"Feet": "Feet", "Feet": "英尺",
"Kilometers": "Kilometers", "Kilometers": "公里",
"Miles": "Miles", "Miles": "英里",
"MustBeVehicleDriver": "You must be the driver of the vehicle!", "MustBeVehicleDriver": "你并不是主驾驶!",
"PlayerJoinedServer": "{1} has joined the game from {1}!", "PlayerJoinedServer": "{1} 加入游戏。来自:{1}",
"PlayerLeftServer": "{1} has left the game! ({1})", "PlayerLeftServer": "{1} 退出游戏! ({1})",
"DisconnectReasons": [ "DisconnectReasons": [
"Lost Connection", "失去连接",
"Disconnected", "断开连接",
"Unsupported Client", "不支持的客户端",
"Wrong Game", "游戏错误",
"Incorrect Password", "密码错误",
"Unsupported Executable", "不支持的游戏主程序",
"Disconnected", "断开连接",
"Banned", "已被封禁",
"Failed", "连接失败",
"Invalid Name", "无效的游戏名",
"Crashed" "客户端崩溃"
], ],
"TakeItemFromHouse": "takes a {1} from the house", "TakeItemFromHouse": "从住宅处拿到 {1}",
"TakeItemFromBusinessStorage": "takes a {1} from the business storage", "TakeItemFromBusinessStorage": "从企业仓库拿到 {1}",
"TakeItemFromBusiness": "takes a {1} from the business", "TakeItemFromBusiness": "从企业处拿到 {1}",
"TakeItemFromItem": "takes a {1} from the {2}", "TakeItemFromItem": " {2} 处拿到 {1}",
"TakeItemFromVehicleTrunk": "takes a {1} from the trunk", "TakeItemFromVehicleTrunk": "从后备箱中取出 {1}",
"TakeItemFromVehicleDash": "takes a {1} from the glove compartment", "TakeItemFromVehicleDash": "从杂物箱中取出 {1}",
"JobEquipmentInventoryKeyBindTip": "The job equipment is in your inventory. Press {1} to see them.", "JobEquipmentInventoryKeyBindTip": "工作设备在你的仓库里,按下 {1} 以查看。",
"JobEquipmentInventoryCommandTip": "The job equipment is in your inventory. Use {1} to see them.", "JobEquipmentInventoryCommandTip": "工作设备在你的仓库里,使用 {1} 以查看。",
"AccountHelp": [ "AccountHelp": [
"Do NOT share your password with anybody else. {1} staff will never ask you for your password", "请不要将密码分享给任何人,且{1} 工作人员不会询问你的密码。",
"Use {1} to change your password, and {2} if you forgot it", "使用 {1} 以更改密码,若遗忘密码请使用 {2} 。",
"Some settings you can use: {1}" "可用设定:{1}"
], ],
"VehicleHelp": [ "VehicleHelp": [
"Your personal vehicles will save wherever you or somebody else leaves them!", "你的私人车辆将会在离开车辆时自动保存!",
"Visit dealerships to buy new vehicles (Use {1} for more information)", "前往汽车经销商购买新车 (使用 {1} 获取更多信息)",
"Some commands: {1}", "相关指令:{1}",
"Visit a mechanic garage to repair, colour, and tune up your car! {1} for info" "去修理厂修理、喷漆和改装你的汽车! 使用 {1} 获取相关信息。"
], ],
"VehicleDealershipHelp": [ "VehicleDealershipHelp": [
"Visit a vehicle dealer to buy new vehicles. Use {1} to find one.", "前往汽车经销商购买新车,使用 {1} 可以找一家。",
"At the dealer, enter a car you want to buy, and the price will be shown to you", "在经销商处进入你希望购买的车辆,对应价格将会自动显示。",
"If you want to buy the vehicle, use {1} and you will be given keys to test drive it around the parking lot.", "确定车辆后使用 {1},即可开始试驾。",
"Drive away from the dealership with the new vehicle to confirm the purchase." "驾驶车辆离开经销商以确认购买。"
], ],
"JobHelp": [ "JobHelp": [
"Visit job locations to get a job and earn money. Look for yellow spots on the map", "地图上的黄点为求职处,你可以在那里找工作挣大钱。",
"At a job location, use {1} to get the job. Use {2} to quit your job", "在求职处使用 {1} 以获得工作,不想干了就使用 {2} 跑路。",
"Use {1} to begin working. You can also get a job {2} and {3}", "使用 {1} 即开始工作,你也可以在 {2} {3} 中获得工作。",
"Most job vehicles are locked. Use {1} near one to enter it.", "工作专用车一般都是锁着的,在其旁边使用 {1} 即可进入。",
"When entering a job vehicle, information on how to do the job will be shown to you." "进入专用车时,将向您显示有关如何执行工作的信息。"
], ],
"ChatHelp": [ "ChatHelp": [
"There are two main types of chat: out-of-character (OOC) and in-character (IC)", "聊天方式主要有两种:本我意识 (OOC 即 out-of-character) 和 角色意识 (IC 即 in-character)",
"Mixing these two types is not proper roleplay. See {1} for info.", "在玩角色扮演的时候最好不要混用两种聊天方式,查看 {1} 以获取更多信息。",
"Some chat commands: {1}", "聊天指令:{1}",
"Some have shorter names available ({1} to talk, {2} to shout, etc)" "某些玩家有可用的更简短的名称 ({1} 用以正常交流, {2} 用以喊话等)"
], ],
"ServerRulesHelp": [ "ServerRulesHelp": [
"Unrealistic actions (powergaming) are not allowed. You aren't superman.", "不允许不切实际的行为 (powergaming),你拯救不了世界。",
"No terrorist or terrorism roleplay is allowed.", "不允许恐怖分子或恐怖主义式角色扮演。",
"Always follow instructions given by moderators and admins.", "请始终遵循版主和管理员的指示。",
"Do not mix the chats (metagaming). You can't use info in IC that was received OOC", "不建议混合式聊天 (metagaming) 你不能在IC中使用收到OOC的信息。",
"Keep English in main chats. If you aren't good at English, use {1}" "请使用英语与其他玩家进行交流,不大擅长英语的话可以试试 {1}"
], ],
"AnimationHelp": [ "AnimationHelp": [
"Animations allow you to enhance roleplay with visual actions", "做出虚拟动作可以提升你角色扮演的游戏体验。",
"Use {1} or {2} with a name to use an animation.", "使用 {1} {2} + 动作名称 以做出一个动作。",
"To see a list of animations, use {1}" "要查看动作列表,使用 {1}"
], ],
"WeaponHelp": [ "WeaponHelp": [
"Visit an gun store to buy weapons. Use {1} to find one.", "前往枪店购买武器,使用 {1} 可以找一家。",
"Buying a weapon requires a weapon license.", "购买武器是需要武器许可证的。",
"Weapon licenses are managed by the police department. Apply there to get one.", "而武器许可证由警察局管理,在那里申请就可以办到一张。",
"Weapons can also be purchased illegally from some businesses, weapon dealers, and clans." "武器也可以从一些企业、武器经销商和帮派那里非法购买。"
], ],
"SkinHelp": [ "SkinHelp": [
"At a clothing store, use {1} to purchase clothes", "在服装店里使用 {1} 即可买到衣服",
"When you have a clothing item, equip and use it like any other item to show the skin selection (check {1} to learn how to use items)", "当你拥有可穿戴式物品时,像其它物品一样直接装备即可。(查看 {1} 以了解如何使用物品)",
"Some skins are restricted to jobs, clans, or for other reasons." "某些服装将因工作、帮派或其它原因而受到限制。"
], ],
"KeyBindHelp": [ "KeyBindHelp": [
"You can set your own key binds. Use {1} to see your binded keys.", "你可以自定义快捷键,使用 {1} 以查看已绑定的按键。",
"Use {1} to add a new keybind and {2} to remove one.", "使用 {1} 以新增快捷键,{2} 以移除。",
"Default keys are: {1} for vehicle engine, {1} for lights, and {3} for lock/unlock", "默认按键如下: {1} 发动引擎,{2} 车灯开关,{3} 锁车/解锁",
"Press {1} to see your items and {2} to equip an item or {3} to unequip all.", "按下 {1} 查看你的物品,{2} 装备选定物品,{3} 卸下所有物品",
"Press {1} to use the item you're holding, press {2} to drop it, or press {3} to pickup an item from the ground." "按下 {1} 使用当前物品,{2} 丢弃当前物品,{3} 拾取地面物品"
], ],
"BusinessHelp": [ "BusinessHelp": [
"Use {1} to purchase items or {2} to see a list of what's for sale at any business", "使用 {1} 以购买物品,或者使用 {2} 以查看任意企业的待售物品列表。",
"Businesses are shown with blue names above the icon at their entrance.", "企业名称以蓝色字体显示在图标上方。",
"Business owner commands: {1}", "企业主可用的指令:{1}",
"A new car for sale will appear when you drive away from the dealer." "一辆待售的新车会在你开车离开经销商(即确认购买)后出现。"
], ],
"ClanHelp": [ "ClanHelp": [
"Ask an administrator to create a clan (Similar to factions/groups/families)", "请求管理员以创建一个属于你自己的帮派 (类似于派系/团体/家庭)",
"Clan owners have full control over their clan once it's created", "帮派创建成功后,帮主将拥有其所有控制权。",
"Clan commands: {1}", "帮派指令:{1}",
"More clan commands: {1}" "更多帮派指令:{1}"
], ],
"RadioStationHelp": [ "RadioStationHelp": [
"Use {1} to set the station for your vehicle, house, or business", "使用 {1} 为你的车辆/住宅/企业设置电台",
"Use {2} to see a list of stations", "使用 {2} 以查看电台列表",
"You can change your radio streaming volume using {1} with 0-100 as the percent" "你可以使用 {1} 来改变电台音量大小。0-100%"
], ],
"WealthAndTaxHelp": [ "WealthAndTaxHelp": [
"Your taxes on payday are {1} percent of your calculated wealth.", "发薪日那天需要缴税,而税款是你计算财富的 {1}%.",
"Your calculated wealth is a total sum based on how many vehicles, houses, and businesses you have.", "计算财富是基于你所拥有的车辆、住宅和企业的总和。",
"Each vehicle is {1}, each house is {2}, and each business is {3}", "{1} 每辆车,{2} 每栋房,{3} 每个企业。",
"Use {1} to see your current wealth, and {2} to see how much you'll pay in tax each payday" "使用 {1} 以查看你的当前财富,{2} 以查看发薪日当天你应当缴纳的税款。"
], ],
"MustBeInAVehicle": "You need to be in a vehicle!", "MustBeInAVehicle": "你必须先坐在一辆车上!",
"MustBeInOrNearVehicle": "You need to be in or near a vehicle!", "MustBeInOrNearVehicle": "必须要有辆车在你旁边,或者你坐上那辆车!",
"MustBeInVehicleFrontSeat": "You need to be in the vehicle front seats!", "MustBeInVehicleFrontSeat": "你必须坐在车辆前排座椅上!",
"MustBeInVehicleDriverSeat": "You need to be the driver!", "MustBeInVehicleDriverSeat": "你必须是车辆主驾驶!",
"DontHaveVehicleKey": "You don't have a key for this vehicle!", "DontHaveVehicleKey": "你并没有这车的钥匙!",
"NoGateAccess": "You don't have access to this gate!", "NoGateAccess": "你无法进入这个大门。",
"GateBroken": "This gate is broken!", "GateBroken": "这门已是破烂不堪。",
"GateHacked": "The gate does not respond!", "GateHacked": "大门没什么反应。",
"RadioJammed": "You hear only static from the radio.", "RadioJammed": "电台似是被干扰了。",
"VehicleNotForSale": "This vehicle is not for sale!", "VehicleNotForSale": "本车不出售!",
"VehicleNotForRent": "This vehicle is not for rent!", "VehicleNotForRent": "本车不出租!",
"BusinessNotForSale": "This business is not for sale!", "BusinessNotForSale": "本企业不出售!",
"BusinessNotForRent": "This business is not for rent!", "BusinessNotForRent": "本企业不出租!",
"HouseNotForSale": "This house is not for sale!", "HouseNotForSale": "这房子不给卖!",
"HouseNotForRent": "This house is not for rent!", "HouseNotForRent": "这房子不给租!",
"DealershipPurchaseTestDrive": "Drive the vehicle away from the dealership to buy it, or get out to cancel.", "DealershipPurchaseTestDrive": "将车辆驶离经销商处以确认购买,下车取消。",
"DealershipPurchaseExitedVehicle": "You canceled the vehicle purchase by exiting the vehicle!", "DealershipPurchaseExitedVehicle": "已取消车辆购买。",
"VehiclePurchaseComplete": "This vehicle is now yours! It will save wherever you leave it.", "VehiclePurchaseComplete": "这辆车现在是你的了!不管它在哪里都会自动保存。",
"VehiclePurchaseNotEnoughMoney": "You don't have enough money to buy this vehicle!", "VehiclePurchaseNotEnoughMoney": "你没有足够的钱买这辆车!",
"HousePurchaseNotEnoughMoney": "You don't have enough money to buy this house!", "HousePurchaseNotEnoughMoney": "你没有足够的钱买这所房子!",
"BusinessPurchaseNotEnoughMoney": "You don't have enough money to buy this business!", "BusinessPurchaseNotEnoughMoney": "你没有足够的钱来买这家企业!",
"Locales": { "Locales": {
"English": "English", "English": "英文",
"Russian": "Russian", "Russian": "俄文",
"Spanish": "Spanish", "Spanish": "西班牙文",
"German": "German", "German": "德文",
"Dutch": "Dutch", "Dutch": "荷兰文",
"Polish": "Polish" "Polish": "波兰文",
"Chinese": "中文"
}, },
"ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.", "ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
"HeaderPlayerHousesList": "Player Houses ({1})", "HeaderPlayerHousesList": "玩家住宅 ({1})",
"HeaderPlayerStaffFlagsList": "Player Staff Flags ({1})", "HeaderPlayerStaffFlagsList": "玩家信号旗 ({1})",
"HeaderStaffFlagsList": "Staff Flags", "HeaderStaffFlagsList": "信号旗",
"NonRPName": "Non-RP name! Choose a new one:", "NonRPName": "非角色扮演名称!请选择新的名称:",
"InvalidStaffFlag": "Staff flag not found!", "InvalidStaffFlag": "信号旗帜不存在!",
"InvalidClanFlag": "Clan flag not found!", "InvalidClanFlag": "帮派旗帜不存在!",
"InvalidLocale": "Language not found!", "InvalidLocale": "语言不存在!",
"HeaderJobUniformList": "Job Uniforms ({1})", "HeaderJobUniformList": "工作制服 ({1})",
"HeaderJobEquipmentList": "Job Equipment ({1})", "HeaderJobEquipmentList": "工作设备 ({1})",
"InvalidJobUniform": "Job uniform not found!", "InvalidJobUniform": "工作制服不存在!",
"InvalidJobEquipment": "Job equipment not found!", "InvalidJobEquipment": "工作设备不存在!",
"HeaderVehiclesInRangeList": "Vehicles within {1}", "HeaderVehiclesInRangeList": "{1} 内的车辆",
"NoVehiclesWithInRange": "There are no vehicles within {1}", "NoVehiclesWithInRange": "{1} 内无任何车辆。",
"AmountNotNumber": "The amount must be a number!", "AmountNotNumber": "请输入有效数字!",
"NeedToBeWorking": "You need to be working! Use {1} at a job location or near a job vehicle.", "NeedToBeWorking": "你得去工作!在求职处或工作专用车旁使用 {1} 。",
"NeedToBeOnJobRoute": "You need to be doing a job route! Use {1} in a job vehicle", "NeedToBeOnJobRoute": "你需要进行一个工作路线!请在工作专用车内使用 {1} 。",
"CurrentJobRouteDeleted": "The job route you were on has been deleted by an admin", "CurrentJobRouteDeleted": "管理员已删除你所在的工作路线",
"CurrentJobRouteVehicleColoursChanged": "Your job route's vehicle colours were changed by an admin", "CurrentJobRouteVehicleColoursChanged": "管理员已更改你的工作路线的车辆颜色",
"NotYourJob": "This is not your job!", "NotYourJob": "这不是你的工作!",
"JobPoints": "You can get a job by going the yellow points on the map.", "JobPoints": "前往地图上的黄点找到工作。",
"QuitJobToTakeAnother": "If you want this job, use {1} to quit your current job.", "QuitJobToTakeAnother": "要是想干这行,先使用 {1} 离开当前工作。",
"NotAJobVehicle": "This is not a job vehicle!", "NotAJobVehicle": "这并不是辆工作专用车!",
"NotYourJobVehicle": "This is not your job's vehicle!", "NotYourJobVehicle": "这不是你工作用的车!",
"JobRouteDisabled": "The job route you were on has been disabled by an admin", "JobRouteDisabled": "管理员已禁用你的工作路线",
"HeaderPickupTypes": "Pickup Types", "HeaderPickupTypes": "拾取物类型",
"HeaderBlipTypes": "Map Icon Types", "HeaderBlipTypes": "地图图标类型",
"InvalidGPSLocation": "There are no locations with that name or type", "InvalidGPSLocation": "没有具有该名称或类型的位置",
"HeaderBusinessList": "Businesses", "HeaderBusinessList": "企业",
"VehicleForSale": "This {1} is buyable for {2}! Use {3} if you want to buy it", "VehicleForSale": " {1} 可被 {2} 购买到!购买请使用 {3}",
"VehicleForRent": "This {1} is rentable for {2}! Use {3} if you want to rent it", "VehicleForRent": " {1} 可被 {2} 租用!租用请使用 {3}",
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.", "ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
"LoginFailedInvalidPassword": "Invalid password! {1} attempts remaining", "LoginFailedInvalidPassword": "密码错误!还有 {1} 次尝试机会。",
"LoginFailedNoPassword": "You must enter a password! ! {1} attempts remaining", "LoginFailedNoPassword": "密码不能为空!还有 {1} 次尝试机会。",
"RegistrationFailedNoPassword": "You must enter a password!", "RegistrationFailedNoPassword": "密码不能为空!",
"RegistrationFailedNoPasswordConfirm": "You must confirm the password!", "RegistrationFailedNoPasswordConfirm": "确认密码不能为空!",
"RegistrationFailedNoEmail": "You must enter an email!", "RegistrationFailedNoEmail": "电子邮件不能为空!",
"AccountNameAlreadyRegistered": "Your name is already registered!", "AccountNameAlreadyRegistered": "该游戏名已被注册。",
"AlreadyLoggedIn": "You are already logged in!", "AlreadyLoggedIn": "您已登录过账号!",
"RegistrationFailedInvalidEmail": "That email is invalid!", "RegistrationFailedInvalidEmail": "该电子邮件无效!",
"RegistrationFailedPasswordMismatch": "The passwords don't match!", "RegistrationFailedPasswordMismatch": "密码不匹配!",
"RegistrationFailedCreateError": "Your account couldn't be created!", "RegistrationFailedCreateError": "无法创建您的帐户!",
"RegistrationSuccess": "Your account has been created!", "RegistrationSuccess": "账号创建成功!",
"RegistrationEmailVerifyReminder": "Don't forget to verify your email! A verification code has been sent to you.", "RegistrationEmailVerifyReminder": "验证码已发送至您的电子邮件,请前往进行验证。",
"RegistrationCreateCharReminder": "To play on the server, you will need to make a character.", "RegistrationCreateCharReminder": "在正式游玩之前,您需要创建一个角色。",
"NoCharactersGUIMessage": "You have no characters. Would you like to make one?", "NoCharactersGUIMessage": "暂无角色。要创建一个吗?",
"NoCharactersGUIWindowTitle": "No characters", "NoCharactersGUIWindowTitle": "无角色",
"NoCharactersChatMessage": "You have no characters. Use {1} to make one.", "NoCharactersChatMessage": "暂无角色。使用 {1} 新建一个角色。",
"NeedEmailFor2FA": "You need to add your email to your account to use two-factor authentication.", "NeedEmailFor2FA": "开启双重验证前,请先添加您的电子邮件。",
"NeedEmailVerifiedFor2FA": "You need to verify your email to use two-factor authentication.", "NeedEmailVerifiedFor2FA": "开启双重验证前,请先验证您的电子邮件。",
"SetEmailHelpTip": "Use {1} to set your email.", "SetEmailHelpTip": "使用 {1} 以设置您的电子邮件。",
"VerifyEmailHelpTip": "Use {1} to verify your email.", "VerifyEmailHelpTip": "使用 {1} 以验证您的电子邮件。",
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.", "ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
"NearbyRadio": "Nearby radio", "NearbyRadio": "附近电台",
"FromRadio": "From radio", "FromRadio": "起始电台",
"ToRadio": "To radio", "ToRadio": "终止电台",
"NeedToEnterPropertyCommand": "You need to enter the {1} first! Use {2} to enter and exit", "NeedToEnterPropertyCommand": "你得先进入 {1} !使用 {2} 以进入或退出。",
"NeedToEnterPropertyKeyPress": "You need to enter the {1} first! Press {2} to enter and exit", "NeedToEnterPropertyKeyPress": "你得先进入 {1} !使用 {2} 以进入或退出。",
"InventoryFullCantCarry": "You don't have any space to carry this (full inventory)!", "InventoryFullCantCarry": "库存已满!",
"NotEnoughCashNeedAmountMore": "You don't have enough money! You need {1} more!", "NotEnoughCashNeedAmountMore": "没有足够现金!你需要多加 {1} ",
"AmountMustBeMoreThan": "The amount must be more than {1}!", "AmountMustBeMoreThan": "数额必须大于 {1}",
"WeaponBanned": "You are not allowed to buy or use weapons!", "WeaponBanned": "你已被禁止购买及使用武器!",
"TimeNotNumber": "The time must be a number", "TimeNotNumber": "设定的时间非有效数值",
"HeaderDefaultBusinessItemTypes": "Business Item Templates", "HeaderDefaultBusinessItemTypes": "企业项目模板",
"FixingStuck": "Fixing your position and virtual world ...", "FixingStuck": "修复你当前的位置和虚拟世界 ...",
"CantUseCommandYet": "You must wait before you can use this command again!", "CantUseCommandYet": "稍后才能再次使用该指令!",
"NotATester": "You are not a tester!", "NotATester": "非测试者",
"AccessDenied": "AccessDenied", "AccessDenied": "拒绝访问",
"InvalidSkin": "That skin is invalid!", "InvalidSkin": "该皮肤无效!",
"HeaderInteriorTypes": "Interiors List", "HeaderInteriorTypes": "内部场景列表",
"ViewInventoryKeyPressTip": "Press {1} to see your items", "ViewInventoryKeyPressTip": "按下 {1} 以查看你的全部物品",
"ViewInventoryCommandTip": "Use {1} to see your items" "ViewInventoryCommandTip": "使用 {1} 以查看你的全部物品",
"GUIAccountSettingToggle": "已切换至 {1} GUI",
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
"CarCommandHelp": "前往汽车经销商购买新车,使用 {1} 以获取更多信息。",
"SkinCommandHelp": "前往服装店购买新衣服,使用 {1} 以获取更多信息。",
"BusinessVehiclesRespawned": "管理员已重置所有企业车辆!",
"JobVehiclesRespawned": "管理员已重置所有工作车辆!",
"PlayerVehiclesRespawned": "管理员已重置所有玩家车辆!",
"ClanVehiclesRespawned": "管理员已重置所有帮派车辆!",
"PublicVehiclesRespawned": "管理员已重置所有公众!",
"EmptyVehiclesRespawned": "管理员已重置所有空闲车辆!",
"AllVehiclesRespawned": "管理员已重置所有车辆!",
"AllVehiclesReloaded": "管理员已重载所有车辆!",
"YourVehicleRespawned": "你的车辆已重生!",
"PlayerIPBanned": "{1} 被封禁 IP",
"PlayerCharacterBanned": "{1} 被封禁角色!",
"PlayerSubNetBanned": "{1} 被封禁网段!",
"CantModifyBusiness": "你无法操作或修改这个企业!",
"CantModifyHouse": "你无法操作或修改此住宅!",
"ServerTimeSet": "{1} 已将时间设定为 {2}",
"ServerWeatherSet": "{1} 已将天气设定为 {2}",
"ServerSnowSet": "{1} 已调整:落雪-{2},积雪-{3}",
"AllJobsReloaded": "管理员已重置所有职业!",
"ServerLogoSet": "{1} 已设定:服务器 LOGO 状态-{2}",
"ServerGUISet": "{1} 已设定:服务器 GUI 状态-{2}",
"ServerBusinessBlipsSet": "{1} 已设定:服务器企业图例显示状态-{2}",
"ServerHouseBlipsSet": "{1} 已设定:服务器住宅图例显示状态-{2}",
"ServerJobBlipsSet": "{1} 已设定:服务器职业图例显示状态-{2}",
"ServerBusinessPickupsSet": "{1} 已设定:服务器企业拾取物状态-{2}",
"ServerHousePickupsSet": "{1} 已设定:服务器住宅拾取物状态-{2}",
"ServerJobPickupsSet": "{1} 已设定:服务器职业拾取物状态-{2}",
"BusinessBuyItemsLabel": "使用 {1} 以购买物品",
"PropertyEnterCommandLabel": "使用 {1} 以进入",
"PropertyEnterKeyPressLabel": "按下 {1} 以进入",
"PropertyForSaleLabel": "售价:${1}",
"PropertyForRentLabel": "租价:每个发薪日需 ${1}",
"RemainingTaxPaidInMoney": "你以 ${1} 现金支付了剩下的税款",
"LostMoneyFromTaxes": "你应缴纳的税款超过了你的薪水!",
"NextPaycheckRepossessionWarning": "若无足够的现金来支付下一份薪水的税款,你将失去一些资产!",
"NotEnoughMoneyForTax": "没有足够的现金来支付税款",
"AssetsRepossessedForTax": "因未缴纳税款,你已失去 {1} 辆车,{2} 处住宅,{3} 处企业!",
"Closed": "Closed",
"Open": "Open",
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
"TakeJobLabel": "Use {1} to work here",
"StartWorkLabel": "Use {1} to start working",
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
"JobLabel": "{1} Job",
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
"AllHousesReloaded": "All houses have been reloaded by an admin",
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
"PlayerKicked": "{1} has been kicked from the server",
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
"UnableToDoThat": "You aren't able to do that",
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
"SetVehicleClanConfirmTitle": "Warning!",
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
"SetItemPriceBelowOrderPriceTitle": "Warning!",
"MustOwnVehicle": "You don't own this vehicle!"
} }

View File

@@ -1,6 +1,7 @@
{ {
"TranslationProvidedBy": "Vortrex", "TranslationProvidedBy": "Vortrex",
"LocaleEnglishName": "English", "LocaleEnglishName": "English",
"LocaleNativeName": "English", "LocaleNativeName": "English",
"LocaleOffer": "This server is available in English. Use {1} to use it.", "LocaleOffer": "This server is available in English. Use {1} to use it.",
"LocaleChanged1": "Your language is now set to {1}", "LocaleChanged1": "Your language is now set to {1}",
@@ -10,9 +11,9 @@
"HeaderHelpMainList": "Help Categories", "HeaderHelpMainList": "Help Categories",
"AccentNotFound": "Accent not found", "AccentNotFound": "Accent not found",
"AccentSet": "You set your accent to {1}", "AccentSet": "You set your accent to {1}",
"AnimationNotFound": "That animation doesn't exist", "InvalidAnimation": "That animation doesn't exist",
"AnimationCommandTip": "Use {1} to see a list of valid animations", "AnimationCommandTip": "Use {1} to see a list of valid animations",
"AnimationInvalidDistance": "The distance must be between 0 and 3", "InvalidAnimationDistance": "The distance must be between 0 and 3",
"AnimationStopCommandTip": "Use {1} to stop your animation", "AnimationStopCommandTip": "Use {1} to stop your animation",
"CantBanClient": "You cannot ban this person", "CantBanClient": "You cannot ban this person",
"PlayerAccountBanned": "{1} has been account banned", "PlayerAccountBanned": "{1} has been account banned",
@@ -263,7 +264,7 @@
"KeyBindHelp": [ "KeyBindHelp": [
"You can set your own key binds. Use {1} to see your binded keys.", "You can set your own key binds. Use {1} to see your binded keys.",
"Use {1} to add a new keybind and {2} to remove one.", "Use {1} to add a new keybind and {2} to remove one.",
"Default keys are: {1} for vehicle engine, {1} for lights, and {3} for lock/unlock", "Default keys are: {1} for vehicle engine, {2} for lights, and {3} for lock/unlock",
"Press {1} to see your items and {2} to equip an item or {3} to unequip all.", "Press {1} to see your items and {2} to equip an item or {3} to unequip all.",
"Press {1} to use the item you're holding, press {2} to drop it, or press {3} to pickup an item from the ground." "Press {1} to use the item you're holding, press {2} to drop it, or press {3} to pickup an item from the ground."
], ],
@@ -393,5 +394,65 @@
"InvalidSkin": "That skin is invalid!", "InvalidSkin": "That skin is invalid!",
"HeaderInteriorTypes": "Interiors List", "HeaderInteriorTypes": "Interiors List",
"ViewInventoryKeyPressTip": "Press {1} to see your items", "ViewInventoryKeyPressTip": "Press {1} to see your items",
"ViewInventoryCommandTip": "Use {1} to see your items" "ViewInventoryCommandTip": "Use {1} to see your items",
"GUIAccountSettingToggle": "You have turned {1} GUI",
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
"BusinessVehiclesRespawned": "🚗 All business vehicles have been respawned by an admin!",
"JobVehiclesRespawned": "🚗 All job vehicles have been respawned by an admin!",
"PlayerVehiclesRespawned": "🚗 All player vehicles have been respawned by an admin!",
"ClanVehiclesRespawned": "🚗 All clan vehicles have been respawned by an admin!",
"PublicVehiclesRespawned": "🚗 All public have been respawned by an admin!",
"EmptyVehiclesRespawned": "🚗 All empty vehicles have been respawned by an admin!",
"AllVehiclesRespawned": "🚗 All vehicles have been respawned by an admin!",
"AllVehiclesReloaded": "🚗 All vehicles have been reloaded by an admin!",
"YourVehicleRespawned": "🚗 Your vehicle has been respawned!",
"PlayerIPBanned": "💀 {1} has been IP banned!",
"PlayerCharacterBanned": "💀 {1} has been character banned!",
"PlayerSubNetBanned": "💀 {1} has been subnet banned!",
"CantModifyBusiness": "You can't manage or modify this business!",
"CantModifyHouse": "You can't manage or modify this house!",
"ServerTimeSet": "⏰ {1} set the time to {2}",
"ServerWeatherSet": "☁️ {1} set the weather to {2}",
"ServerSnowSet": "❄️ {1} turned falling snow {2} and ground snow {3}",
"AllJobsReloaded": "💼 All server jobs have been reloaded by an admin",
"ServerLogoSet": "{1} turned the server logo image {2}",
"ServerGUISet": "🗔 {1} turned GUI for this server {2}",
"ServerBusinessBlipsSet": "🏢 {1} turned all business blips {2}",
"ServerHouseBlipsSet": "🏘️ {1} turned all house blips {2}",
"ServerJobBlipsSet": "💼 {1} turned all job blips {2}",
"ServerBusinessPickupsSet": "🏢 {1} turned all business pickups {2}",
"ServerHousePickupsSet": "🏘️ {1} turned all house pickups {2}",
"ServerJobPickupsSet": "💼 {1} turned on all job pickups {2}",
"BusinessBuyItemsLabel": "Use {1} to purchase items",
"PropertyEnterCommandLabel": "Use {1} to enter",
"PropertyEnterKeyPressLabel": "Press {1} to enter",
"PropertyForSaleLabel": "For sale: ${1}",
"PropertyForRentLabel": "For rent: ${1} every payday",
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
"Closed": "Closed",
"Open": "Open",
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
"TakeJobLabel": "Use {1} to work here",
"StartWorkLabel": "Use {1} to start working",
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
"JobLabel": "{1} Job",
"PaydayBonusSet": "🤑 {1} set the payday bonus to ${2}",
"AllHousesReloaded": "🏘️ All houses have been reloaded by an admin",
"AllRadioStationsReloaded": "📻 All radio stations have been reloaded by an admin!",
"PlayerKicked": "🦶 {1} has been kicked from the server",
"AllBusinessesReloaded": "🏢 All businesses have been reloaded by an admin!",
"UnableToDoThat": "You aren't able to do that",
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
"SetVehicleClanConfirmTitle": "Warning!",
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
"SetItemPriceBelowOrderPriceTitle": "Warning!",
"MustOwnVehicle": "You don't own this vehicle!"
} }

View File

@@ -1,6 +1,7 @@
{ {
"TranslationProvidedBy": "Suprise444", "TranslationProvidedBy": "Suprise444",
"LocaleEnglishName": "Polish", "LocaleEnglishName": "Polish",
"LocaleNativeName": "Polski", "LocaleNativeName": "Polski",
"LocaleOffer": "Ten serwer jest dostępny w języku Polskim. Użyj {1} aby go użyć.", "LocaleOffer": "Ten serwer jest dostępny w języku Polskim. Użyj {1} aby go użyć.",
"LocaleChanged1": "Twój język jest ustawiony na {1}", "LocaleChanged1": "Twój język jest ustawiony na {1}",
@@ -10,9 +11,9 @@
"HeaderHelpMainList": "Pomoc - Kategorie", "HeaderHelpMainList": "Pomoc - Kategorie",
"AccentNotFound": "Akcent nie znaleziony", "AccentNotFound": "Akcent nie znaleziony",
"AccentSet": "Ustawiłeś swój akcent na {1}", "AccentSet": "Ustawiłeś swój akcent na {1}",
"AnimationNotFound": "Ta animcja nie istnieje", "InvalidAnimation": "Ta animcja nie istnieje",
"AnimationCommandTip": "Użyj {1} aby zobaczyć listę działających animacji", "AnimationCommandTip": "Użyj {1} aby zobaczyć listę działających animacji",
"AnimationInvalidDistance": "Dystans musi być między 0 i 3", "InvalidAnimationDistance": "Dystans musi być między 0 i 3",
"AnimationStopCommandTip": "Użyj {1} aby zatrzymać swoją animacje", "AnimationStopCommandTip": "Użyj {1} aby zatrzymać swoją animacje",
"CantBanClient": "Nie możesz zbanować tej osoby", "CantBanClient": "Nie możesz zbanować tej osoby",
"PlayerAccountBanned": "{1} został zbanowany", "PlayerAccountBanned": "{1} został zbanowany",
@@ -263,7 +264,7 @@
"KeyBindHelp": [ "KeyBindHelp": [
"Możesz zmienić przypisania klawiszy. Użyj {1} aby zobaczyć twoje przypisane klawisze.", "Możesz zmienić przypisania klawiszy. Użyj {1} aby zobaczyć twoje przypisane klawisze.",
"Użyj {1} aby dodać nowe przypisanie i {2} aby je usunąć.", "Użyj {1} aby dodać nowe przypisanie i {2} aby je usunąć.",
"Domyślnymi przyciskami są: {1} aby uruchomić pojazd, {1} aby użyć świateł, and {3} aby otworzyć/zamknąć pojazd", "Domyślnymi przyciskami są: {1} aby uruchomić pojazd, {2} aby użyć świateł, and {3} aby otworzyć/zamknąć pojazd",
"Naciśnij {1} aby zobaczyć swoje itemy i {2} aby wyposażyć się w jakiś przedmiot lub {3} aby go schować.", "Naciśnij {1} aby zobaczyć swoje itemy i {2} aby wyposażyć się w jakiś przedmiot lub {3} aby go schować.",
"Naciśnij {1} aby użyć przedmiot, który trzymasz, naciśnij {2} aby go upuścić lub naciśnij {3} aby podnieść jakiś przedmiot z ziemi." "Naciśnij {1} aby użyć przedmiot, który trzymasz, naciśnij {2} aby go upuścić lub naciśnij {3} aby podnieść jakiś przedmiot z ziemi."
], ],
@@ -393,5 +394,65 @@
"InvalidSkin": "That skin is invalid!", "InvalidSkin": "That skin is invalid!",
"HeaderInteriorTypes": "Interiors List", "HeaderInteriorTypes": "Interiors List",
"ViewInventoryKeyPressTip": "Press {1} to see your items", "ViewInventoryKeyPressTip": "Press {1} to see your items",
"ViewInventoryCommandTip": "Use {1} to see your items" "ViewInventoryCommandTip": "Use {1} to see your items",
"GUIAccountSettingToggle": "You have turned {1} GUI",
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
"YourVehicleRespawned": "Your vehicle has been respawned",
"PlayerIPBanned": "{1} has been IP banned!",
"PlayerCharacterBanned": "{1} has been character banned!",
"PlayerSubNetBanned": "{1} has been subnet banned!",
"CantModifyBusiness": "You can't manage or modify this business",
"CantModifyHouse": "You can't manage or modify this house",
"ServerTimeSet": "{1} set the time to {2}",
"ServerWeatherSet": "{1} set the weather to {2}",
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
"ServerLogoSet": "{1} turned the server logo image {2}",
"ServerGUISet": "{1} turned GUI for this server {2}",
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
"ServerJobBlipsSet": "{1} turned all job blips {2}",
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
"BusinessBuyItemsLabel": "Use {1} to purchase items",
"PropertyEnterCommandLabel": "Use {1} to enter",
"PropertyEnterKeyPressLabel": "Press {1} to enter",
"PropertyForSaleLabel": "For sale: ${1}",
"PropertyForRentLabel": "For rent: ${1} every payday",
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
"Closed": "Closed",
"Open": "Open",
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
"TakeJobLabel": "Use /takejob to work here",
"StartWorkLabel": "Use /startwork to start working",
"JobEquipAndUniformLabel": "Use /uniform and /equip for job stuff, or /stopwork to stop working",
"NotYourJobLabel": "You already have a different job. Use /quitjob if you want this one",
"JobLabel": "{1} Job",
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
"AllHousesReloaded": "All houses have been reloaded by an admin",
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
"PlayerKicked": "{1} has been kicked from the server",
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
"UnableToDoThat": "You aren't able to do that",
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
"SetVehicleClanConfirmTitle": "Warning!",
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
"SetItemPriceBelowOrderPriceTitle": "Warning!",
"MustOwnVehicle": "You don't own this vehicle!"
} }

View File

@@ -1,6 +1,7 @@
{ {
"TranslationProvidedBy": "VNDTTS", "TranslationProvidedBy": "VNDTTS",
"LocaleEnglishName": "Russian", "LocaleEnglishName": "Russian",
"LocaleNativeName": "Русский", "LocaleNativeName": "Русский",
"LocaleOffer": "Этот сервер доступен на русском. Используйте {1} чтобы его использовать.", "LocaleOffer": "Этот сервер доступен на русском. Используйте {1} чтобы его использовать.",
"LocaleChanged1": "Ваш язык был установлен на {1}", "LocaleChanged1": "Ваш язык был установлен на {1}",
@@ -10,9 +11,9 @@
"HeaderHelpMainList": "Помощь Категории", "HeaderHelpMainList": "Помощь Категории",
"AccentNotFound": "Не удалось найти акцент", "AccentNotFound": "Не удалось найти акцент",
"AccentSet": "Вы установили свой акцент на {1}", "AccentSet": "Вы установили свой акцент на {1}",
"AnimationNotFound": "Такой анимации не существует", "InvalidAnimation": "Такой анимации не существует",
"AnimationCommandTip": "Используйте {1} чтобы просмотреть список доступных анимаций", "AnimationCommandTip": "Используйте {1} чтобы просмотреть список доступных анимаций",
"AnimationInvalidDistance": "Дистанция должна быть между 0 и 3", "InvalidAnimationDistance": "Дистанция должна быть между 0 и 3",
"AnimationStopCommandTip": "Используйте {1} чтобы остановить анимацию", "AnimationStopCommandTip": "Используйте {1} чтобы остановить анимацию",
"CantBanClient": "Вы не можете забанить этого игрока", "CantBanClient": "Вы не можете забанить этого игрока",
"PlayerAccountBanned": "Аккаунт {1} был заблокирован ", "PlayerAccountBanned": "Аккаунт {1} был заблокирован ",
@@ -263,7 +264,7 @@
"KeyBindHelp": [ "KeyBindHelp": [
"Вы можете сами создавать ваши привязки на кнопки. Используйте {1} чтобы просмотреть ваши привязки.", "Вы можете сами создавать ваши привязки на кнопки. Используйте {1} чтобы просмотреть ваши привязки.",
"Используйте {1} чтобы добавить новую приязку или {2} чтобы убрать ее.", "Используйте {1} чтобы добавить новую приязку или {2} чтобы убрать ее.",
"Стандартные привязки: {1} для мотора, {1} для фар, и {3} для открытия/закрытия", "Стандартные привязки: {1} для мотора, {2} для фар, и {3} для открытия/закрытия",
"Используйте {1} чтобы просмотреть ваши предметы {2} чтобы экипировать предмет или {3} чтобы убрать.", "Используйте {1} чтобы просмотреть ваши предметы {2} чтобы экипировать предмет или {3} чтобы убрать.",
"Используйте {1} чтобы использвать предмет который вы держите в руках, используйте {2} чтобы его выбростить, или используйте {3} чтобы подобрать предмет." "Используйте {1} чтобы использвать предмет который вы держите в руках, используйте {2} чтобы его выбростить, или используйте {3} чтобы подобрать предмет."
], ],
@@ -392,5 +393,65 @@
"InvalidSkin": "That skin is invalid!", "InvalidSkin": "That skin is invalid!",
"HeaderInteriorTypes": "Interiors List", "HeaderInteriorTypes": "Interiors List",
"ViewInventoryKeyPressTip": "Press {1} to see your items", "ViewInventoryKeyPressTip": "Press {1} to see your items",
"ViewInventoryCommandTip": "Use {1} to see your items" "ViewInventoryCommandTip": "Use {1} to see your items",
"GUIAccountSettingToggle": "You have turned {1} GUI",
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
"YourVehicleRespawned": "Your vehicle has been respawned",
"PlayerIPBanned": "{1} has been IP banned!",
"PlayerCharacterBanned": "{1} has been character banned!",
"PlayerSubNetBanned": "{1} has been subnet banned!",
"CantModifyBusiness": "You can't manage or modify this business",
"CantModifyHouse": "You can't manage or modify this house",
"ServerTimeSet": "{1} set the time to {2}",
"ServerWeatherSet": "{1} set the weather to {2}",
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
"ServerLogoSet": "{1} turned the server logo image {2}",
"ServerGUISet": "{1} turned GUI for this server {2}",
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
"ServerJobBlipsSet": "{1} turned all job blips {2}",
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
"BusinessBuyItemsLabel": "Use {1} to purchase items",
"PropertyEnterCommandLabel": "Use {1} to enter",
"PropertyEnterKeyPressLabel": "Press {1} to enter",
"PropertyForSaleLabel": "For sale: ${1}",
"PropertyForRentLabel": "For rent: ${1} every payday",
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
"Closed": "Closed",
"Open": "Open",
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
"TakeJobLabel": "Use {1} to work here",
"StartWorkLabel": "Use {1} to start working",
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
"JobLabel": "{1} Job",
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
"AllHousesReloaded": "All houses have been reloaded by an admin",
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
"PlayerKicked": "{1} has been kicked from the server",
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
"UnableToDoThat": "You aren't able to do that",
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
"SetVehicleClanConfirmTitle": "Warning!",
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
"SetItemPriceBelowOrderPriceTitle": "Warning!",
"MustOwnVehicle": "You don't own this vehicle!"
} }

458
locale/slovak.json Normal file
View File

@@ -0,0 +1,458 @@
{
"TranslationProvidedBy": "ZaKlaus",
"LocaleEnglishName": "Slovak",
"LocaleNativeName": "Slovak",
"LocaleOffer": "This server is available in Slovak. Use {1} to use it.",
"LocaleChanged1": "Your language is now set to {1}",
"LocaleChanged2": "The server will now display messages in {1}",
"LocaleChangedNote": "This does not change messages from other players",
"AccentsListHeader": "Accents",
"HeaderHelpMainList": "Help Categories",
"AccentNotFound": "Accent not found",
"AccentSet": "You set your accent to {1}",
"InvalidAnimation": "That animation doesn't exist",
"AnimationCommandTip": "Use {1} to see a list of valid animations",
"InvalidAnimationDistance": "The distance must be between 0 and 3",
"AnimationStopCommandTip": "Use {1} to stop your animation",
"CantBanClient": "You cannot ban this person",
"PlayerAccountBanned": "{1} has been account banned",
"ClanNotFound": "Clan not found",
"ClanNameTaken": "A clan with that name already exists",
"PlayerNotFound": "Player not found",
"ClanCantRemoveRanks": "You can't remove clan ranks",
"ClanCantAddRanks": "You can't add clan ranks",
"ClanRankNotFound": "Clan rank not found",
"ClanCantChangeMemberTag": "You can not change clan member's tags",
"ClanPlayerNotInSameClan": "That player is not in your clan",
"ClanCantChangeRankLevel": "You can not change clan rank's level",
"ClanCantChangeRankTag": "You can not change clan rank's tags",
"NameNotRegistered": "Your name is not registered! Use {1} to make an account.",
"AutomaticLoginIPToggle": "Automatic login by IP is now {1}",
"CouldNotRegisterAccount": "There was a problem creating your account. Please contact an admin.",
"RandomTipsToggle": "Random tips are now {1}",
"ActionTipsToggle": "Action tips are now {1}",
"AutoSpawnLastCharToggle": "Automatic spawn as last used character is {1}",
"AccountGUISettingToggle": "GUI is now {1}",
"On": "On",
"Off": "Off",
"Yes": "Yes",
"No": "No",
"True": "True",
"False": "False",
"Locked": "Locked",
"Unlocked": "Unlocked",
"PasswordNotGoodEnough": "The new password must meet the requirements!",
"PasswordNeedsBase": "Passwords must have at least {1}",
"PasswordNeedsCapitals": "{1} capital letters",
"PasswordNeedsNumbers": "{1} numbers",
"PasswordNeedsSymbols": "{1} symbols",
"PasswordsDontMatch": "The new password and confirm new password aren't the same!",
"PasswordChanged": "Your password has been changed!",
"AutoLoggedInIP": "You have been automatically logged in by IP!",
"WelcomeBack": "Welcome back to {1}, {2}! Please {3} to continue.",
"WelcomeNewPlayer": "Welcome to {1}, {2}! Please {3} to play.",
"InvalidPlayer": "Player not found!",
"InvalidBusiness": "Business not found!",
"InvalidHouse": "House not found!",
"InvalidVehicle": "Vehicle not found!",
"InvalidClan": "Clan not found!",
"InvalidClanRank": "Clan rank not found!",
"InvalidJob": "Job not found!",
"InvalidItem": "Item not found!",
"InvalidItemType": "Item type not found!",
"InvalidRadioStation": "Radio station not found!",
"InvalidGate": "Gate not found!",
"EntersProperty": "opens the door and enters the {1}",
"ExitsProperty": "opens the door and exits the {1}",
"EnterExitPropertyDoorLocked": "tries to open the {1} door but fails because it's locked",
"PropertyNoInterior": "This {1} does not have an interior, but you can still use commands at the door icon.",
"NoBusinessWithItemType": "There is no business with that item available",
"HeaderKeyBinds": "Key Binds",
"HeaderAccountHelp": "Account Help",
"HeaderVehicleHelp": "Vehicle Help",
"HeaderVehicleDealershipHelp": "Vehicle Dealership Help",
"HeaderJobHelp": "Job Help",
"HeaderChatHelp": "Chat Help",
"HeaderServerRules": "Server Rules",
"HeaderWebsiteInfo": "Website",
"HeaderDiscordInfo": "Discord",
"HeaderAnimationsList": "Animation List",
"HeaderPayAndSprayHelp": "Pay and Spray Help",
"HeaderAmmunationHelp": "Ammunation Help",
"HeaderVehicleTuneupHelp": "Vehicle Tune Help",
"HeaderBindableKeysHelp": "Bindable Keys",
"HeaderSkinHelp": "Clothes/Skin Help",
"HeaderBusinessHelp": "Business Help",
"HeaderClanHelp": "Clan Help",
"HeaderPlayerVehiclesList": "Player Vehicles ({1})",
"HeaderPlayerBusinessesList": "Player Businesses ({1})",
"HeaderClansList": "Clan List",
"HeaderAdminsList": "Admin List",
"HeaderBadgeInfo": "Badge Information",
"HeaderAccentsList": "Accent List",
"HeaderPlayerInfo": "Player Information ({1})",
"HeaderWealthandTaxHelp": "Wealth and Tax Information",
"HeaderCommandInfo": "Command Information ({1})",
"HeaderRadioHelp": "Radio Help",
"HeaderRadioStationsList": "Radio Stations",
"HeaderKeyBindsList": "Key Binds List",
"RadioVolumeChanged": "{1} You changed your streaming radio volume to {2}%",
"VolumeLevelNotNumber": "The volume level must be a number",
"RadioStationLocationInvalid": "You must be in a vehicle, house, or business or have a personal device to change the station!",
"ActionBusinessRadioStationChange": "changes the business radio station to {1} ({2})",
"ActionHouseRadioStationChange": "changes the house radio station to {1} ({2})",
"ActionVehicleRadioStationChange": "changes the vehicle radio station to {1} ({2})",
"ActionItemRadioStationChange": "changes the {1}'s station to {2} ({3})",
"RandomVehicleCommandsDisabled": "This is a random traffic vehicle and commands can't be used for it.",
"HouseDoorLock": "House {1} {2}!",
"BusinessDoorLock": "Business {1} {2}!",
"ServerGameModeRestarting": "The server game mode is restarting!",
"HeaderSelfItemList": "Your Inventory",
"HeaderPlayerItemList": "Player Inventory ({1})",
"HeaderHouseItemList": "House Inventory",
"HeaderBusinessFloorItemList": "Business Inventory (For Sale)",
"HeaderBusinessStorageItemList": "Business Inventory (Storage)",
"HeaderItemItemList": "{1}'s Inventory",
"ItemSlotNotNumber": "The item slot must be a number",
"ItemSlotMustBeBetween": "The item slot must be between {1} and {2}!",
"UseItemBugged": "The item you're trying to use is bugged. A bug report has been sent to the server developers.",
"PickupItemBugged": "The item you're trying to pickup is bugged. A bug report has been sent to the server developers.",
"DropItemBugged": "The item you're trying to drop is bugged. A bug report has been sent to the server developers.",
"HandsBusy": "Your hands are busy",
"CantUseItemInSkinChange": "You can't use an item while customizing your appearance",
"CantDropItemInSkinChange": "You can't drop an item while customizing your appearance",
"CantPickupItemInSkinChange": "You can't pickup an item while customizing your appearance",
"CantSwitchItemInSkinChange": "You can't switch an item while customizing your appearance",
"CantGiveItemInSkinChange": "You can't give an item while customizing your appearance",
"CantTakeItemInSkinChange": "You can't take an item while customizing your appearance",
"ItemUnequippableNoAmmo": "The {1} in slot {2} has no ammo, and can't be equipped!",
"NoSpaceSelfInventory": "You don't have any more space in your inventory",
"Business": "business",
"House": "house",
"Clan": "clan",
"Vehicle": "vehicle",
"Item": "item",
"ItemType": "item type",
"Gate": "gate",
"Door": "door",
"ClanRank": "clan rank",
"JobRank": "job rank",
"RadioStation": "radio station",
"Months": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"WeekDays": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"CardinalDirections": [
"North",
"Northeast",
"East",
"Southeast",
"South",
"Southwest",
"West",
"Northwest"
],
"NewPlayerReadyToPlay": [
"You have been given some cash. Use {1} to find places to buy items.",
"If you need money, jobs are the yellow dots on the radar.",
"For a car, visit the car dealership. You can also use a rental vehicle near spawn or take the train",
"Be sure to read the {1} and use {2} for info."
],
"YourCurrentVehicleDeleted": "The vehicle you were in was deleted.",
"Distance": "Distance",
"Meters": "Meters",
"Feet": "Feet",
"Kilometers": "Kilometers",
"Miles": "Miles",
"MustBeVehicleDriver": "You must be the driver of the vehicle!",
"PlayerJoinedServer": "{1} has joined the game from {1}!",
"PlayerLeftServer": "{1} has left the game! ({1})",
"DisconnectReasons": [
"Lost Connection",
"Disconnected",
"Unsupported Client",
"Wrong Game",
"Incorrect Password",
"Unsupported Executable",
"Disconnected",
"Banned",
"Failed",
"Invalid Name",
"Crashed"
],
"TakeItemFromHouse": "takes a {1} from the house",
"TakeItemFromBusinessStorage": "takes a {1} from the business storage",
"TakeItemFromBusiness": "takes a {1} from the business",
"TakeItemFromItem": "takes a {1} from the {2}",
"TakeItemFromVehicleTrunk": "takes a {1} from the trunk",
"TakeItemFromVehicleDash": "takes a {1} from the glove compartment",
"JobEquipmentInventoryKeyBindTip": "The job equipment is in your inventory. Press {1} to see them.",
"JobEquipmentInventoryCommandTip": "The job equipment is in your inventory. Use {1} to see them.",
"AccountHelp": [
"Do NOT share your password with anybody else. {1} staff will never ask you for your password",
"Use {1} to change your password, and {2} if you forgot it",
"Some settings you can use: {1}"
],
"VehicleHelp": [
"Your personal vehicles will save wherever you or somebody else leaves them!",
"Visit dealerships to buy new vehicles (Use {1} for more information)",
"Some commands: {1}",
"Visit a mechanic garage to repair, colour, and tune up your car! {1} for info"
],
"VehicleDealershipHelp": [
"Visit a vehicle dealer to buy new vehicles. Use {1} to find one.",
"At the dealer, enter a car you want to buy, and the price will be shown to you",
"If you want to buy the vehicle, use {1} and you will be given keys to test drive it around the parking lot.",
"Drive away from the dealership with the new vehicle to confirm the purchase."
],
"JobHelp": [
"Visit job locations to get a job and earn money. Look for yellow spots on the map",
"At a job location, use {1} to get the job. Use {2} to quit your job",
"Use {1} to begin working. You can also get a job {2} and {3}",
"Most job vehicles are locked. Use {1} near one to enter it.",
"When entering a job vehicle, information on how to do the job will be shown to you."
],
"ChatHelp": [
"There are two main types of chat: out-of-character (OOC) and in-character (IC)",
"Mixing these two types is not proper roleplay. See {1} for info.",
"Some chat commands: {1}",
"Some have shorter names available ({1} to talk, {2} to shout, etc)"
],
"ServerRulesHelp": [
"Unrealistic actions (powergaming) are not allowed. You aren't superman.",
"No terrorist or terrorism roleplay is allowed.",
"Always follow instructions given by moderators and admins.",
"Do not mix the chats (metagaming). You can't use info in IC that was received OOC",
"Keep English in main chats. If you aren't good at English, use {1}"
],
"AnimationHelp": [
"Animations allow you to enhance roleplay with visual actions",
"Use {1} or {2} with a name to use an animation.",
"To see a list of animations, use {1}"
],
"WeaponHelp": [
"Visit an gun store to buy weapons. Use {1} to find one.",
"Buying a weapon requires a weapon license.",
"Weapon licenses are managed by the police department. Apply there to get one.",
"Weapons can also be purchased illegally from some businesses, weapon dealers, and clans."
],
"SkinHelp": [
"At a clothing store, use {1} to purchase clothes",
"When you have a clothing item, equip and use it like any other item to show the skin selection (check {1} to learn how to use items)",
"Some skins are restricted to jobs, clans, or for other reasons."
],
"KeyBindHelp": [
"You can set your own key binds. Use {1} to see your binded keys.",
"Use {1} to add a new keybind and {2} to remove one.",
"Default keys are: {1} for vehicle engine, {2} for lights, and {3} for lock/unlock",
"Press {1} to see your items and {2} to equip an item or {3} to unequip all.",
"Press {1} to use the item you're holding, press {2} to drop it, or press {3} to pickup an item from the ground."
],
"BusinessHelp": [
"Use {1} to purchase items or {2} to see a list of what's for sale at any business",
"Businesses are shown with blue names above the icon at their entrance.",
"Business owner commands: {1}",
"A new car for sale will appear when you drive away from the dealer."
],
"ClanHelp": [
"Ask an administrator to create a clan (Similar to factions/groups/families)",
"Clan owners have full control over their clan once it's created",
"Clan commands: {1}",
"More clan commands: {1}"
],
"RadioStationHelp": [
"Use {1} to set the station for your vehicle, house, or business",
"Use {2} to see a list of stations",
"You can change your radio streaming volume using {1} with 0-100 as the percent"
],
"WealthAndTaxHelp": [
"Your taxes on payday are {1} percent of your calculated wealth.",
"Your calculated wealth is a total sum based on how many vehicles, houses, and businesses you have.",
"Each vehicle is {1}, each house is {2}, and each business is {3}",
"Use {1} to see your current wealth, and {2} to see how much you'll pay in tax each payday"
],
"MustBeInAVehicle": "You need to be in a vehicle!",
"MustBeInOrNearVehicle": "You need to be in or near a vehicle!",
"MustBeInVehicleFrontSeat": "You need to be in the vehicle front seats!",
"MustBeInVehicleDriverSeat": "You need to be the driver!",
"DontHaveVehicleKey": "You don't have a key for this vehicle!",
"NoGateAccess": "You don't have access to this gate!",
"GateBroken": "This gate is broken!",
"GateHacked": "The gate does not respond!",
"RadioJammed": "You hear only static from the radio.",
"VehicleNotForSale": "This vehicle is not for sale!",
"VehicleNotForRent": "This vehicle is not for rent!",
"BusinessNotForSale": "This business is not for sale!",
"BusinessNotForRent": "This business is not for rent!",
"HouseNotForSale": "This house is not for sale!",
"HouseNotForRent": "This house is not for rent!",
"DealershipPurchaseTestDrive": "Drive the vehicle away from the dealership to buy it, or get out to cancel.",
"DealershipPurchaseExitedVehicle": "You canceled the vehicle purchase by exiting the vehicle!",
"VehiclePurchaseComplete": "This vehicle is now yours! It will save wherever you leave it.",
"VehiclePurchaseNotEnoughMoney": "You don't have enough money to buy this vehicle!",
"HousePurchaseNotEnoughMoney": "You don't have enough money to buy this house!",
"BusinessPurchaseNotEnoughMoney": "You don't have enough money to buy this business!",
"Locales": {
"English": "English",
"Russian": "Russian",
"Spanish": "Spanish",
"German": "German",
"Dutch": "Dutch",
"Polish": "Polish"
},
"ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
"HeaderPlayerHousesList": "Player Houses ({1})",
"HeaderPlayerStaffFlagsList": "Player Staff Flags ({1})",
"HeaderStaffFlagsList": "Staff Flags",
"NonRPName": "Non-RP name! Choose a new one:",
"InvalidStaffFlag": "Staff flag not found!",
"InvalidClanFlag": "Clan flag not found!",
"InvalidLocale": "Language not found!",
"HeaderJobUniformList": "Job Uniforms ({1})",
"HeaderJobEquipmentList": "Job Equipment ({1})",
"InvalidJobUniform": "Job uniform not found!",
"InvalidJobEquipment": "Job equipment not found!",
"HeaderVehiclesInRangeList": "Vehicles within {1}",
"NoVehiclesWithInRange": "There are no vehicles within {1}",
"AmountNotNumber": "The amount must be a number!",
"NeedToBeWorking": "You need to be working! Use {1} at a job location or near a job vehicle.",
"NeedToBeOnJobRoute": "You need to be doing a job route! Use {1} in a job vehicle",
"CurrentJobRouteDeleted": "The job route you were on has been deleted by an admin",
"CurrentJobRouteVehicleColoursChanged": "Your job route's vehicle colours were changed by an admin",
"NotYourJob": "This is not your job!",
"JobPoints": "You can get a job by going the yellow points on the map.",
"QuitJobToTakeAnother": "If you want this job, use {1} to quit your current job.",
"NotAJobVehicle": "This is not a job vehicle!",
"NotYourJobVehicle": "This is not your job's vehicle!",
"JobRouteDisabled": "The job route you were on has been disabled by an admin",
"HeaderPickupTypes": "Pickup Types",
"HeaderBlipTypes": "Map Icon Types",
"InvalidGPSLocation": "There are no locations with that name or type",
"HeaderBusinessList": "Businesses",
"VehicleForSale": "This {1} is buyable for {2}! Use {3} if you want to buy it",
"VehicleForRent": "This {1} is rentable for {2}! Use {3} if you want to rent it",
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
"LoginFailedInvalidPassword": "Invalid password! {1} attempts remaining",
"LoginFailedNoPassword": "You must enter a password! ! {1} attempts remaining",
"RegistrationFailedNoPassword": "You must enter a password!",
"RegistrationFailedNoPasswordConfirm": "You must confirm the password!",
"RegistrationFailedNoEmail": "You must enter an email!",
"AccountNameAlreadyRegistered": "Your name is already registered!",
"AlreadyLoggedIn": "You are already logged in!",
"RegistrationFailedInvalidEmail": "That email is invalid!",
"RegistrationFailedPasswordMismatch": "The passwords don't match!",
"RegistrationFailedCreateError": "Your account couldn't be created!",
"RegistrationSuccess": "Your account has been created!",
"RegistrationEmailVerifyReminder": "Don't forget to verify your email! A verification code has been sent to you.",
"RegistrationCreateCharReminder": "To play on the server, you will need to make a character.",
"NoCharactersGUIMessage": "You have no characters. Would you like to make one?",
"NoCharactersGUIWindowTitle": "No characters",
"NoCharactersChatMessage": "You have no characters. Use {1} to make one.",
"NeedEmailFor2FA": "You need to add your email to your account to use two-factor authentication.",
"NeedEmailVerifiedFor2FA": "You need to verify your email to use two-factor authentication.",
"SetEmailHelpTip": "Use {1} to set your email.",
"VerifyEmailHelpTip": "Use {1} to verify your email.",
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
"NearbyRadio": "Nearby radio",
"FromRadio": "From radio",
"ToRadio": "To radio",
"NeedToEnterPropertyCommand": "You need to enter the {1} first! Use {2} to enter and exit",
"NeedToEnterPropertyKeyPress": "You need to enter the {1} first! Press {2} to enter and exit",
"InventoryFullCantCarry": "You don't have any space to carry this (full inventory)!",
"NotEnoughCashNeedAmountMore": "You don't have enough money! You need {1} more!",
"AmountMustBeMoreThan": "The amount must be more than {1}!",
"WeaponBanned": "You are not allowed to buy or use weapons!",
"TimeNotNumber": "The time must be a number",
"HeaderDefaultBusinessItemTypes": "Business Item Templates",
"FixingStuck": "Fixing your position and virtual world ...",
"CantUseCommandYet": "You must wait before you can use this command again!",
"NotATester": "You are not a tester!",
"AccessDenied": "AccessDenied",
"InvalidSkin": "That skin is invalid!",
"HeaderInteriorTypes": "Interiors List",
"ViewInventoryKeyPressTip": "Press {1} to see your items",
"ViewInventoryCommandTip": "Use {1} to see your items",
"GUIAccountSettingToggle": "You have turned {1} GUI",
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
"YourVehicleRespawned": "Your vehicle has been respawned!",
"PlayerIPBanned": "{1} has been IP banned!",
"PlayerCharacterBanned": "{1} has been character banned!",
"PlayerSubNetBanned": "{1} has been subnet banned!",
"CantModifyBusiness": "You can't manage or modify this business!",
"CantModifyHouse": "You can't manage or modify this house!",
"ServerTimeSet": "{1} set the time to {2}",
"ServerWeatherSet": "{1} set the weather to {2}",
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
"ServerLogoSet": "{1} turned the server logo image {2}",
"ServerGUISet": "{1} turned GUI for this server {2}",
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
"ServerJobBlipsSet": "{1} turned all job blips {2}",
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
"BusinessBuyItemsLabel": "Use {1} to purchase items",
"PropertyEnterCommandLabel": "Use {1} to enter",
"PropertyEnterKeyPressLabel": "Press {1} to enter",
"PropertyForSaleLabel": "For sale: ${1}",
"PropertyForRentLabel": "For rent: ${1} every payday",
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
"Closed": "Closed",
"Open": "Open",
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
"TakeJobLabel": "Use {1} to work here",
"StartWorkLabel": "Use {1} to start working",
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
"JobLabel": "{1} Job",
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
"AllHousesReloaded": "All houses have been reloaded by an admin",
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
"PlayerKicked": "{1} has been kicked from the server",
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
"UnableToDoThat": "You aren't able to do that",
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
"SetVehicleClanConfirmTitle": "Warning!",
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
"SetItemPriceBelowOrderPriceTitle": "Warning!",
"MustOwnVehicle": "You don't own this vehicle!"
}

View File

@@ -1,7 +1,8 @@
{ {
"TranslationProvidedBy": "PerikiyoXD", "TranslationProvidedBy": "PerikiyoXD",
"LocaleEnglishName": "Español", "LocaleEnglishName": "Spanish",
"LocaleNativeName": "Inglés",
"LocaleNativeName": "Español",
"LocaleOffer": "Este servidor se encuentra disponible en Español. Utilice {1} para usarlo", "LocaleOffer": "Este servidor se encuentra disponible en Español. Utilice {1} para usarlo",
"LocaleChanged1": "El idioma se ha configurado a {1}", "LocaleChanged1": "El idioma se ha configurado a {1}",
"LocaleChanged2": "El servidor mostrará los mensajes en {1}", "LocaleChanged2": "El servidor mostrará los mensajes en {1}",
@@ -16,9 +17,9 @@
"HelpAnimationHeader": "Ayuda de animaciones", "HelpAnimationHeader": "Ayuda de animaciones",
"AccentNotFound": "Acento no encontrado", "AccentNotFound": "Acento no encontrado",
"AccentSet": "Acento establecido como {1}", "AccentSet": "Acento establecido como {1}",
"AnimationNotFound": "Esa animación no existe", "InvalidAnimation": "Esa animación no existe",
"AnimationCommandTip": "Usa {1} para ver la lista de animaciones", "AnimationCommandTip": "Usa {1} para ver la lista de animaciones",
"AnimationInvalidDistance": "La distancia debe ser un numero entre el 0 y el 3", "InvalidAnimationDistance": "La distancia debe ser un numero entre el 0 y el 3",
"AnimationStopCommandTip": "Usa {1} para detener la animación actual", "AnimationStopCommandTip": "Usa {1} para detener la animación actual",
"CantBanClient": "No se puede vetar a esta persona", "CantBanClient": "No se puede vetar a esta persona",
"PlayerAccountBanned": "La cuenta de {1} ha sido vetada", "PlayerAccountBanned": "La cuenta de {1} ha sido vetada",
@@ -269,7 +270,7 @@
"KeyBindHelp": [ "KeyBindHelp": [
"Puedes establecer tus propias combinaciones de teclas. Utilice {1} para ver sus teclas vinculadas", "Puedes establecer tus propias combinaciones de teclas. Utilice {1} para ver sus teclas vinculadas",
"Utilice {1} para añadir una nueva combinación de teclas y {2} para eliminar una", "Utilice {1} para añadir una nueva combinación de teclas y {2} para eliminar una",
"Las teclas por defecto son: {1} para el motor del vehículo, {1} para las luces y {3} para el bloqueo/desbloqueo", "Las teclas por defecto son: {1} para el motor del vehículo, {2} para las luces y {3} para el bloqueo/desbloqueo",
"Pulsa {1} para ver tus objetos y {2} para equipar un objeto o {3} para desequipar todos", "Pulsa {1} para ver tus objetos y {2} para equipar un objeto o {3} para desequipar todos",
"Pulsa {1} para usar el objeto que tienes en la mano, pulsa {2} para dejarlo caer o pulsa {3} para recoger un objeto del suelo" "Pulsa {1} para usar el objeto que tienes en la mano, pulsa {2} para dejarlo caer o pulsa {3} para recoger un objeto del suelo"
], ],
@@ -397,5 +398,65 @@
"InvalidSkin": "That skin is invalid!", "InvalidSkin": "That skin is invalid!",
"HeaderInteriorTypes": "Interiors List", "HeaderInteriorTypes": "Interiors List",
"ViewInventoryKeyPressTip": "Press {1} to see your items", "ViewInventoryKeyPressTip": "Press {1} to see your items",
"ViewInventoryCommandTip": "Use {1} to see your items" "ViewInventoryCommandTip": "Use {1} to see your items",
"GUIAccountSettingToggle": "You have turned {1} GUI",
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
"YourVehicleRespawned": "Your vehicle has been respawned",
"PlayerIPBanned": "{1} has been IP banned!",
"PlayerCharacterBanned": "{1} has been character banned!",
"PlayerSubNetBanned": "{1} has been subnet banned!",
"CantModifyBusiness": "You can't manage or modify this business",
"CantModifyHouse": "You can't manage or modify this house",
"ServerTimeSet": "{1} set the time to {2}",
"ServerWeatherSet": "{1} set the weather to {2}",
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
"ServerLogoSet": "{1} turned the server logo image {2}",
"ServerGUISet": "{1} turned GUI for this server {2}",
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
"ServerJobBlipsSet": "{1} turned all job blips {2}",
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
"BusinessBuyItemsLabel": "Use {1} to purchase items",
"PropertyEnterCommandLabel": "Use {1} to enter",
"PropertyEnterKeyPressLabel": "Press {1} to enter",
"PropertyForSaleLabel": "For sale: ${1}",
"PropertyForRentLabel": "For rent: ${1} every payday",
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
"Closed": "Closed",
"Open": "Open",
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
"TakeJobLabel": "Use {1} to work here",
"StartWorkLabel": "Use {1} to start working",
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
"JobLabel": "{1} Job",
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
"AllHousesReloaded": "All houses have been reloaded by an admin",
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
"PlayerKicked": "{1} has been kicked from the server",
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
"UnableToDoThat": "You aren't able to do that",
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
"SetVehicleClanConfirmTitle": "Warning!",
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
"SetItemPriceBelowOrderPriceTitle": "Warning!",
"MustOwnVehicle": "You don't own this vehicle!"
} }

View File

@@ -56,19 +56,6 @@
<script src="scripts/server/core.js" type="server" language="javascript" /> <script src="scripts/server/core.js" type="server" language="javascript" />
<script src="scripts/server/command.js" type="server" language="javascript" /> <script src="scripts/server/command.js" type="server" language="javascript" />
<!-- Server Business Scripts -->
<script src="scripts/server/business/bakery.js" type="server" language="javascript" />
<script src="scripts/server/business/bar.js" type="server" language="javascript" />
<script src="scripts/server/business/burger.js" type="server" language="javascript" />
<script src="scripts/server/business/clothing.js" type="server" language="javascript" />
<script src="scripts/server/business/club.js" type="server" language="javascript" />
<script src="scripts/server/business/fuel.js" type="server" language="javascript" />
<script src="scripts/server/business/mechanic.js" type="server" language="javascript" />
<script src="scripts/server/business/pizza.js" type="server" language="javascript" />
<script src="scripts/server/business/restaurant.js" type="server" language="javascript" />
<script src="scripts/server/business/vehicle.js" type="server" language="javascript" />
<script src="scripts/server/business/weapon.js" type="server" language="javascript" />
<!-- Server Job Scripts --> <!-- Server Job Scripts -->
<script src="scripts/server/job/bus.js" type="server" language="javascript" /> <script src="scripts/server/job/bus.js" type="server" language="javascript" />
<script src="scripts/server/job/drug.js" type="server" language="javascript" /> <script src="scripts/server/job/drug.js" type="server" language="javascript" />
@@ -124,6 +111,7 @@
<script src="scripts/client/job.js" type="client" language="javascript" /> <script src="scripts/client/job.js" type="client" language="javascript" />
<script src="scripts/client/keybind.js" type="client" language="javascript" /> <script src="scripts/client/keybind.js" type="client" language="javascript" />
<script src="scripts/client/label.js" type="client" language="javascript" /> <script src="scripts/client/label.js" type="client" language="javascript" />
<script src="scripts/client/locale.js" type="client" language="javascript" />
<script src="scripts/client/logo.js" type="client" language="javascript" /> <script src="scripts/client/logo.js" type="client" language="javascript" />
<script src="scripts/client/main.js" type="client" language="javascript" /> <script src="scripts/client/main.js" type="client" language="javascript" />
<script src="scripts/client/messaging.js" type="client" language="javascript" /> <script src="scripts/client/messaging.js" type="client" language="javascript" />
@@ -135,6 +123,7 @@
<script src="scripts/client/skin-select.js" type="client" language="javascript" /> <script src="scripts/client/skin-select.js" type="client" language="javascript" />
<script src="scripts/client/sync.js" type="client" language="javascript" /> <script src="scripts/client/sync.js" type="client" language="javascript" />
<script src="scripts/client/utilities.js" type="client" language="javascript" /> <script src="scripts/client/utilities.js" type="client" language="javascript" />
<script src="scripts/client/vehicle.js" type="client" language="javascript" />
<!-- MexUI --> <!-- MexUI -->
<file type="client" src="third-party/mexui/Images/down-arrow.png" /> <file type="client" src="third-party/mexui/Images/down-arrow.png" />

View File

@@ -7,6 +7,7 @@
// TYPE: Client (JavaScript) // TYPE: Client (JavaScript)
// =========================================================================== // ===========================================================================
// Init AFK script
function initAFKScript() { function initAFKScript() {
logToConsole(LOG_DEBUG, "[VRR.AFK]: Initializing AFK script ..."); logToConsole(LOG_DEBUG, "[VRR.AFK]: Initializing AFK script ...");
logToConsole(LOG_DEBUG, "[VRR.AFK]: AFK script initialized!"); logToConsole(LOG_DEBUG, "[VRR.AFK]: AFK script initialized!");
@@ -14,14 +15,16 @@ function initAFKScript() {
// =========================================================================== // ===========================================================================
// Process stuff when game loses focus
function processLostFocusAFK(event) { function processLostFocusAFK(event) {
sendServerNewAFKStatus(true); sendServerNewAFKStatus(true);
} }
// =========================================================================== // ===========================================================================
// Process stuff when game gains focus
function processFocusAFK(event) { function processFocusAFK(event) {
sendServerNewAFKStatus(false); sendServerNewAFKStatus(false);
} }
// =========================================================================== // ===========================================================================

View File

@@ -7,69 +7,115 @@
// TYPE: Client (JavaScript) // TYPE: Client (JavaScript)
// =========================================================================== // ===========================================================================
function makePedPlayAnimation(pedId, animGroup, animId, animType, animSpeed, loop, loopNoControl, freezeLastFrame, returnToOriginalPosition, freezePlayer) { function makePedPlayAnimation(pedId, animationSlot, positionOffset) {
logToConsole(LOG_DEBUG, `[VRR.Animation] Playing animation ${animGroup}/${animId} for ped ${pedId}`); let animationData = getAnimationData(animationSlot);
if(getGame() < VRR_GAME_GTA_IV) { logToConsole(LOG_DEBUG, `[VRR.Animation] Playing animation ${animationData[0]} for ped ${pedId}`);
if(animType == VRR_ANIMTYPE_NORMAL || animType == VRR_ANIMTYPE_SURRENDER) {
if(getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) {
getElementFromId(pedId).clearAnimations();
} else {
getElementFromId(pedId).clearObjective();
}
getElementFromId(pedId).addAnimation(animGroup, animId);
if(getElementFromId(pedId) == localPlayer && freezePlayer == true) { let freezePlayer = false;
inAnimation = true; switch(animationData.moveType) {
setLocalPlayerControlState(false, false); case VRR_ANIMMOVE_FORWARD:
localPlayer.collisionsEnabled = false; setElementCollisionsEnabled(ped, false);
} setElementPosition(ped, getPosInFrontOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset));
} else if(animType == VRR_ANIMTYPE_BLEND) { freezePlayer = true;
getElementFromId(pedId).position = getElementFromId(pedId).position; break;
getElementFromId(pedId).blendAnimation(animGroup, animId, animSpeed);
} case VRR_ANIMMOVE_BACK:
} else { setElementCollisionsEnabled(ped, false);
natives.requestAnims(animGroup); setElementPosition(ped, getPosBehindPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset));
natives.taskPlayAnimNonInterruptable(getElementFromId(pedId), animId, animGroup, animSpeed, loop, loopNoControl, freezeLastFrame, returnToOriginalPosition, -1); freezePlayer = true;
} break;
case VRR_ANIMMOVE_LEFT:
setElementCollisionsEnabled(ped, false);
setElementPosition(ped, getPosToLeftOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset));
freezePlayer = true;
break;
case VRR_ANIMMOVE_RIGHT:
setElementCollisionsEnabled(ped, false);
setElementPosition(ped, getPosToRightOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset));
freezePlayer = true;
break;
default:
break;
}
if(getGame() < VRR_GAME_GTA_IV) {
if(animationData.animType == VRR_ANIMTYPE_NORMAL || animationData.animType == VRR_ANIMTYPE_SURRENDER) {
if(getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) {
getElementFromId(pedId).clearAnimations();
} else {
getElementFromId(pedId).clearObjective();
}
getElementFromId(pedId).addAnimation(animationData.groupId, animationData.animId);
if(getElementFromId(pedId) == localPlayer && freezePlayer == true) {
inAnimation = true;
setLocalPlayerControlState(false, false);
localPlayer.collisionsEnabled = false;
}
} else if(animationData.animType == VRR_ANIMTYPE_BLEND) {
getElementFromId(pedId).position = getElementFromId(pedId).position;
getElementFromId(pedId).blendAnimation(animationData.groupId, animationData.animId, animationData.animSpeed);
}
} else {
natives.requestAnims(animationData.groupId);
natives.taskPlayAnimNonInterruptable(getElementFromId(pedId), animationData.groupId, animationData.animId, animationData.animSpeed, boolToInt(animationData.infiniteLoop), boolToInt(animationData.infiniteLoopNoMovement), boolToInt(animationData.dontReturnToStartCoords), boolToInt(animationData.freezeLastFrame), -1);
}
} }
// =========================================================================== // ===========================================================================
function forcePedAnimation(pedId, animGroup, animId, animType, animSpeed, loop, loopNoControl, freezeLastFrame, returnToOriginalPosition) { function forcePedAnimation(pedId, animSlot) {
if(getGame() < VRR_GAME_GTA_IV) { let animationData = getAnimationData(animSlot);
forcedAnimation = [animGroup, animId];
getElementFromId(pedId).position = getElementFromId(pedId).position;
getElementFromId(pedId).addAnimation(animGroup, animId);
if(getElementFromId(pedId) == localPlayer) { if(getGame() < VRR_GAME_GTA_IV) {
inAnimation = true; getElementFromId(pedId).position = getElementFromId(pedId).position;
setLocalPlayerControlState(false, false); getElementFromId(pedId).addAnimation(animationData.groupId, animationData.animId);
localPlayer.collisionsEnabled = false;
} if(getElementFromId(pedId) == localPlayer) {
} inAnimation = true;
setLocalPlayerControlState(false, false);
localPlayer.collisionsEnabled = false;
}
} else {
natives.requestAnims(animationData.groupId);
natives.taskPlayAnimNonInterruptable(getElementFromId(pedId), animationData.groupId, animationData.animId, animationData.animSpeed, boolToInt(animationData.infiniteLoop), boolToInt(animationData.infiniteLoopNoMovement), boolToInt(animationData.dontReturnToStartCoords), boolToInt(animationData.freezeLastFrame), -1);
}
} }
// =========================================================================== // ===========================================================================
function makePedStopAnimation(pedId) { function makePedStopAnimation(pedId) {
if(getElementFromId(pedId) == null) { if(getElementFromId(pedId) == null) {
return false; return false;
} }
if(getGame() != VRR_GAME_GTA_IV) { if(getGame() != VRR_GAME_GTA_IV) {
if(getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) { if(getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) {
getElementFromId(pedId).clearAnimations(); getElementFromId(pedId).clearAnimations();
} else { } else {
getElementFromId(pedId).clearObjective(); getElementFromId(pedId).clearObjective();
} }
} }
if(getElementFromId(pedId) == localPlayer) { if(getElementFromId(pedId) == localPlayer) {
if(getGame() != VRR_GAME_GTA_IV) { if(getGame() != VRR_GAME_GTA_IV) {
localPlayer.collisionsEnabled = true; localPlayer.collisionsEnabled = true;
} }
setLocalPlayerControlState(true, false); setLocalPlayerControlState(true, false);
} }
}
// ===========================================================================
/**
* @param {number} animationSlot - The slot index of the animation
* @return {Array} The animation's data (array)
*/
function getAnimationData(animationSlot, gameId = getGame()) {
return getGameConfig().animations[gameId][animationSlot];
} }
// =========================================================================== // ===========================================================================

View File

@@ -8,85 +8,84 @@
// =========================================================================== // ===========================================================================
class BusinessData { class BusinessData {
constructor(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems) { constructor(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems) {
this.index = -1; this.index = -1;
this.businessId = businessId; this.businessId = businessId;
this.name = name; this.name = name;
this.entrancePosition = entrancePosition; this.entrancePosition = entrancePosition;
this.blipModel = blipModel; this.blipModel = blipModel;
this.pickupModel = pickupModel; this.pickupModel = pickupModel;
this.hasInterior = hasInterior; this.hasInterior = hasInterior;
this.hasItems = hasItems; this.hasItems = hasItems;
this.blipId = -1; this.blipId = -1;
} this.labelInfoType = 0;
}
} }
// =========================================================================== // ===========================================================================
function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems) { function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems) {
logToConsole(LOG_DEBUG, `[VRR.Business] Received business ${businessId} (${name}) from server`); logToConsole(LOG_DEBUG, `[VRR.Business] Received business ${businessId} (${name}) from server`);
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
if(getBusinessData(businessId) != false) { if(getBusinessData(businessId) != false) {
let businessData = getBusinessData(businessId); let businessData = getBusinessData(businessId);
businessData.name = name; businessData.name = name;
businessData.entrancePosition = entrancePosition; businessData.entrancePosition = entrancePosition;
businessData.blipModel = blipModel; businessData.blipModel = blipModel;
businessData.pickupModel = pickupModel; businessData.pickupModel = pickupModel;
businessData.hasInterior = hasInterior; businessData.hasInterior = hasInterior;
businessData.hasItems = hasItems; businessData.hasItems = hasItems;
logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId} already exists. Checking blip ...`); logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId} already exists. Checking blip ...`);
if(blipModel == -1) { if(blipModel == -1) {
if(businessData.blipId != -1) { if(businessData.blipId != -1) {
logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been removed by the server`); logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been removed by the server`);
natives.removeBlipAndClearIndex(getBusinessData(businessId).blipId); if(getGame() == VRR_GAME_GTA_IV) {
businessData.blipId = -1; natives.removeBlipAndClearIndex(getBusinessData(businessId).blipId);
//businesses.splice(businessData.index, 1); } else {
//setAllBusinessDataIndexes(); destroyElement(getElementFromId(blipId));
} else { }
logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip is unchanged`); businessData.blipId = -1;
} //businesses.splice(businessData.index, 1);
} else { //setAllBusinessDataIndexes();
if(businessData.blipId != -1) { } else {
logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been changed by the server`); logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip is unchanged`);
natives.setBlipCoordinates(businessData.blipId, businessData.entrancePosition); }
natives.changeBlipSprite(businessData.blipId, businessData.blipModel); } else {
natives.setBlipMarkerLongDistance(businessData.blipId, false); if(businessData.blipId != -1) {
natives.setBlipAsShortRange(tempBusinessData.blipId, true); logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been changed by the server`);
natives.changeBlipNameFromAscii(businessData.blipId, `${businessData.name.substr(0, 24)}${(businessData.name.length > 24) ? " ...": ""}`); if(getGame() == VRR_GAME_GTA_IV) {
} else { natives.setBlipCoordinates(businessData.blipId, businessData.entrancePosition);
let blipId = natives.addBlipForCoord(entrancePosition); natives.changeBlipSprite(businessData.blipId, businessData.blipModel);
if(blipId) { natives.setBlipMarkerLongDistance(businessData.blipId, false);
businessData.blipId = blipId; natives.setBlipAsShortRange(tempBusinessData.blipId, true);
natives.changeBlipSprite(businessData.blipId, businessData.blipModel); natives.changeBlipNameFromAscii(businessData.blipId, `${businessData.name.substr(0, 24)}${(businessData.name.length > 24) ? " ...": ""}`);
natives.setBlipMarkerLongDistance(businessData.blipId, false); }
natives.setBlipAsShortRange(tempBusinessData.blipId, true); } else {
natives.changeBlipNameFromAscii(businessData.blipId, `${businessData.name.substr(0, 24)}${(businessData.name.length > 24) ? " ...": ""}`); let blipId = createGameBlip(tempBusinessData.blipModel, tempBusinessData.entrancePosition, tempBusinessData.name);
} if(blipId != -1) {
logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); tempBusinessData.blipId = blipId;
} }
} logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
} else { }
logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId} doesn't exist. Adding ...`); }
let tempBusinessData = new BusinessData(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems); } else {
if(blipModel != -1) { logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId} doesn't exist. Adding ...`);
let blipId = natives.addBlipForCoord(entrancePosition); let tempBusinessData = new BusinessData(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems);
if(blipId) { if(blipModel != -1) {
tempBusinessData.blipId = blipId; let blipId = createGameBlip(tempBusinessData.blipModel, tempBusinessData.entrancePosition, tempBusinessData.name);
natives.changeBlipSprite(tempBusinessData.blipId, blipModel); if(blipId != -1) {
natives.setBlipMarkerLongDistance(tempBusinessData.blipId, false); tempBusinessData.blipId = blipId;
natives.setBlipAsShortRange(tempBusinessData.blipId, true); }
natives.changeBlipNameFromAscii(tempBusinessData.blipId, `${name.substr(0, 24)}${(name.length > 24) ? " ...": ""}`); logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
} } else {
logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId} has no blip.`);
} else { }
logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId} has no blip.`); getServerData().businesses.push(tempBusinessData);
} setAllBusinessDataIndexes();
businesses.push(tempBusinessData); }
setAllBusinessDataIndexes(); }
}
}
} }
// =========================================================================== // ===========================================================================
@@ -96,23 +95,26 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel
* @return {BusinessData} The business's data (class instance) * @return {BusinessData} The business's data (class instance)
*/ */
function getBusinessData(businessId) { function getBusinessData(businessId) {
//let tempBusinessData = businesses.find((b) => b.businessId == businessId); //let tempBusinessData = businesses.find((b) => b.businessId == businessId);
//return (typeof tempBusinessData != "undefined") ? tempBusinessData[0] : false; //return (typeof tempBusinessData != "undefined") ? tempBusinessData[0] : false;
for(let i in businesses) {
if(businesses[i].businessId == businessId) {
return businesses[i];
}
}
return false; let businesses = getServerData().businesses;
for(let i in businesses) {
if(businesses[i].businessId == businessId) {
return businesses[i];
}
}
return false;
} }
// =========================================================================== // ===========================================================================
function setAllBusinessDataIndexes() { function setAllBusinessDataIndexes() {
for(let i in businesses) { for(let i in getServerData().businesses) {
businesses[i].index = i; getServerData().businesses[i].index = i;
} }
} }
// =========================================================================== // ===========================================================================

View File

@@ -16,95 +16,156 @@ let maxChatBoxHistory = 500;
let scrollAmount = 1; let scrollAmount = 1;
let maxChatBoxLines = 6; let maxChatBoxLines = 6;
let chatAutoHideDelay = 0;
let chatLastUse = 0;
let scrollUpKey = false; let scrollUpKey = false;
let scrollDownKey = false; let scrollDownKey = false;
// =========================================================================== // ===========================================================================
function initChatBoxScript() { function initChatBoxScript() {
logToConsole(LOG_DEBUG, "[VRR.ChatBox]: Initializing chatbox script ..."); logToConsole(LOG_DEBUG, "[VRR.ChatBox]: Initializing chatbox script ...");
scrollUpKey = getKeyIdFromParams("pageup"); scrollUpKey = getKeyIdFromParams("pageup");
scrollDownKey = getKeyIdFromParams("pagedown"); scrollDownKey = getKeyIdFromParams("pagedown");
bindChatBoxKeys(); bindChatBoxKeys();
logToConsole(LOG_DEBUG, "[VRR.ChatBox]: Chatbox script initialized!"); logToConsole(LOG_DEBUG, "[VRR.ChatBox]: Chatbox script initialized!");
} }
// =========================================================================== // ===========================================================================
function bindChatBoxKeys() { function bindChatBoxKeys() {
bindKey(toInteger(scrollUpKey), KEYSTATE_DOWN, chatBoxScrollUp); bindKey(toInteger(scrollUpKey), KEYSTATE_DOWN, chatBoxScrollUp);
bindKey(toInteger(scrollDownKey), KEYSTATE_DOWN, chatBoxScrollDown); bindKey(toInteger(scrollDownKey), KEYSTATE_DOWN, chatBoxScrollDown);
} }
// =========================================================================== // ===========================================================================
function unBindChatBoxKeys() { function unBindChatBoxKeys() {
unbindKey(toInteger(scrollUpKey)); unbindKey(toInteger(scrollUpKey));
unbindKey(toInteger(scrollDownKey)); unbindKey(toInteger(scrollDownKey));
} }
// =========================================================================== // ===========================================================================
function receiveChatBoxMessageFromServer(messageString, colour) { function receiveChatBoxMessageFromServer(messageString, colour) {
logToConsole(LOG_DEBUG, `[VRR.ChatBox]: Received chatbox message from server: ${messageString}`); logToConsole(LOG_DEBUG, `[VRR.ChatBox]: Received chatbox message from server: ${messageString}`);
let colouredString = replaceColoursInMessage(messageString);
if(bottomMessageIndex >= chatBoxHistory.length-1) { // Just in case it's hidden by auto hide
message(colouredString, colour); //setChatWindowEnabled(true);
bottomMessageIndex = chatBoxHistory.length-1;
} let colouredString = replaceColoursInMessage(messageString);
addToChatBoxHistory(colouredString, colour);
logToConsole(LOG_DEBUG, `[VRR.ChatBox]: Changed colours in string: ${colouredString}`);
addToChatBoxHistory(colouredString, colour);
//if(bottomMessageIndex >= chatBoxHistory.length-1) {
message(colouredString, colour);
bottomMessageIndex = chatBoxHistory.length-1;
//}
chatLastUse = getCurrentUnixTimestamp();
} }
// =========================================================================== // ===========================================================================
function setChatScrollLines(amount) { function setChatScrollLines(amount) {
scrollAmount = amount; scrollAmount = amount;
}
// ===========================================================================
function setChatAutoHideDelay(delay) {
chatAutoHideDelay = delay*1000;
} }
// =========================================================================== // ===========================================================================
function addToChatBoxHistory(messageString, colour) { function addToChatBoxHistory(messageString, colour) {
chatBoxHistory.push([messageString, colour]); chatBoxHistory.push([messageString, colour]);
} }
// =========================================================================== // ===========================================================================
function chatBoxScrollUp() { function chatBoxScrollUp() {
if(bottomMessageIndex > maxChatBoxLines) { if(bottomMessageIndex > maxChatBoxLines) {
bottomMessageIndex = bottomMessageIndex-scrollAmount; bottomMessageIndex = bottomMessageIndex-scrollAmount;
updateChatBox(); updateChatBox();
} }
} }
// =========================================================================== // ===========================================================================
function chatBoxScrollDown() { function chatBoxScrollDown() {
if(bottomMessageIndex < chatBoxHistory.length-1) { if(bottomMessageIndex < chatBoxHistory.length-1) {
bottomMessageIndex = bottomMessageIndex+scrollAmount; bottomMessageIndex = bottomMessageIndex+scrollAmount;
updateChatBox(); updateChatBox();
} }
} }
// =========================================================================== // ===========================================================================
function clearChatBox() { function clearChatBox() {
for(let i = 0 ; i <= maxChatBoxLines ; i++) { for(let i = 0 ; i <= maxChatBoxLines ; i++) {
message("", COLOUR_WHITE); message("", COLOUR_WHITE);
} }
} }
// =========================================================================== // ===========================================================================
function updateChatBox() { function updateChatBox() {
clearChatBox(); clearChatBox();
for(let i = bottomMessageIndex-maxChatBoxLines ; i <= bottomMessageIndex ; i++) { for(let i = bottomMessageIndex-maxChatBoxLines ; i <= bottomMessageIndex ; i++) {
if(typeof chatBoxHistory[i] != "undefined") { if(typeof chatBoxHistory[i] != "undefined") {
message(chatBoxHistory[i][0], chatBoxHistory[i][1]); message(chatBoxHistory[i][0], chatBoxHistory[i][1]);
} else { } else {
message("", COLOUR_WHITE); message("", COLOUR_WHITE);
} }
} }
chatLastUse = getCurrentUnixTimestamp();
}
// ===========================================================================
function processMouseWheelForChatBox(mouseId, deltaCoordinates, flipped) {
// There isn't a way to detect whether chat input is active, but mouse cursor is forced shown when typing so ¯\_(ツ)_/¯
if(!gui.cursorEnabled) {
return false;
}
if(!flipped) {
if(deltaCoordinates.y > 0) {
chatBoxScrollUp();
} else {
chatBoxScrollDown();
}
} else {
if(deltaCoordinates.y > 0) {
chatBoxScrollDown();
} else {
chatBoxScrollUp();
}
}
}
// ===========================================================================
function checkChatAutoHide() {
return false;
// Make sure chat input isn't active
if(gui.cursorEnabled) {
return false;
}
// Don't process auto-hide if it's disabled
if(chatAutoHideDelay == 0) {
return false;
}
if(getCurrentUnixTimestamp()-chatLastUse >= chatAutoHideDelay) {
setChatWindowEnabled(false);
}
} }
// =========================================================================== // ===========================================================================

View File

@@ -8,58 +8,58 @@
// =========================================================================== // ===========================================================================
function getCustomImage(imageName) { function getCustomImage(imageName) {
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]); let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
if(contentResource != null) { if(contentResource != null) {
if(contentResource.isStarted) { if(contentResource.isStarted) {
let image = contentResource.exports.getCustomImage(imageName); let image = contentResource.exports.getCustomImage(imageName);
if(image != null) { if(image != null) {
return image; return image;
} }
} }
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function getCustomFont(fontName) { function getCustomFont(fontName) {
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]); let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
if(contentResource != null) { if(contentResource != null) {
if(contentResource.isStarted) { if(contentResource.isStarted) {
let font = contentResource.exports.getCustomFont(fontName); let font = contentResource.exports.getCustomFont(fontName);
if(font != null) { if(font != null) {
return font; return font;
} }
} }
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function getCustomAudio(audioName) { function getCustomAudio(audioName) {
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]); let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
if(contentResource != null) { if(contentResource != null) {
if(contentResource.isStarted) { if(contentResource.isStarted) {
let audioFile = contentResource.exports.getCustomAudio(audioName); let audioFile = contentResource.exports.getCustomAudio(audioName);
if(audioFile != null) { if(audioFile != null) {
return audioFile; return audioFile;
} }
} }
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function playCustomAudio(audioName, volume = 0.5, loop = false) { function playCustomAudio(audioName, volume = 0.5, loop = false) {
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]); let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
if(contentResource != null) { if(contentResource != null) {
if(contentResource.isStarted) { if(contentResource.isStarted) {
contentResource.exports.playCustomAudio(audioName, volume, loop); contentResource.exports.playCustomAudio(audioName, volume, loop);
} }
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================

View File

@@ -8,227 +8,231 @@
// =========================================================================== // ===========================================================================
function initEventScript() { function initEventScript() {
logToConsole(LOG_DEBUG, "[VRR.Event]: Initializing event script ..."); logToConsole(LOG_DEBUG, "[VRR.Event]: Initializing event script ...");
addCustomEvents(); addCustomEvents();
addAllEventHandlers(); addAllEventHandlers();
logToConsole(LOG_DEBUG, "[VRR.Event]: Event script initialized!"); logToConsole(LOG_DEBUG, "[VRR.Event]: Event script initialized!");
} }
// =========================================================================== // ===========================================================================
function addCustomEvents() { function addCustomEvents() {
addEvent("OnLocalPlayerEnterSphere", 1); addEvent("OnLocalPlayerEnterSphere", 1);
addEvent("OnLocalPlayerExitSphere", 1); addEvent("OnLocalPlayerExitSphere", 1);
addEvent("OnLocalPlayerEnteredVehicle", 1); addEvent("OnLocalPlayerEnteredVehicle", 1);
addEvent("OnLocalPlayerExitedVehicle", 1); addEvent("OnLocalPlayerExitedVehicle", 1);
addEvent("OnLocalPlayerSwitchWeapon", 2); addEvent("OnLocalPlayerSwitchWeapon", 2);
} }
// =========================================================================== // ===========================================================================
function addAllEventHandlers() { function addAllEventHandlers() {
bindEventHandler("OnResourceStart", thisResource, onResourceStart); bindEventHandler("OnResourceStart", thisResource, onResourceStart);
bindEventHandler("OnResourceReady", thisResource, onResourceReady); bindEventHandler("OnResourceReady", thisResource, onResourceReady);
bindEventHandler("OnResourceStop", thisResource, onResourceStop); bindEventHandler("OnResourceStop", thisResource, onResourceStop);
addEventHandler("OnProcess", onProcess); addEventHandler("OnProcess", onProcess);
addEventHandler("OnKeyUp", onKeyUp); addEventHandler("OnKeyUp", onKeyUp);
addEventHandler("OnDrawnHUD", onDrawnHUD); addEventHandler("OnDrawnHUD", onDrawnHUD);
addEventHandler("OnPedWasted", onPedWasted); addEventHandler("OnPedWasted", onPedWasted);
addEventHandler("OnElementStreamIn", onElementStreamIn); addEventHandler("OnElementStreamIn", onElementStreamIn);
addEventHandler("OnLocalPlayerEnteredVehicle", onLocalPlayerEnteredVehicle); addEventHandler("OnLocalPlayerEnteredVehicle", onLocalPlayerEnteredVehicle);
addEventHandler("OnLocalPlayerExitedVehicle", onLocalPlayerExitedVehicle); addEventHandler("OnLocalPlayerExitedVehicle", onLocalPlayerExitedVehicle);
addEventHandler("OnLocalPlayerEnterSphere", onLocalPlayerEnterSphere); addEventHandler("OnLocalPlayerEnterSphere", onLocalPlayerEnterSphere);
addEventHandler("OnLocalPlayerExitSphere", onLocalPlayerExitSphere); addEventHandler("OnLocalPlayerExitSphere", onLocalPlayerExitSphere);
addEventHandler("OnLocalPlayerSwitchWeapon", onLocalPlayerSwitchWeapon); addEventHandler("OnLocalPlayerSwitchWeapon", onLocalPlayerSwitchWeapon);
addEventHandler("OnPedInflictDamage", onPedInflictDamage); addEventHandler("OnPedInflictDamage", onPedInflictDamage);
addEventHandler("OnLostFocus", onLostFocus); addEventHandler("OnLostFocus", onLostFocus);
addEventHandler("OnFocus", onFocus); addEventHandler("OnFocus", onFocus);
addEventHandler("OnCameraProcess", onCameraProcess); addEventHandler("OnCameraProcess", onCameraProcess);
addEventHandler("OnMouseWheel", onMouseWheel);
} }
// =========================================================================== // ===========================================================================
function onResourceStart(event, resource) { function onResourceStart(event, resource) {
sendResourceStartedSignalToServer(); sendResourceStartedSignalToServer();
setUpInitialGame(); setUpInitialGame();
garbageCollectorInterval = setInterval(collectAllGarbage, 1000*60); garbageCollectorInterval = setInterval(collectAllGarbage, 1000*60);
} }
// =========================================================================== // ===========================================================================
function onResourceStop(event, resource) { function onResourceStop(event, resource) {
sendResourceStoppedSignalToServer(); sendResourceStoppedSignalToServer();
} }
// =========================================================================== // ===========================================================================
function onResourceReady(event, resource) { function onResourceReady(event, resource) {
sendResourceReadySignalToServer(); sendResourceReadySignalToServer();
} }
// =========================================================================== // ===========================================================================
function onProcess(event, deltaTime) { function onProcess(event, deltaTime) {
if(localPlayer == null) { if(localPlayer == null) {
return false; return false;
} }
if(!isSpawned) { if(!isSpawned) {
return false; return false;
} }
processSync(); processSync();
processLocalPlayerControlState(); processLocalPlayerControlState();
processLocalPlayerVehicleControlState(); processLocalPlayerVehicleControlState();
processLocalPlayerSphereEntryExitHandling(); processLocalPlayerSphereEntryExitHandling();
processLocalPlayerVehicleEntryExitHandling(); processLocalPlayerVehicleEntryExitHandling();
processJobRouteSphere(); processJobRouteSphere();
forceLocalPlayerEquippedWeaponItem(); forceLocalPlayerEquippedWeaponItem();
processWantedLevelReset(); processWantedLevelReset();
processGameSpecifics(); processGameSpecifics();
processNearbyPickups(); processNearbyPickups();
processVehiclePurchasing(); processVehiclePurchasing();
//processVehicleFires(); //checkChatBoxAutoHide(); // Will be uncommented on 1.4.0 GTAC update
//processVehicleFires();
} }
// =========================================================================== // ===========================================================================
function onKeyUp(event, keyCode, scanCode, keyModifiers) { function onKeyUp(event, keyCode, scanCode, keyModifiers) {
processSkinSelectKeyPress(keyCode); processSkinSelectKeyPress(keyCode);
//processKeyDuringAnimation(); //processKeyDuringAnimation();
processGUIKeyPress(keyCode); processGUIKeyPress(keyCode);
processToggleGUIKeyPress(keyCode); processToggleGUIKeyPress(keyCode);
} }
// =========================================================================== // ===========================================================================
function onDrawnHUD(event) { function onDrawnHUD(event) {
if(!renderHUD) { if(!renderHUD) {
return false; return false;
} }
if(localPlayer == null) { if(localPlayer == null) {
return false; return false;
} }
processSmallGameMessageRendering(); processSmallGameMessageRendering();
processScoreBoardRendering(); processScoreBoardRendering();
processLabelRendering(); processLabelRendering();
processLogoRendering(); processLogoRendering();
processItemActionRendering(); processItemActionRendering();
processSkinSelectRendering(); processSkinSelectRendering();
processNameTagRendering(); processNameTagRendering();
processInteriorLightsRendering(); processInteriorLightsRendering();
} }
// =========================================================================== // ===========================================================================
function onPedWasted(event, wastedPed, killerPed, weapon, pedPiece) { function onPedWasted(event, wastedPed, killerPed, weapon, pedPiece) {
logToConsole(LOG_DEBUG, `[VRR.Event] Ped ${wastedPed.name} died`); logToConsole(LOG_DEBUG, `[VRR.Event] Ped ${wastedPed.name} died`);
wastedPed.clearWeapons(); wastedPed.clearWeapons();
} }
// =========================================================================== // ===========================================================================
function onElementStreamIn(event, element) { function onElementStreamIn(event, element) {
syncElementProperties(element); syncElementProperties(element);
} }
// =========================================================================== // ===========================================================================
function onLocalPlayerExitedVehicle(event, vehicle, seat) { function onLocalPlayerExitedVehicle(event, vehicle, seat) {
logToConsole(LOG_DEBUG, `[VRR.Event] Local player exited vehicle`); logToConsole(LOG_DEBUG, `[VRR.Event] Local player exited vehicle`);
sendNetworkEventToServer("vrr.onPlayerExitVehicle", getVehicleForNetworkEvent(vehicle), seat); sendNetworkEventToServer("vrr.onPlayerExitVehicle", getVehicleForNetworkEvent(vehicle), seat);
if(inVehicleSeat) { if(inVehicleSeat) {
parkedVehiclePosition = false; parkedVehiclePosition = false;
parkedVehicleHeading = false; parkedVehicleHeading = false;
} }
} }
// =========================================================================== // ===========================================================================
function onLocalPlayerEnteredVehicle(event, vehicle, seat) { function onLocalPlayerEnteredVehicle(event, vehicle, seat) {
logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered vehicle`); logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered vehicle`);
sendNetworkEventToServer("vrr.onPlayerEnterVehicle", getVehicleForNetworkEvent(vehicle), seat); sendNetworkEventToServer("vrr.onPlayerEnterVehicle", getVehicleForNetworkEvent(vehicle), seat);
if(inVehicleSeat == 0) { if(inVehicleSeat == 0) {
inVehicle.engine = false; inVehicle.engine = false;
if(!inVehicle.engine) { if(!inVehicle.engine) {
parkedVehiclePosition = inVehicle.position; parkedVehiclePosition = inVehicle.position;
parkedVehicleHeading = inVehicle.heading; parkedVehicleHeading = inVehicle.heading;
} }
} }
} }
// =========================================================================== // ===========================================================================
function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healthLoss, pedPiece) { function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healthLoss, pedPiece) {
//let damagerEntityString = (!isNull(damagedEntity)) ? `${damagerEntity.name} (${damagerEntity.name}, ${damagerEntity.type} - ${typeof damagerEntity})` : `Unknown ped`; //let damagerEntityString = (!isNull(damagedEntity)) ? `${damagerEntity.name} (${damagerEntity.name}, ${damagerEntity.type} - ${typeof damagerEntity})` : `Unknown ped`;
//let damagedEntityString = (!isNull(damagedEntity)) ? `${damagedEntity.name} (${damagedEntity.name}, ${damagedEntity.type} - ${typeof damagedEntity})` : `Unknown ped`; //let damagedEntityString = (!isNull(damagedEntity)) ? `${damagedEntity.name} (${damagedEntity.name}, ${damagedEntity.type} - ${typeof damagedEntity})` : `Unknown ped`;
//logToConsole(LOG_DEBUG, `[VRR.Event] ${damagerEntityString} damaged ${damagedEntityString}'s '${pedPiece} with weapon ${weaponId}`); //logToConsole(LOG_DEBUG, `[VRR.Event] ${damagerEntityString} damaged ${damagedEntityString}'s '${pedPiece} with weapon ${weaponId}`);
if(!isNull(damagedEntity) && !isNull(damagerEntity)) { if(!isNull(damagedEntity) && !isNull(damagerEntity)) {
if(damagedEntity.isType(ELEMENT_PLAYER)) { if(damagedEntity.isType(ELEMENT_PLAYER)) {
if(damagedEntity == localPlayer) { if(damagedEntity == localPlayer) {
//if(!weaponDamageEnabled[damagerEntity.name]) { //if(!weaponDamageEnabled[damagerEntity.name]) {
event.preventDefault(); event.preventDefault();
sendNetworkEventToServer("vrr.weaponDamage", damagerEntity.name, weaponId, pedPiece, healthLoss); sendNetworkEventToServer("vrr.weaponDamage", damagerEntity.name, weaponId, pedPiece, healthLoss);
//} //}
} }
} }
} }
} }
// =========================================================================== // ===========================================================================
function onLocalPlayerEnterSphere(event, sphere) { function onLocalPlayerEnterSphere(event, sphere) {
logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered sphere`); logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered sphere`);
if(sphere == jobRouteLocationSphere) { if(sphere == jobRouteLocationSphere) {
enteredJobRouteSphere(); enteredJobRouteSphere();
} }
} }
// =========================================================================== // ===========================================================================
function onLocalPlayerExitSphere(event, sphere) { function onLocalPlayerExitSphere(event, sphere) {
logToConsole(LOG_DEBUG, `[VRR.Event] Local player exited sphere`); logToConsole(LOG_DEBUG, `[VRR.Event] Local player exited sphere`);
} }
// =========================================================================== // ===========================================================================
function onLostFocus(event) { function onLostFocus(event) {
processLostFocusAFK(); processLostFocusAFK();
} }
// =========================================================================== // ===========================================================================
function onFocus(event) { function onFocus(event) {
processFocusAFK(); processFocusAFK();
} }
// =========================================================================== // ===========================================================================
function onLocalPlayerSwitchWeapon(oldWeapon, newWeapon) { function onLocalPlayerSwitchWeapon(oldWeapon, newWeapon) {
} }
// =========================================================================== // ===========================================================================
function onCameraProcess(event) { function onCameraProcess(event) {
} }
// =========================================================================== // ===========================================================================
function onChatOutput(event, messageText, colour) { function onMouseWheel(event, mouseId, deltaCoordinates, flipped) {
//event.preventDefault(); processMouseWheelForChatBox(mouseId, deltaCoordinates, flipped);
//receiveChatBoxMessageFromServer(messageText, colour);
} }
// =========================================================================== // ===========================================================================

View File

@@ -29,27 +29,6 @@ let textInputAlpha = 180;
let guiReady = false; let guiReady = false;
let guiSubmitKey = false;
let guiLeftKey = false;
let guiRightKey = false;
let guiUpKey = false;
let guiDownKey = false;
// ===========================================================================
let placesOfOrigin = [
"Liberty City",
"Vice City",
"Los Santos",
"San Fierro",
"Las Venturas",
"San Andreas",
"Blaine County",
"Red County",
"Bone County",
"Other",
];
// =========================================================================== // ===========================================================================
let characterData = []; let characterData = [];
@@ -185,23 +164,23 @@ addNetworkEventHandler("vrr.switchCharacterSelect", function(firstName, lastName
// =========================================================================== // ===========================================================================
addNetworkEventHandler("vrr.showError", function(errorMessage, errorTitle) { addNetworkEventHandler("vrr.showError", function(errorMessage, errorTitle, buttonText) {
logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show error window`); logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show error window`);
showError(errorMessage, errorTitle); showError(errorMessage, errorTitle, buttonText);
}); });
// =========================================================================== // ===========================================================================
addNetworkEventHandler("vrr.showPrompt", function(promptMessage, promptTitle) { addNetworkEventHandler("vrr.showPrompt", function(promptMessage, promptTitle, yesButtonText, noButtonText) {
logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show prompt window`); logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show prompt window`);
showYesNoPromptGUI(promptMessage, promptTitle); showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonText);
}); });
// =========================================================================== // ===========================================================================
addNetworkEventHandler("vrr.showInfo", function(infoMessage) { addNetworkEventHandler("vrr.showInfo", function(infoMessage, buttonText) {
logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show info dialog`); logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show info dialog`);
showInfo(infoMessage); showInfo(infoMessage, buttonText);
}); });
// =========================================================================== // ===========================================================================
@@ -284,37 +263,50 @@ addNetworkEventHandler("vrr.guiInit", function() {
// =========================================================================== // ===========================================================================
function hideAllGUI() { function hideAllGUI() {
closeAllWindows(); closeAllWindows();
setChatWindowEnabled(true); setChatWindowEnabled(true);
guiSubmitKey = false; guiSubmitKey = false;
} }
// =========================================================================== // ===========================================================================
function processGUIKeyPress(keyCode) { function processGUIKeyPress(keyCode) {
logToConsole(LOG_DEBUG, `[VRR.GUI] Processing key press: ${keyCode}`);
if(!isAnyGUIActive()) { if(!isAnyGUIActive()) {
logToConsole(LOG_DEBUG, `[VRR.GUI] GUI is not active. Cancelling keypress processing.`);
return false; return false;
} }
if(keyCode == SDLK_RETURN || keyCode == SDLK_RETURN2) { if(keyCode == SDLK_RETURN || keyCode == SDLK_RETURN2) {
logToConsole(LOG_DEBUG, `[VRR.GUI] Key press is submit (${guiSubmitKey})`);
if(guiSubmitKey != false) { if(guiSubmitKey != false) {
guiSubmitKey(); logToConsole(LOG_DEBUG, `[VRR.GUI] Calling submit key function`);
guiSubmitKey.call();
} }
} else if(keyCode == getKeyIdFromParams("left") || keyCode == getKeyIdFromParams("a")) { } else if(keyCode == getKeyIdFromParams("left") || keyCode == getKeyIdFromParams("a")) {
logToConsole(LOG_DEBUG, `[VRR.GUI] Key press is left (${guiLeftKey})`);
if(guiLeftKey != false) { if(guiLeftKey != false) {
guiLeftKey(); logToConsole(LOG_DEBUG, `[VRR.GUI] Calling left key function`);
guiLeftKey.call();
} }
} else if(keyCode == getKeyIdFromParams("right") || keyCode == getKeyIdFromParams("d")) { } else if(keyCode == getKeyIdFromParams("right") || keyCode == getKeyIdFromParams("d")) {
logToConsole(LOG_DEBUG, `[VRR.GUI] Key press is right (${guiRightKey})`);
if(guiRightKey != false) { if(guiRightKey != false) {
guiRightKey(); logToConsole(LOG_DEBUG, `[VRR.GUI] Calling right key function`);
guiRightKey.call();
} }
} else if(keyCode == getKeyIdFromParams("down") || keyCode == getKeyIdFromParams("s")) { } else if(keyCode == getKeyIdFromParams("down") || keyCode == getKeyIdFromParams("s")) {
logToConsole(LOG_DEBUG, `[VRR.GUI] Key press is down (${guiDownKey})`);
if(guiDownKey != false) { if(guiDownKey != false) {
guiDownKey(); logToConsole(LOG_DEBUG, `[VRR.GUI] Calling down key function`);
guiDownKey.call();
} }
} else if(keyCode == getKeyIdFromParams("up") || keyCode == getKeyIdFromParams("w")) { } else if(keyCode == getKeyIdFromParams("up") || keyCode == getKeyIdFromParams("w")) {
logToConsole(LOG_DEBUG, `[VRR.GUI] Key press is up (${guiUpKey})`);
if(guiUpKey != false) { if(guiUpKey != false) {
guiUpKey(); logToConsole(LOG_DEBUG, `[VRR.GUI] Calling up key function`);
guiUpKey.call();
} }
} }
} }

View File

@@ -163,6 +163,10 @@ function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, ski
characterSelect.lastPlayedText.text = `Last Played: ${lastPlayed}`; characterSelect.lastPlayedText.text = `Last Played: ${lastPlayed}`;
characterSelect.skinImage = characterSelect.window.image(310, 32, 100, 90, "files/images/skins/none.png"); characterSelect.skinImage = characterSelect.window.image(310, 32, 100, 90, "files/images/skins/none.png");
characterSelect.window.shown = true; characterSelect.window.shown = true;
guiSubmitKey = selectThisCharacter;
guiLeftKey = selectPreviousCharacter;
guiRightKey = selectNextCharacter;
} }
// =========================================================================== // ===========================================================================
@@ -211,6 +215,7 @@ function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, s
characterSelect.skinImage = (getGame() == VRR_GAME_GTA_III) ? characterSelect.window.image(310, 32, 100, 90, `files/images/skins/gta3/${getSkinImage(skinId)}.png`) : characterSelect.window.image(310, 32, 100, 90, "files/images/skins/none.png"); characterSelect.skinImage = (getGame() == VRR_GAME_GTA_III) ? characterSelect.window.image(310, 32, 100, 90, `files/images/skins/gta3/${getSkinImage(skinId)}.png`) : characterSelect.window.image(310, 32, 100, 90, "files/images/skins/none.png");
characterSelect.window.shown = true; characterSelect.window.shown = true;
guiSubmitKey = selectThisCharacter; guiSubmitKey = selectThisCharacter;
guiLeftKey = selectPreviousCharacter; guiLeftKey = selectPreviousCharacter;
guiRightKey = selectNextCharacter; guiRightKey = selectNextCharacter;

View File

@@ -63,12 +63,14 @@ function initErrorDialogGUI() {
// =========================================================================== // ===========================================================================
function showErrorGUI(errorMessage, errorTitle) { function showErrorGUI(errorMessage, errorTitle, buttonText) {
closeAllWindows(); closeAllWindows();
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`); logToConsole(LOG_DEBUG, `[VRR.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
setChatWindowEnabled(false); setChatWindowEnabled(false);
mexui.setInput(true); mexui.setInput(true);
errorDialog.messageLabel.text = errorMessage; errorDialog.messageLabel.text = errorMessage;
errorDialog.okayButton.text = buttonText;
errprDialog.window.title = errorTitle;
errorDialog.window.shown = true; errorDialog.window.shown = true;
} }

View File

@@ -70,11 +70,13 @@ function closeInfoDialog() {
// =========================================================================== // ===========================================================================
function showInfo(infoMessage, infoTitle) { function showInfo(infoMessage, infoTitle, buttonText) {
closeAllWindows(); closeAllWindows();
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`); logToConsole(LOG_DEBUG, `[VRR.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
mexui.setInput(true); mexui.setInput(true);
infoDialog.messageLabel.text = infoMessage; infoDialog.messageLabel.text = infoMessage;
infoDialog.okayButton.text = buttonText;
infoDialog.window.title = infoTitle;
infoDialog.window.shown = true; infoDialog.window.shown = true;
} }

View File

@@ -20,6 +20,28 @@ let login = {
// =========================================================================== // ===========================================================================
let loginHTML =
`<html>
<head>
<title>Connected RP: Login</title>
<style type="text/css" rel="stylesheet">
.input-box
{
font-family: "Roboto";
font-size: 14px;
border-style: solid;
border-colour: #0066AA;
border-radius: 2px;
color: #0066AA;
};
</style>
</head>
<body>
</body>
</html>`;
// ===========================================================================
function initLoginGUI() { function initLoginGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating login GUI ...`); logToConsole(LOG_DEBUG, `[VRR.GUI] Creating login GUI ...`);
login.window = mexui.window(game.width/2-150, game.height/2-135, 300, 275, 'LOGIN', { login.window = mexui.window(game.width/2-150, game.height/2-135, 300, 275, 'LOGIN', {
@@ -164,9 +186,10 @@ function loginSuccess() {
// =========================================================================== // ===========================================================================
function switchToPasswordResetGUI() { function switchToPasswordResetGUI() {
closeAllWindows(); //closeAllWindows();
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing password reset dialog window`); //logToConsole(LOG_DEBUG, `[VRR.GUI] Showing password reset dialog window`);
showResetPasswordGUI(); //showResetPasswordGUI();
sendNetworkEventToServer("vrr.checkResetPassword", "");
return false; return false;
} }

View File

@@ -40,7 +40,7 @@ function initRegisterGUI() {
register.window.titleBarIconSize = toVector2(0,0); register.window.titleBarIconSize = toVector2(0,0);
register.window.titleBarHeight = 0; register.window.titleBarHeight = 0;
register.window.image(5, 20, 290, 80, mainLogoPath, { register.window.image(5, 20, 290, 100, mainLogoPath, {
focused: { focused: {
borderColour: toColour(0, 0, 0, 0), borderColour: toColour(0, 0, 0, 0),
}, },

View File

@@ -48,7 +48,7 @@ function initYesNoDialogGUI() {
}, },
}); });
yesNoDialog.yesButton = yesNoDialog.window.button(5, 100, 197, 25, 'YES', { yesNoDialog.yesButton = yesNoDialog.window.button(5, 105, 193, 30, 'YES', {
main: { main: {
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha), backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255), textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
@@ -61,7 +61,7 @@ function initYesNoDialogGUI() {
}, },
}, yesNoDialogAnswerYes); }, yesNoDialogAnswerYes);
yesNoDialog.noButton = yesNoDialog.window.button(202, 105, 197, 25, 'NO', { yesNoDialog.noButton = yesNoDialog.window.button(203, 105, 192, 30, 'NO', {
main: { main: {
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha), backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255), textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
@@ -78,11 +78,14 @@ function initYesNoDialogGUI() {
// =========================================================================== // ===========================================================================
function showYesNoPromptGUI(promptMessage, promptTitle) { function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonText) {
closeAllWindows(); closeAllWindows();
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`); logToConsole(LOG_DEBUG, `[VRR.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
mexui.setInput(true); mexui.setInput(true);
yesNoDialog.messageLabel.text = promptMessage; yesNoDialog.messageLabel.text = promptMessage;
yesNoDialog.yesButton.text = yesButtonText;
yesNoDialog.noButton.text = noButtonText;
yesNoDialog.window.title = promptTitle;
yesNoDialog.window.shown = true; yesNoDialog.window.shown = true;
} }

View File

@@ -8,56 +8,77 @@
// =========================================================================== // ===========================================================================
class HouseData { class HouseData {
constructor(houseId, entrancePosition, blipModel, pickupModel, hasInterior) { constructor(houseId, entrancePosition, blipModel, pickupModel, hasInterior) {
this.index = -1; this.index = -1;
this.houseId = houseId; this.houseId = houseId;
this.entrancePosition = entrancePosition; this.entrancePosition = entrancePosition;
this.blipModel = blipModel; this.blipModel = blipModel;
this.pickupModel = pickupModel; this.pickupModel = pickupModel;
this.hasInterior = hasInterior; this.hasInterior = hasInterior;
this.blipId = -1; this.blipId = -1;
} }
} }
// =========================================================================== // ===========================================================================
function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupModel, hasInterior) { function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupModel, hasInterior) {
if(getGame() == VRR_GAME_GTA_IV) { logToConsole(LOG_DEBUG, `[VRR.House] Received house ${houseId} (${name}) from server`);
if(getHouseData(houseId) != false) {
if(blipModel == -1) { if(getGame() == VRR_GAME_GTA_IV) {
natives.removeBlipAndClearIndex(getHouseData(houseId).blipId); if(getHouseData(houseId) != false) {
getHouseData(houseId).blipId = -1; let houseData = getHouseData(houseId);
//houses.splice(getHouseData(houseId).index, 1); houseData.entrancePosition = entrancePosition;
//setAllHouseDataIndexes(); houseData.blipModel = blipModel;
} else { houseData.pickupModel = pickupModel;
if(getHouseData(houseId).blipId != -1) { houseData.hasInterior = hasInterior;
natives.setBlipCoordinates(getHouseData(houseId).blipId, getHouseData(houseId).entrancePosition);
natives.changeBlipSprite(getHouseData(houseId).blipId, getHouseData(houseId).blipModel); logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId} already exists. Checking blip ...`);
//natives.changeBlipNameFromAscii(getHouseData(houseId).blipId, `${name.substr(0, 24)}${(name.length > 24) ? " ...": ""}`); if(blipModel == -1) {
} else { if(houseData.blipId != -1) {
let blipId = natives.addBlipForCoord(entrancePosition); logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip has been removed by the server`);
if(blipId) { if(getGame() == VRR_GAME_GTA_IV) {
getHouseData(houseId).blipId = blipId; natives.removeBlipAndClearIndex(getHouseData(houseId).blipId);
natives.changeBlipSprite(blipId, blipModel); } else {
natives.setBlipMarkerLongDistance(blipId, false); destroyElement(getElementFromId(blipId));
} }
} houseData.blipId = -1;
} } else {
} else { logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip is unchanged`);
let tempHouseData = new HouseData(houseId, entrancePosition, blipModel, pickupModel, hasInterior, hasItems); }
if(blipModel != -1) { } else {
let blipId = natives.addBlipForCoord(entrancePosition); if(houseData.blipId != -1) {
if(blipId) { logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip has been changed by the server`);
tempHouseData.blipId = blipId; if(getGame() == VRR_GAME_GTA_IV) {
natives.changeBlipSprite(blipId, blipModel); natives.setBlipCoordinates(houseData.blipId, houseData.entrancePosition);
natives.setBlipMarkerLongDistance(blipId, false); natives.changeBlipSprite(houseData.blipId, houseData.blipModel);
//natives.changeBlipNameFromAscii(blipId, `${name.substr(0, 24)}${(name.length > 24) ? " ...": ""}`); natives.setBlipMarkerLongDistance(houseData.blipId, false);
} natives.setBlipAsShortRange(houseData.blipId, true);
} natives.changeBlipNameFromAscii(houseData.blipId, `${houseData.name.substr(0, 24)}${(houseData.name.length > 24) ? " ...": ""}`);
houses.push(tempHouseData); }
setAllHouseDataIndexes(); } else {
} let blipId = createGameBlip(houseData.blipModel, houseData.entrancePosition, houseData.name);
} if(blipId != -1) {
houseData.blipId = blipId;
}
logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
}
}
} else {
logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId} doesn't exist. Adding ...`);
let tempHouseData = new HouseData(houseId, entrancePosition, blipModel, pickupModel, hasInterior);
if(blipModel != -1) {
let blipId = createGameBlip(tempHouseData.blipModel, tempHouseData.entrancePosition, "House");
if(blipId != -1) {
tempHouseData.blipId = blipId;
}
logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
} else {
logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId} has no blip.`);
}
getServerData().houses.push(tempHouseData);
setAllHouseDataIndexes();
}
}
} }
// =========================================================================== // ===========================================================================
@@ -66,17 +87,23 @@ function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupMode
* @param {number} houseId - The ID of the house (initially provided by server) * @param {number} houseId - The ID of the house (initially provided by server)
* @return {HouseData} The house's data (class instance) * @return {HouseData} The house's data (class instance)
*/ */
function getHouseData(houseId) { function getHouseData(houseId) {
let tempHouseData = houses.find((h) => h.houseId == houseId); let houses = getServerData().houses;
return (typeof tempHouseData != "undefined") ? tempHouseData : false; for(let i in houses) {
if(houses[i].houseId == houseId) {
return houses[i];
}
}
return false;
} }
// =========================================================================== // ===========================================================================
function setAllHouseDataIndexes() { function setAllHouseDataIndexes() {
for(let i in houses) { for(let i in getServerData().houses) {
houses[i].index = i; getServerData().houses[i].index = i;
} }
} }
// =========================================================================== // ===========================================================================

View File

@@ -23,40 +23,40 @@ function initItemScript() {
// =========================================================================== // ===========================================================================
function processItemActionRendering() { function processItemActionRendering() {
if(renderItemActionDelay) { if(renderItemActionDelay) {
if(itemActionDelayEnabled) { if(itemActionDelayEnabled) {
let finishTime = itemActionDelayStart+itemActionDelayDuration; let finishTime = itemActionDelayStart+itemActionDelayDuration;
if(sdl.ticks >= finishTime) { if(sdl.ticks >= finishTime) {
itemActionDelayEnabled = false; itemActionDelayEnabled = false;
itemActionDelayDuration = 0; itemActionDelayDuration = 0;
itemActionDelayStart = 0; itemActionDelayStart = 0;
tellServerItemActionDelayComplete(); tellServerItemActionDelayComplete();
} else { } else {
let currentTick = sdl.ticks-itemActionDelayStart; let currentTick = sdl.ticks-itemActionDelayStart;
let progressPercent = Math.ceil(currentTick*100/itemActionDelayDuration); let progressPercent = Math.ceil(currentTick*100/itemActionDelayDuration);
let width = Math.ceil(getPercentage(itemActionDelaySize.x, progressPercent)); let width = Math.ceil(getPercentage(itemActionDelaySize.x, progressPercent));
let backgroundColour = toColour(0, 0, 0, 255); let backgroundColour = toColour(0, 0, 0, 255);
graphics.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2)-1, itemActionDelayPosition.y-(itemActionDelaySize.y/2)-1], [itemActionDelaySize.x+2, itemActionDelaySize.y+2], backgroundColour, backgroundColour, backgroundColour, backgroundColour); graphics.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2)-1, itemActionDelayPosition.y-(itemActionDelaySize.y/2)-1], [itemActionDelaySize.x+2, itemActionDelaySize.y+2], backgroundColour, backgroundColour, backgroundColour, backgroundColour);
graphics.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2), itemActionDelayPosition.y-(itemActionDelaySize.y/2)-2], [width, itemActionDelaySize.y], COLOUR_LIME, COLOUR_LIME, COLOUR_LIME, COLOUR_LIME); graphics.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2), itemActionDelayPosition.y-(itemActionDelaySize.y/2)-2], [width, itemActionDelaySize.y], COLOUR_LIME, COLOUR_LIME, COLOUR_LIME, COLOUR_LIME);
} }
} }
} }
} }
// =========================================================================== // ===========================================================================
function updatePlayerHotBar(activeSlot, itemsArray) { function updatePlayerHotBar(activeSlot, itemsArray) {
logToConsole(LOG_DEBUG, `[VRR.Main] Updating hotbar`); logToConsole(LOG_DEBUG, `[VRR.Main] Updating hotbar`);
} }
// =========================================================================== // ===========================================================================
function showItemActionDelay(duration) { function showItemActionDelay(duration) {
itemActionDelayDuration = duration; itemActionDelayDuration = duration;
itemActionDelayStart = sdl.ticks; itemActionDelayStart = sdl.ticks;
itemActionDelayEnabled = true; itemActionDelayEnabled = true;
logToConsole(LOG_DEBUG, `Item action delay started. Duration: ${itemActionDelayDuration}, Start: ${itemActionDelayStart}, Rendering Enabled: ${renderItemActionDelay}`); logToConsole(LOG_DEBUG, `Item action delay started. Duration: ${itemActionDelayDuration}, Start: ${itemActionDelayStart}, Rendering Enabled: ${renderItemActionDelay}`);
} }
// =========================================================================== // ===========================================================================

View File

@@ -14,6 +14,20 @@ let jobRouteLocationSphere = null;
// =========================================================================== // ===========================================================================
class JobData {
constructor(jobId, name, position, blipModel, pickupModel) {
this.index = -1;
this.jobId = jobId;
this.name = name;
this.position = position;
this.blipModel = blipModel;
this.pickupModel = pickupModel;
this.blipId = -1;
}
}
// ===========================================================================
function initJobScript() { function initJobScript() {
logToConsole(LOG_DEBUG, "[VRR.Job]: Initializing job script ..."); logToConsole(LOG_DEBUG, "[VRR.Job]: Initializing job script ...");
logToConsole(LOG_DEBUG, "[VRR.Job]: Job script initialized!"); logToConsole(LOG_DEBUG, "[VRR.Job]: Job script initialized!");
@@ -22,74 +36,161 @@ function initJobScript() {
// =========================================================================== // ===========================================================================
function setLocalPlayerJobType(tempJobType) { function setLocalPlayerJobType(tempJobType) {
logToConsole(LOG_DEBUG, `[VRR.Main] Set local player job type to ${tempJobType}`); logToConsole(LOG_DEBUG, `[VRR.Job] Set local player job type to ${tempJobType}`);
localPlayerJobType = tempJobType; localPlayerJobType = tempJobType;
} }
// =========================================================================== // ===========================================================================
function setLocalPlayerWorkingState(tempWorking) { function setLocalPlayerWorkingState(tempWorking) {
logToConsole(LOG_DEBUG, `[VRR.Main] Setting working state to ${tempWorking}`); logToConsole(LOG_DEBUG, `[VRR.Job] Setting working state to ${tempWorking}`);
localPlayerWorking = tempWorking; localPlayerWorking = tempWorking;
} }
// =========================================================================== // ===========================================================================
function showJobRouteLocation(position, colour) { function showJobRouteLocation(position, colour) {
logToConsole(LOG_DEBUG, `[VRR.Job] Showing job route location`); logToConsole(LOG_DEBUG, `[VRR.Job] Showing job route location`);
if(getMultiplayerMod() == VRR_MPMOD_GTAC) { if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
if(game.game == VRR_GAME_GTA_SA) { if(game.game == VRR_GAME_GTA_SA) {
jobRouteLocationSphere = game.createPickup(1318, position, 1); // Server-side spheres don't show in GTA SA for some reason.
} else { jobRouteLocationSphere = game.createPickup(1318, position, 1);
jobRouteLocationSphere = game.createSphere(position, 3); } else {
jobRouteLocationSphere.colour = colour; jobRouteLocationSphere = game.createSphere(position, 3);
} jobRouteLocationSphere.colour = colour;
}
if(jobRouteLocationBlip != null) { if(jobRouteLocationBlip != null) {
destroyElement(jobRouteLocationBlip); destroyElement(jobRouteLocationBlip);
} }
blinkJobRouteLocationBlip(10, position, colour); blinkJobRouteLocationBlip(10, position, colour);
} }
} }
// =========================================================================== // ===========================================================================
function enteredJobRouteSphere() { function enteredJobRouteSphere() {
logToConsole(LOG_DEBUG, `[VRR.Job] Entered job route sphere`); logToConsole(LOG_DEBUG, `[VRR.Job] Entered job route sphere`);
tellServerPlayerArrivedAtJobRouteLocation(); tellServerPlayerArrivedAtJobRouteLocation();
destroyElement(jobRouteLocationSphere); destroyElement(jobRouteLocationSphere);
destroyElement(jobRouteLocationBlip); destroyElement(jobRouteLocationBlip);
jobRouteLocationSphere = null; jobRouteLocationSphere = null;
jobRouteLocationBlip = null; jobRouteLocationBlip = null;
} }
// =========================================================================== // ===========================================================================
function blinkJobRouteLocationBlip(times, position, colour) { function blinkJobRouteLocationBlip(times, position, colour) {
for(let i = 1 ; i <= times ; i++) { for(let i = 1 ; i <= times ; i++) {
setTimeout(function() { setTimeout(function() {
if(jobRouteLocationBlip != null) { if(jobRouteLocationBlip != null) {
destroyElement(jobRouteLocationBlip); destroyElement(jobRouteLocationBlip);
jobRouteLocationBlip = null; jobRouteLocationBlip = null;
} else { } else {
jobRouteLocationBlip = game.createBlip(position, 0, 2, colour); jobRouteLocationBlip = game.createBlip(position, 0, 2, colour);
} }
}, 500*i); }, 500*i);
} }
setTimeout(function() { setTimeout(function() {
jobRouteLocationBlip = game.createBlip(position, 0, 2, colour); jobRouteLocationBlip = game.createBlip(position, 0, 2, colour);
}, 500*times+1); }, 500*times+1);
} }
// =========================================================================== // ===========================================================================
function hideJobRouteLocation() { function hideJobRouteLocation() {
destroyElement(jobRouteLocationSphere); destroyElement(jobRouteLocationSphere);
destroyElement(jobRouteLocationBlip); destroyElement(jobRouteLocationBlip);
jobRouteLocationSphere = null; jobRouteLocationSphere = null;
jobRouteLocationBlip = null; jobRouteLocationBlip = null;
}
// ===========================================================================
function receiveJobFromServer(jobId, name, position, blipModel, pickupModel) {
logToConsole(LOG_DEBUG, `[VRR.Job] Received job ${jobId} (${name}) from server`);
if(getGame() == VRR_GAME_GTA_IV) {
if(getJobData(jobId) != false) {
let jobData = getJobData(jobId);
jobData.name = name;
jobData.position = position;
jobData.blipModel = blipModel;
jobData.pickupModel = pickupModel;
logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId} already exists. Checking blip ...`);
if(blipModel == -1) {
if(jobData.blipId != -1) {
logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip has been removed by the server`);
if(getGame() == VRR_GAME_GTA_IV) {
natives.removeBlipAndClearIndex(getJobData(jobId).blipId);
} else {
destroyElement(getElementFromId(blipId));
}
jobData.blipId = -1;
} else {
logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip is unchanged`);
}
} else {
if(jobData.blipId != -1) {
logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip has been changed by the server`);
if(getGame() == VRR_GAME_GTA_IV) {
natives.setBlipCoordinates(jobData.blipId, jobData.position);
natives.changeBlipSprite(jobData.blipId, jobData.blipModel);
natives.setBlipMarkerLongDistance(jobData.blipId, false);
natives.setBlipAsShortRange(jobData.blipId, true);
natives.changeBlipNameFromAscii(jobData.blipId, `${jobData.name.substr(0, 24)}${(jobData.name.length > 24) ? " ...": ""}`);
}
} else {
let blipId = createGameBlip(jobData.blipModel, jobData.position, jobData.name);
if(blipId != -1) {
jobData.blipId = blipId;
}
logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
}
}
} else {
logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId} doesn't exist. Adding ...`);
let tempJobData = new JobData(jobId, name, position, blipModel, pickupModel);
if(blipModel != -1) {
let blipId = createGameBlip(tempJobData.blipModel, tempJobData.position, tempJobData.name);
if(blipId != -1) {
tempJobData.blipId = blipId;
}
logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
} else {
logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId} has no blip.`);
}
jobs.push(tempJobData);
setAllJobDataIndexes();
}
}
}
// ===========================================================================
/**
* @param {number} job - The ID of the job (initially provided by server)
* @return {JobData} The job's data (class instance)
*/
function getJobData(jobId) {
for(let i in jobs) {
if(jobs[i].jobId == jobId) {
return jobs[i];
}
}
return false;
}
// ===========================================================================
function setAllJobDataIndexes() {
for(let i in jobs) {
jobs[i].index = i;
}
} }
// =========================================================================== // ===========================================================================

View File

@@ -1,14 +1,14 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
"target": "es6", "target": "es6",
"moduleResolution": "classic" "moduleResolution": "classic"
}, },
"include": [ "include": [
"*.js", "*.js",
"gui/*.js", "gui/*.js",
"native/*.js", "native/*.js",
"../shared/*.js", "../shared/*.js",
"../third-party/mexui/*" "../third-party/mexui/*"
] ]
} }

View File

@@ -23,71 +23,71 @@ function initKeyBindScript() {
// =========================================================================== // ===========================================================================
function bindAccountKey(key, keyState) { function bindAccountKey(key, keyState) {
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`); logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
keyBinds.push(toInteger(key)); keyBinds.push(toInteger(key));
bindKey(toInteger(key), keyState, function(event) { bindKey(toInteger(key), keyState, function(event) {
if(isAnyGUIActive()) { if(isAnyGUIActive()) {
return false; return false;
} }
if(hasKeyBindDelayElapsed()) { if(hasKeyBindDelayElapsed()) {
if(canLocalPlayerUseKeyBinds()) { if(canLocalPlayerUseKeyBinds()) {
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`); logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
lastKeyBindUse = sdl.ticks; lastKeyBindUse = sdl.ticks;
tellServerPlayerUsedKeyBind(key); tellServerPlayerUsedKeyBind(key);
} else { } else {
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not allowed to use keybinds!`); logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not allowed to use keybinds!`);
} }
} else { } else {
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not enough time has passed since last keybind use!`); logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not enough time has passed since last keybind use!`);
} }
}); });
} }
// =========================================================================== // ===========================================================================
function unBindAccountKey(key) { function unBindAccountKey(key) {
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Unbinded key ${toUpperCase(getKeyNameFromId(key))} (${key})`); logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Unbinded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
unbindKey(key); unbindKey(key);
keyBinds.splice(keyBinds.indexOf(key), 1); keyBinds.splice(keyBinds.indexOf(key), 1);
return true; return true;
} }
// =========================================================================== // ===========================================================================
function hasKeyBindDelayElapsed() { function hasKeyBindDelayElapsed() {
if(sdl.ticks-lastKeyBindUse >= keyBindDelayTime) { if(sdl.ticks-lastKeyBindUse >= keyBindDelayTime) {
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function canLocalPlayerUseKeyBinds() { function canLocalPlayerUseKeyBinds() {
if(isAnyGUIActive()) { if(isAnyGUIActive()) {
return false; return false;
} }
if(!isSpawned) { if(!isSpawned) {
return false; return false;
} }
if(itemActionDelayEnabled) { if(itemActionDelayEnabled) {
return false; return false;
} }
return true; return true;
} }
// =========================================================================== // ===========================================================================
function clearKeyBinds() { function clearKeyBinds() {
for(let i in keyBinds) { for(let i in keyBinds) {
unbindKey(keyBinds[i]); unbindKey(keyBinds[i]);
} }
keyBinds = []; keyBinds = [];
} }
// =========================================================================== // ===========================================================================

View File

@@ -42,268 +42,334 @@ function initLabelScript() {
// =========================================================================== // ===========================================================================
function initLabelPropertyNameFont() { function initLabelPropertyNameFont() {
return lucasFont.createDefaultFont(16.0, "Roboto", "Regular"); return lucasFont.createDefaultFont(16.0, "Roboto", "Regular");
} }
// =========================================================================== // ===========================================================================
function initLabelPropertyLockedFont() { function initLabelPropertyLockedFont() {
return lucasFont.createDefaultFont(12.0, "Roboto", "Light"); return lucasFont.createDefaultFont(12.0, "Roboto", "Light");
} }
// =========================================================================== // ===========================================================================
function initLabelJobNameFont() { function initLabelJobNameFont() {
return lucasFont.createDefaultFont(16.0, "Roboto", "Regular"); return lucasFont.createDefaultFont(16.0, "Roboto", "Regular");
} }
// =========================================================================== // ===========================================================================
function initLabelJobHelpFont() { function initLabelJobHelpFont() {
return lucasFont.createDefaultFont(10.0, "Roboto", "Light"); return lucasFont.createDefaultFont(10.0, "Roboto", "Light");
} }
// =========================================================================== // ===========================================================================
function renderPropertyEntranceLabel(name, position, locked, isBusiness, price, rentPrice, labelInfoType) { function renderPropertyEntranceLabel(name, position, locked, isBusiness, price, rentPrice, labelInfoType) {
if(localPlayer == null) { if(localPlayer == null) {
return false; return false;
} }
if(propertyLabelNameFont == null) { if(propertyLabelNameFont == null) {
return false; return false;
} }
if(propertyLabelLockedFont == null) { if(propertyLabelLockedFont == null) {
return false; return false;
} }
let tempPosition = position; if(getGame() == VRR_GAME_GTA_IV) {
tempPosition.z = tempPosition.z + propertyLabelHeight; if(!natives.doesViewportExist(natives.getGameViewportId())) {
let screenPosition = getScreenFromWorldPosition(tempPosition); logToConsole(LOG_INFO, "[VRR.Label]: Game viewport does not exist!");
return false;
}
if(screenPosition.x < 0 || screenPosition.x > game.width) { if(!natives.isViewportActive(natives.getGameViewportId())) {
return false; logToConsole(LOG_INFO, "[VRR.Label]: Game viewport is not active!");
} return false;
}
}
let text = ""; let tempPosition = position;
if(price > "0") { tempPosition.z = tempPosition.z + propertyLabelHeight;
text = `For sale: $${price}`; let screenPosition = new Vec3(0.0, 0.0, 0.0);
let size = propertyLabelLockedFont.measure(text, game.width, 0.0, 0.0, propertyLabelLockedFont.size, true, true); if(getGame() == VRR_GAME_GTA_IV) {
propertyLabelLockedFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelLockedFont.size, toColour(200, 200, 200, 255), false, true, false, true); screenPosition = natives.getViewportPositionOfCoord(tempPosition, natives.getGameViewportId());
} else {
screenPosition = getScreenFromWorldPosition(tempPosition);
}
screenPosition.y -= propertyLabelPriceOffset; if(screenPosition.x < 0 || screenPosition.x > game.width) {
} return false;
}
text = ""; let text = "";
if(rentPrice != "0") { if(price > "0") {
text = `For rent: $${rentPrice} every payday`; text = getLocaleString("PropertyForSaleLabel", price);
let size = propertyLabelLockedFont.measure(text, game.width, 0.0, 0.0, propertyLabelLockedFont.size, true, true); let size = propertyLabelLockedFont.measure(text, game.width, 0.0, 0.0, propertyLabelLockedFont.size, true, true);
propertyLabelLockedFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelLockedFont.size, toColour(200, 200, 200, 255), false, true, false, true); propertyLabelLockedFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelLockedFont.size, toColour(200, 200, 200, 255), false, true, false, true);
screenPosition.y -= propertyLabelPriceOffset; screenPosition.y -= propertyLabelPriceOffset;
} }
text = "";
if(rentPrice != "0") {
text = getLocaleString("PropertyForRentLabel", rentPrice);
let size = propertyLabelLockedFont.measure(text, game.width, 0.0, 0.0, propertyLabelLockedFont.size, true, true);
propertyLabelLockedFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelLockedFont.size, toColour(200, 200, 200, 255), false, true, false, true);
screenPosition.y -= propertyLabelPriceOffset;
}
if(isBusiness) { if(isBusiness) {
text = (locked) ? "CLOSED" : "OPEN"; text = (locked) ? toUpperCase(getLocaleString("Closed")) : toUpperCase(getLocaleString("Open"));
} else { } else {
text = (locked) ? "LOCKED" : "UNLOCKED"; text = (locked) ? toUpperCase(getLocaleString("Locked")) : toUpperCase(getLocaleString("Unlocked"));
} }
if(!locked && labelInfoType != VRR_PROPLABEL_INFO_NONE) { if(!locked && labelInfoType != VRR_PROPLABEL_INFO_NONE) {
let infoText = ""; let infoText = "";
switch(labelInfoType) { switch(labelInfoType) {
case VRR_PROPLABEL_INFO_ENTER: case VRR_PROPLABEL_INFO_ENTER:
if(enterPropertyKey) { if(enterPropertyKey) {
infoText = `Press ${toUpperCase(getKeyNameFromId(enterPropertyKey))} to enter`; infoText = getLocaleString("PropertyEnterCommandLabel", "/enter");
} else { } else {
infoText = `Use /enter to enter`; infoText = getLocaleString("PropertyEnterKeyPressLabel", getKeyNameFromId(enterPropertyKey));
} }
break; break;
case VRR_PROPLABEL_INFO_BUY: case VRR_PROPLABEL_INFO_BUY:
infoText = `Use /buy to purchase items`; infoText = getLocaleString("BusinessBuyItemsLabel", "/buy");
break; break;
case VRR_PROPLABEL_INFO_BUYBIZ: case VRR_PROPLABEL_INFO_BUYBIZ:
infoText = `Use /buy to purchase items`; infoText = getLocaleString("PropertyForSaleLabel", price);
break; break;
//case VRR_PROPLABEL_INFO_RENTBIZ: //case VRR_PROPLABEL_INFO_RENTBIZ:
// infoText = `Use /bizrent to buy this business`; // infoText = `Use /bizrent to buy this business`;
// break; // break;
case VRR_PROPLABEL_INFO_BUYHOUSE: case VRR_PROPLABEL_INFO_BUYHOUSE:
infoText = `Use /housebuy to buy this house`; infoText = getLocaleString("PropertyForSaleLabel", price);
break; break;
case VRR_PROPLABEL_INFO_RENTHOUSE: case VRR_PROPLABEL_INFO_RENTHOUSE:
infoText = `Use /houserent to rent this house`; infoText = getLocaleString("PropertyForRentLabel", rentPrice);
break; break;
case VRR_PROPLABEL_INFO_ENTERVEH: case VRR_PROPLABEL_INFO_ENTERVEH:
infoText = "Enter a vehicle in the parking lot to buy it"; infoText = getLocaleString("VehicleDealershipLabel");
break; break;
case VRR_PROPLABEL_INFO_NONE: case VRR_PROPLABEL_INFO_NONE:
default: default:
infoText = ""; infoText = "";
break; break;
} }
if(getDistance(localPlayer.position, position) <= renderLabelDistance-2) { if(getDistance(localPlayer.position, position) <= renderLabelDistance-2) {
let size = propertyLabelLockedFont.measure(infoText, game.width, 0.0, 0.0, propertyLabelLockedFont.size, true, true); let size = propertyLabelLockedFont.measure(infoText, game.width, 0.0, 0.0, propertyLabelLockedFont.size, true, true);
propertyLabelLockedFont.render(infoText, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelLockedFont.size, toColour(234, 198, 126, 255), false, true, false, true); propertyLabelLockedFont.render(infoText, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelLockedFont.size, toColour(234, 198, 126, 255), false, true, false, true);
screenPosition.y -= propertyLabelLockedOffset; screenPosition.y -= propertyLabelLockedOffset;
} }
} }
let size = propertyLabelLockedFont.measure(text, game.width, 0.0, 0.0, propertyLabelLockedFont.size, true, true); let size = propertyLabelLockedFont.measure(text, game.width, 0.0, 0.0, propertyLabelLockedFont.size, true, true);
propertyLabelLockedFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelLockedFont.size, (locked) ? lockedColour : unlockedColour, false, true, false, true); propertyLabelLockedFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelLockedFont.size, (locked) ? lockedColour : unlockedColour, false, true, false, true);
screenPosition.y -= propertyLabelNameOffset; screenPosition.y -= propertyLabelNameOffset;
text = name || " "; text = name || " ";
size = propertyLabelNameFont.measure(text, game.width, 0.0, 0.0, propertyLabelNameFont.size, true, true); size = propertyLabelNameFont.measure(text, game.width, 0.0, 0.0, propertyLabelNameFont.size, true, true);
propertyLabelNameFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelNameFont.size, (isBusiness) ? toColour(0, 153, 255, 255) : toColour(17, 204, 17, 255), false, true, false, true); propertyLabelNameFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelNameFont.size, (isBusiness) ? toColour(0, 153, 255, 255) : toColour(17, 204, 17, 255), false, true, false, true);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
function renderPropertyExitLabel(position) { function renderPropertyExitLabel(position) {
if(localPlayer == null) { if(localPlayer == null) {
return false; return false;
} }
if(propertyLabelNameFont == null) { if(propertyLabelNameFont == null) {
return false; return false;
} }
if(propertyLabelLockedFont == null) { if(propertyLabelLockedFont == null) {
return false; return false;
} }
let tempPosition = position; if(getGame() == VRR_GAME_GTA_IV) {
tempPosition.z = tempPosition.z + propertyLabelHeight; if(!natives.doesViewportExist(natives.getGameViewportId())) {
let screenPosition = getScreenFromWorldPosition(tempPosition); logToConsole(LOG_INFO, "[VRR.Label]: Game viewport does not exist!");
return false;
}
if(screenPosition.x < 0 || screenPosition.x > game.width) { if(!natives.isViewportActive(natives.getGameViewportId())) {
return false; logToConsole(LOG_INFO, "[VRR.Label]: Game viewport is not active!");
} return false;
}
}
let text = "EXIT"; let tempPosition = position;
let size = propertyLabelNameFont.measure(text, game.width, 0.0, 0.0, propertyLabelNameFont.size, true, true); tempPosition.z = tempPosition.z + propertyLabelHeight;
propertyLabelNameFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelNameFont.size, COLOUR_WHITE, false, true, false, true); let screenPosition = new Vec3(0.0, 0.0, 0.0);
if(getGame() == VRR_GAME_GTA_IV) {
screenPosition = natives.getViewportPositionOfCoord(tempPosition, natives.getGameViewportId());
} else {
screenPosition = getScreenFromWorldPosition(tempPosition);
}
if(screenPosition.x < 0 || screenPosition.x > game.width) {
return false;
}
let text = "EXIT";
let size = propertyLabelNameFont.measure(text, game.width, 0.0, 0.0, propertyLabelNameFont.size, true, true);
propertyLabelNameFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, propertyLabelNameFont.size, COLOUR_WHITE, false, true, false, true);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
function renderJobLabel(name, position, jobType) { function renderJobLabel(name, position, jobType) {
if(localPlayer == null) { if(localPlayer == null) {
return false; return false;
} }
if(jobNameLabelFont == null) { if(jobNameLabelFont == null) {
return false; return false;
} }
if(jobHelpLabelFont == null) { if(jobHelpLabelFont == null) {
return false; return false;
} }
let tempPosition = position; if(getGame() == VRR_GAME_GTA_IV) {
tempPosition.z = tempPosition.z + propertyLabelHeight; if(!natives.doesViewportExist(natives.getGameViewportId())) {
let screenPosition = getScreenFromWorldPosition(tempPosition); logToConsole(LOG_INFO, "[VRR.Label]: Game viewport does not exist!");
return false;
}
if(screenPosition.x < 0 || screenPosition.x > game.width) { if(!natives.isViewportActive(natives.getGameViewportId())) {
return false; logToConsole(LOG_INFO, "[VRR.Label]: Game viewport is not active!");
} return false;
}
}
let text = ""; let tempPosition = position;
if(jobType == localPlayerJobType) { tempPosition.z = tempPosition.z + propertyLabelHeight;
if(localPlayerWorking) { let screenPosition = new Vec3(0.0, 0.0, 0.0);
text = "Use /uniform and /equip for job stuff, or /stopwork to go off duty"; if(getGame() == VRR_GAME_GTA_IV) {
} else { screenPosition = natives.getViewportPositionOfCoord(tempPosition, natives.getGameViewportId());
text = "Use /startwork to go on duty"; } else {
} screenPosition = getScreenFromWorldPosition(tempPosition);
} else { }
if(localPlayerJobType == 0) {
text = "Use /takejob to work here";
} else {
text = "You already have a job. Use /quitjob if you want this one";
}
}
let size = jobHelpLabelFont.measure(text, game.width, 0.0, 0.0, jobHelpLabelFont.size, true, true); if(screenPosition.x < 0 || screenPosition.x > game.width) {
jobHelpLabelFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, jobHelpLabelFont.size, COLOUR_YELLOW, false, true, false, true); return false;
}
screenPosition.y -= 18; let text = "";
if(jobType == localPlayerJobType) {
if(localPlayerWorking) {
text = getLocaleString("JobEquipAndUniformLabel", "/equip", "/uniform", "/stopwork");
} else {
text = getLocaleString("StartWorkLabel", "/startwork");
}
} else {
if(localPlayerJobType == 0) {
text = getLocaleString("TakeJobLabel", "/takejob");
} else {
text = getLocaleString("NotYourJobLabel", "/quitjob");
}
}
text = name + " Job"; let size = jobHelpLabelFont.measure(text, game.width, 0.0, 0.0, jobHelpLabelFont.size, true, true);
size = jobNameLabelFont.measure(text, game.width, 0.0, 0.0, jobNameLabelFont.size, true, true); jobHelpLabelFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, jobHelpLabelFont.size, COLOUR_YELLOW, false, true, false, true);
jobNameLabelFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, jobNameLabelFont.size, COLOUR_WHITE, false, true, false, true);
screenPosition.y -= 18;
text = getLocaleString("JobLabel", name);
size = jobNameLabelFont.measure(text, game.width, 0.0, 0.0, jobNameLabelFont.size, true, true);
jobNameLabelFont.render(text, [screenPosition.x-size[0]/2, screenPosition.y-size[1]/2], game.width, 0.0, 0.0, jobNameLabelFont.size, COLOUR_WHITE, false, true, false, true);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
function processLabelRendering() { function processLabelRendering() {
if(renderLabels) { if(renderLabels) {
if(!areServerElementsSupported()) { if(!areServerElementsSupported()) {
if(localPlayer != null) { if(localPlayer != null) {
for(let i in businesses) { getServerData().businesses.forEach((business) => {
if(getDistance(localPlayer.position, businesses[i].entrancePosition) <= 75.0) { if(getDistance(localPlayer.position, business.entrancePosition) <= 75.0) {
natives.drawColouredCylinder(getPosBelowPos(businesses[i].entrancePosition, 1.0), 0.0, 0.0, 0, 153, 255, 255); natives.drawColouredCylinder(getPosBelowPos(business.entrancePosition, 1.0), 0.0, 0.0, 0, 153, 255, 255);
} //renderPropertyEntranceLabel(business.name, business.entrancePosition, business.locked, true, makeLargeNumberReadable(business.price), makeLargeNumberReadable(business.rentPrice), business.labelInfoType);
} }
} });
}
if(areWorldLabelsSupported()) { getServerData().houses.forEach((house) => {
if(localPlayer != null) { if(getDistance(localPlayer.position, house.entrancePosition) <= 75.0) {
let pickups = getElementsByType(ELEMENT_PICKUP); natives.drawColouredCylinder(getPosBelowPos(house.entrancePosition, 1.0), 0.0, 0.0, 0, 200, 0, 255);
for(let i in pickups) { //renderPropertyEntranceLabel("House", house.entrancePosition, house.locked, true, makeLargeNumberReadable(house.price), makeLargeNumberReadable(house.rentPrice), 0);
if(pickups[i].getData("vrr.label.type") != null) { }
if(getDistance(localPlayer.position, pickups[i].position) <= renderLabelDistance) { });
if(!pickups[i].isOnScreen) {
let price = "0";
let rentPrice = "0";
let labelInfoType = VRR_PROPLABEL_INFO_NONE;
if(pickups[i].getData("vrr.label.price") != null) {
price = makeLargeNumberReadable(pickups[i].getData("vrr.label.price"));
}
if(pickups[i].getData("vrr.label.rentprice") != null) { getServerData().jobs.forEach((job) => {
rentPrice = makeLargeNumberReadable(pickups[i].getData("vrr.label.rentprice")); if(getDistance(localPlayer.position, job.position) <= 75.0) {
} natives.drawColouredCylinder(getPosBelowPos(job.position, 1.0), 0.0, 0.0, 255, 255, 0, 255);
//renderJobLabel(job.name, job.position, job.jobType);
}
});
}
}
if(pickups[i].getData("vrr.label.help") != null) { if(areWorldLabelsSupported()) {
labelInfoType = pickups[i].getData("vrr.label.help"); if(localPlayer != null) {
} let pickups = getElementsByType(ELEMENT_PICKUP);
for(let i in pickups) {
if(pickups[i].getData("vrr.label.type") != null) {
if(getDistance(localPlayer.position, pickups[i].position) <= renderLabelDistance) {
if(!pickups[i].isOnScreen) {
let price = "0";
let rentPrice = "0";
let labelInfoType = VRR_PROPLABEL_INFO_NONE;
if(pickups[i].getData("vrr.label.price") != null) {
price = makeLargeNumberReadable(pickups[i].getData("vrr.label.price"));
}
switch(pickups[i].getData("vrr.label.type")) { if(pickups[i].getData("vrr.label.rentprice") != null) {
case VRR_LABEL_BUSINESS: rentPrice = makeLargeNumberReadable(pickups[i].getData("vrr.label.rentprice"));
renderPropertyEntranceLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.locked"), true, price, rentPrice, labelInfoType); }
break;
case VRR_LABEL_HOUSE: if(pickups[i].getData("vrr.label.help") != null) {
renderPropertyEntranceLabel("House", pickups[i].position, pickups[i].getData("vrr.label.locked"), false, price, rentPrice, labelInfoType); labelInfoType = pickups[i].getData("vrr.label.help");
break; }
case VRR_LABEL_JOB: switch(pickups[i].getData("vrr.label.type")) {
renderJobLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.jobType")); case VRR_LABEL_BUSINESS:
break; renderPropertyEntranceLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.locked"), true, price, rentPrice, labelInfoType);
break;
case VRR_LABEL_EXIT: case VRR_LABEL_HOUSE:
renderPropertyExitLabel(pickups[i].position); renderPropertyEntranceLabel("House", pickups[i].position, pickups[i].getData("vrr.label.locked"), false, price, rentPrice, labelInfoType);
break; break;
}
} case VRR_LABEL_JOB:
} renderJobLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.jobType"));
} break;
}
} case VRR_LABEL_EXIT:
} renderPropertyExitLabel(pickups[i].position);
} break;
}
}
}
}
}
}
}
}
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------

31
scripts/client/locale.js Normal file
View File

@@ -0,0 +1,31 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: locale.js
// DESC: Provides locale functions and usage
// TYPE: Client (JavaScript)
// ===========================================================================
function getLocaleString(stringName, ...args) {
if(typeof getServerData().localeStrings[stringName] == undefined) {
return "";
}
let tempString = getServerData().localeStrings[stringName];
for(let i = 1; i <= args.length; i++) {
tempString = tempString.replace(`{${i}}`, args[i-1]);
}
return tempString;
}
// ===========================================================================
function receiveLocaleStringFromServer(stringName, stringValue) {
logToConsole(LOG_INFO, `[VRR.Locale]: Received locale string "${stringName}" from server (${stringValue})`);
getServerData().localeStrings[stringName] = stringValue;
}
// ===========================================================================

View File

@@ -15,38 +15,38 @@ let logoSize = toVector2(128, 128);
function initLogoScript() { function initLogoScript() {
logToConsole(LOG_DEBUG, "[VRR.Logo]: Initializing logo script ..."); logToConsole(LOG_DEBUG, "[VRR.Logo]: Initializing logo script ...");
//logoImage = loadLogoImage(); //logoImage = loadLogoImage();
logToConsole(LOG_DEBUG, "[VRR.Logo]: Logo script initialized!"); logToConsole(LOG_DEBUG, "[VRR.Logo]: Logo script initialized!");
} }
// =========================================================================== // ===========================================================================
function loadLogoImage() { function loadLogoImage() {
let logoStream = openFile(mainLogoPath); let logoStream = openFile(mainLogoPath);
let tempLogoImage = null; let tempLogoImage = null;
if(logoStream != null) { if(logoStream != null) {
tempLogoImage = graphics.loadPNG(logoStream); tempLogoImage = graphics.loadPNG(logoStream);
logoStream.close(); logoStream.close();
} }
return tempLogoImage; return tempLogoImage;
} }
// =========================================================================== // ===========================================================================
function processLogoRendering() { function processLogoRendering() {
if(renderLogo) { if(renderLogo) {
if(logoImage != null) { if(logoImage != null) {
graphics.drawRectangle(logoImage, logoPos, logoSize); graphics.drawRectangle(logoImage, logoPos, logoSize);
} }
} }
} }
// =========================================================================== // ===========================================================================
function setServerLogoRenderState(state) { function setServerLogoRenderState(state) {
logToConsole(LOG_DEBUG, `[VRR.Main] Server logo ${(state) ? "enabled" : "disabled"}`); logToConsole(LOG_DEBUG, `[VRR.Main] Server logo ${(state) ? "enabled" : "disabled"}`);
renderLogo = state; renderLogo = state;
} }
// =========================================================================== // ===========================================================================

View File

@@ -27,7 +27,7 @@ let renderHotBar = true;
let renderItemActionDelay = true; let renderItemActionDelay = true;
let renderInteriorLights = true; let renderInteriorLights = true;
let logLevel = LOG_ERROR|LOG_WARN|LOG_INFO; let logLevel = LOG_INFO|LOG_DEBUG|LOG_VERBOSE|LOG_WARN|LOG_ERROR;
let weaponDamageEnabled = {}; let weaponDamageEnabled = {};
let weaponDamageEvent = {}; let weaponDamageEvent = {};
@@ -66,12 +66,21 @@ let vehiclePurchasePosition = null;
let forceWantedLevel = 0; let forceWantedLevel = 0;
let guiSubmitKey = false;
let guiLeftKey = false;
let guiRightKey = false;
let guiUpKey = false;
let guiDownKey = false;
// Pre-cache all allowed skins // Pre-cache all allowed skins
let allowedSkins = getAllowedSkins(getGame()); let allowedSkins = getAllowedSkins(getGame());
let businesses = []; let serverData = {
let houses = []; houses: [],
let jobs = []; businesses: [],
let vehicles = []; localeStrings: [],
vehicles: [],
jobs: [],
};
// =========================================================================== // ===========================================================================

View File

@@ -7,7 +7,14 @@
// TYPE: Client (JavaScript) // TYPE: Client (JavaScript)
// =========================================================================== // ===========================================================================
let smallGameMessageFont = null; let bigGameMessageFonts = {};
let bigGameMessageFontName = "";
let bigGameMessageText = "";
let bigGameMessageColour = COLOUR_WHITE;
let bigGameMessageTimer = null;
let smallGameMessageFonts = {};
let smallGameMessageFontName = "";
let smallGameMessageText = ""; let smallGameMessageText = "";
let smallGameMessageColour = COLOUR_WHITE; let smallGameMessageColour = COLOUR_WHITE;
let smallGameMessageTimer = null; let smallGameMessageTimer = null;
@@ -16,64 +23,73 @@ let smallGameMessageTimer = null;
function initMessagingScript() { function initMessagingScript() {
logToConsole(LOG_DEBUG, "[VRR.Messaging]: Initializing messaging script ..."); logToConsole(LOG_DEBUG, "[VRR.Messaging]: Initializing messaging script ...");
smallGameMessageFont = loadSmallGameMessageFont(); smallGameMessageFonts = loadSmallGameMessageFonts();
bigGameMessageFonts = loadSmallGameMessageFonts();
logToConsole(LOG_DEBUG, "[VRR.Messaging]: Messaging script initialized!"); logToConsole(LOG_DEBUG, "[VRR.Messaging]: Messaging script initialized!");
} }
// =========================================================================== // ===========================================================================
function loadSmallGameMessageFont() { function loadSmallGameMessageFonts() {
let tempSmallGameMessageFont = null; let tempSmallGameMessageFonts = {};
let fontStream = openFile("files/fonts/pricedown.ttf"); let fontStream = openFile("files/fonts/pricedown.ttf");
if(fontStream != null) { if(fontStream != null) {
tempSmallGameMessageFont = lucasFont.createFont(fontStream, 20.0); tempSmallGameMessageFonts["Pricedown"] = lucasFont.createFont(fontStream, 20.0);
fontStream.close(); fontStream.close();
} }
return tempSmallGameMessageFont; tempSmallGameMessageFonts["Roboto"] = lucasFont.createDefaultFont(20.0, "Roboto");
tempSmallGameMessageFonts["RobotoLight"] = lucasFont.createDefaultFont(20.0, "Roboto", "Light");
return tempSmallGameMessageFonts;
} }
// =========================================================================== // ===========================================================================
function loadBigGameMessageFont() { function loadBigGameMessageFont() {
let tempBigGameMessageFont = null; let tempBigGameMessageFonts = {};
let fontStream = openFile("files/fonts/pricedown.ttf"); let fontStream = openFile("files/fonts/pricedown.ttf");
if(fontStream != null) { if(fontStream != null) {
tempBigGameMessageFont = lucasFont.createFont(fontStream, 28.0); tempBigGameMessageFonts["Pricedown"] = lucasFont.createFont(fontStream, 28.0);
fontStream.close(); fontStream.close();
} }
return tempBigGameMessageFont; tempBigGameMessageFonts["Roboto"] = lucasFont.createDefaultFont(28.0, "Roboto");
tempBigGameMessageFonts["RobotoLight"] = lucasFont.createDefaultFont(28.0, "Roboto", "Light");
return tempBigGameMessageFonts;
} }
// =========================================================================== // ===========================================================================
function processSmallGameMessageRendering() { function processSmallGameMessageRendering() {
if(renderSmallGameMessage) { if(renderSmallGameMessage) {
if(smallGameMessageFont != null) { if(smallGameMessageText != "") {
if(smallGameMessageFont != "") { if(smallGameMessageFonts[smallGameMessageFontName] != null) {
smallGameMessageFont.render(smallGameMessageText, [0, game.height-90], game.width, 0.5, 0.0, smallGameMessageFont.size, smallGameMessageColour, true, true, false, true); smallGameMessageFonts[smallGameMessageFontName].render(smallGameMessageText, [0, game.height-90], game.width, 0.5, 0.0, smallGameMessageFonts[smallGameMessageFontName].size, smallGameMessageColour, true, true, false, true);
} }
} }
} }
} }
// =========================================================================== // ===========================================================================
function showSmallGameMessage(text, colour, duration) { function showSmallGameMessage(text, colour, duration, fontName) {
logToConsole(LOG_DEBUG, `[VRR.Messaging] Showing small game message '${text}' for ${duration}ms`); logToConsole(LOG_DEBUG, `[VRR.Messaging] Showing small game message '${text}' using font ${fontName} for ${duration}ms`);
if(smallGameMessageText != "") { if(smallGameMessageText != "") {
clearTimeout(smallGameMessageTimer); clearTimeout(smallGameMessageTimer);
} }
smallGameMessageColour = colour; smallGameMessageFontName = fontName;
smallGameMessageText = text; smallGameMessageColour = colour;
smallGameMessageText = text;
smallGameMessageTimer = setTimeout(function() { smallGameMessageTimer = setTimeout(function() {
smallGameMessageText = ""; smallGameMessageText = "";
smallGameMessageColour = COLOUR_WHITE; smallGameMessageColour = COLOUR_WHITE;
smallGameMessageTimer = null; smallGameMessageTimer = null;
}, duration); smallGameMessageFontName = "";
}, duration);
} }
// =========================================================================== // ===========================================================================

View File

@@ -632,10 +632,10 @@ function update()
addEventHandler("OnCameraProcess", (event) => addEventHandler("OnCameraProcess", (event) =>
{ {
if(mouseCameraEnabled) { if(mouseCameraEnabled) {
update(); update();
event.preventDefault(); event.preventDefault();
} }
}); });
function toggleMouseCamera() { function toggleMouseCamera() {

View File

@@ -51,8 +51,8 @@ function updatePlayerNameTag(clientName, characterName, colour, paused, ping) {
if(game.game == VRR_GAME_GTA_IV) { if(game.game == VRR_GAME_GTA_IV) {
let client = getPlayerFromParams(clientName); let client = getPlayerFromParams(clientName);
if(client != false) { if(client != false) {
if(client.player != null) { if(getPlayerPed(client) != null) {
client.player.setNametag(characterName, colour); getPlayerPed(client).setNametag(characterName, colour);
} }
} }
} }
@@ -74,11 +74,11 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour,
alpha *= 0.75; alpha *= 0.75;
let width = nametagWidth; let width = nametagWidth;
health = Math.max(0.0, Math.min(1.0, health)); health = Math.max(0.0, Math.min(1.0, health));
armour = Math.max(0.0, Math.min(1.0, armour)); armour = Math.max(0.0, Math.min(1.0, armour));
// Starts at bottom and works it's way up // Starts at bottom and works it's way up
// ------------------------------------------- // -------------------------------------------
// Health Bar // Health Bar
if(getMultiplayerMod() == VRR_MPMOD_GTAC) { if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
if(game.game == VRR_GAME_GTA_III) { if(game.game == VRR_GAME_GTA_III) {
@@ -104,7 +104,7 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour,
graphics.drawRectangle(null, [hx+2, hy+2], [(width-4)*health, 10-6], colour, colour, colour, colour); graphics.drawRectangle(null, [hx+2, hy+2], [(width-4)*health, 10-6], colour, colour, colour, colour);
} }
// Armour Bar // Armour Bar
if (armour > 0.0) if (armour > 0.0)
{ {
// Go up 10 pixels to draw the next part // Go up 10 pixels to draw the next part
@@ -119,16 +119,16 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour,
y -= 20; y -= 20;
// Nametag // Nametag
if(nametagFont != null) { if(nametagFont != null) {
let size = nametagFont.measure(text, game.width, 0.0, 0.0, nametagFont.size, false, false); let size = nametagFont.measure(text, game.width, 0.0, 0.0, nametagFont.size, false, false);
nametagFont.render(text, [x-size[0]/2, y-size[1]/2], game.width, 0.0, 0.0, nametagFont.size, colour, false, false, false, true); nametagFont.render(text, [x-size[0]/2, y-size[1]/2], game.width, 0.0, 0.0, nametagFont.size, colour, false, false, false, true);
} }
// Go up another 10 pixels for the next part // Go up another 10 pixels for the next part
y -= 20; y -= 20;
// AFK Status // AFK Status
if(afkStatusFont != null) { if(afkStatusFont != null) {
if(afk) { if(afk) {
let size = afkStatusFont.measure("PAUSED", game.width, 0.0, 0.0, afkStatusFont.size, false, false); let size = afkStatusFont.measure("PAUSED", game.width, 0.0, 0.0, afkStatusFont.size, false, false);
@@ -147,7 +147,7 @@ function updateNametags(element) {
if(localPlayer != null) { if(localPlayer != null) {
let playerPos = localPlayer.position; let playerPos = localPlayer.position;
let elementPos = element.position; let elementPos = element.position;
let client = getClientFromPlayerElement(element); let client = getClientFromPlayerElement(element);
elementPos[2] += 0.9; elementPos[2] += 0.9;
@@ -173,26 +173,26 @@ function updateNametags(element) {
} }
if(element.type == ELEMENT_PLAYER) { if(element.type == ELEMENT_PLAYER) {
let name = element.name; let name = element.name;
let colour = COLOUR_WHITE; let colour = COLOUR_WHITE;
let paused = false; let paused = false;
let ping = -1; let ping = -1;
if(typeof playerNames[element.name] != "undefined") { if(typeof playerNames[element.name] != "undefined") {
name = playerNames[element.name]; name = playerNames[element.name];
}
if(typeof playerPaused[element.name] != "undefined") {
paused = playerPaused[element.name];
}
if(typeof playerColours[element.name] != "undefined") {
colour = playerColours[element.name];
} }
if(typeof playerPing[element.name] != "undefined") { if(typeof playerPaused[element.name] != "undefined") {
ping = playerPing[element.name]; paused = playerPaused[element.name];
} }
if(typeof playerColours[element.name] != "undefined") {
colour = playerColours[element.name];
}
if(typeof playerPing[element.name] != "undefined") {
ping = playerPing[element.name];
}
drawNametag(screenPos[0], screenPos[1], health, armour, name, ping, 1.0-distance/nametagDistance, distance, colour, paused, element.skin); drawNametag(screenPos[0], screenPos[1], health, armour, name, ping, 1.0-distance/nametagDistance, distance, colour, paused, element.skin);
} }
@@ -205,7 +205,7 @@ function updateNametags(element) {
function getClientFromPlayer(player) { function getClientFromPlayer(player) {
getClients().forEach(function(client) { getClients().forEach(function(client) {
if(client.player == player) { if(getPlayerPed(client) == player) {
return client; return client;
} }
}); });

View File

@@ -8,57 +8,61 @@
// =========================================================================== // ===========================================================================
function sendNetworkEventToPlayer(networkEvent, client, ...args) { function sendNetworkEventToPlayer(networkEvent, client, ...args) {
triggerNetworkEvent.apply(null, networkEvent, client, args); triggerNetworkEvent.apply(null, networkEvent, client, args);
} }
// =========================================================================== // ===========================================================================
function getPlayerPosition() { function getPlayerPosition() {
return localPlayer.position; return localPlayer.position;
} }
// =========================================================================== // ===========================================================================
function setPlayerPosition(position) { function setPlayerPosition(position) {
localPlayer.position = position; if(getGame() == VRR_GAME_GTA_IV) {
natives.setCharCoordinates(localPlayer, position);
} else {
localPlayer.position = position;
}
} }
// =========================================================================== // ===========================================================================
function getElementPosition(element) { function getElementPosition(element) {
return element.position; return element.position;
} }
// =========================================================================== // ===========================================================================
function setElementPosition(element, position) { function setElementPosition(element, position) {
if(!element.isSyncer) { if(!element.isSyncer) {
return false; return false;
} }
element.position = position; element.position = position;
} }
// =========================================================================== // ===========================================================================
function deleteGameElement(element, position) { function deleteGameElement(element, position) {
if(!element.isOwner) { if(!element.isOwner) {
return false; return false;
} }
destroyGameElement(element); destroyGameElement(element);
} }
// =========================================================================== // ===========================================================================
function createGameVehicle(modelIndex, position, heading) { function createGameVehicle(modelIndex, position, heading) {
return game.createVehicle(getGameConfig().vehicles[getGame()][modelIndex][0], position, heading); return game.createVehicle(getGameConfig().vehicles[getGame()][modelIndex][0], position, heading);
} }
// =========================================================================== // ===========================================================================
function addNetworkEventHandler(eventName, handlerFunction) { function addNetworkEventHandler(eventName, handlerFunction) {
addNetworkHandler(eventName, handlerFunction); addNetworkHandler(eventName, handlerFunction);
} }
// =========================================================================== // ===========================================================================
@@ -142,3 +146,46 @@ function getVehiclesInRange(position, range) {
} }
// =========================================================================== // ===========================================================================
function createGameBlip(blipModel, position, name = "") {
if(getGame() == VRR_GAME_GTA_IV) {
let blipId = natives.addBlipForCoord(position);
if(blipId) {
natives.changeBlipSprite(blipId, blipModel);
natives.setBlipMarkerLongDistance(blipId, false);
natives.setBlipAsShortRange(blipId, true);
natives.changeBlipNameFromAscii(blipId, `${name.substr(0, 24)}${(name.length > 24) ? " ...": ""}`);
return blipId;
}
}
return -1;
}
// ===========================================================================
function setEntityData(entity, dataName, dataValue, syncToClients = true) {
if(entity != null) {
return entity.setData(dataName, dataValue);
}
}
// ===========================================================================
function removeEntityData(entity, dataName) {
if(entity != null) {
return entity.removeData(dataName);
}
return null;
}
// ===========================================================================
function doesEntityDataExist(entity, dataName) {
if(entity != null) {
return (entity.getData(dataName) != null);
}
return null;
}
// ===========================================================================

View File

@@ -8,39 +8,39 @@
// =========================================================================== // ===========================================================================
function playStreamingRadio(url, loop, volume, element = false) { function playStreamingRadio(url, loop, volume, element = false) {
if(streamingRadio != null) { if(streamingRadio != null) {
streamingRadio.stop(); streamingRadio.stop();
} }
streamingRadioVolume = volume; streamingRadioVolume = volume;
streamingRadio = audio.createSoundFromURL(url, loop); streamingRadio = audio.createSoundFromURL(url, loop);
streamingRadio.volume = volume/100; streamingRadio.volume = volume/100;
streamingRadio.play(); streamingRadio.play();
} }
// =========================================================================== // ===========================================================================
function stopStreamingRadio() { function stopStreamingRadio() {
if(streamingRadio != null) { if(streamingRadio != null) {
streamingRadio.stop(); streamingRadio.stop();
} }
streamingRadio = null; streamingRadio = null;
} }
// =========================================================================== // ===========================================================================
function setStreamingRadioVolume(volume) { function setStreamingRadioVolume(volume) {
if(streamingRadio != null) { if(streamingRadio != null) {
streamingRadioVolume = volume; streamingRadioVolume = volume;
streamingRadio.volume = volume/100; streamingRadio.volume = volume/100;
} }
} }
// =========================================================================== // ===========================================================================
function playAudioFile(audioName, loop, volume) { function playAudioFile(audioName, loop, volume) {
playCustomAudio(audioName, volume/100, loop); findResourceByName("connectedrp-extra").exports.playCustomAudio(audioName, volume/100, loop);
} }
// =========================================================================== // ===========================================================================

View File

@@ -43,7 +43,7 @@ function processScoreBoardRendering() {
} }
if(renderScoreBoard) { if(renderScoreBoard) {
if(isKeyDown(SDLK_TAB)) { if(isKeyDown(SDLK_TAB)) {
if(scoreBoardListFont != null && scoreBoardTitleFont != null) { if(scoreBoardListFont != null && scoreBoardTitleFont != null) {
let scoreboardStart = (game.height/2)-(Math.floor(getClients().length/2)*20); let scoreboardStart = (game.height/2)-(Math.floor(getClients().length/2)*20);
let titleSize = scoreBoardTitleFont.measure("PLAYERS", game.width, 0.0, 1.0, 10, false, false); let titleSize = scoreBoardTitleFont.measure("PLAYERS", game.width, 0.0, 1.0, 10, false, false);

View File

@@ -8,197 +8,216 @@
// =========================================================================== // ===========================================================================
function initServerScript() { function initServerScript() {
logToConsole(LOG_DEBUG, "[VRR.Server]: Initializing server script ..."); logToConsole(LOG_DEBUG, "[VRR.Server]: Initializing server script ...");
addAllNetworkHandlers(); addAllNetworkHandlers();
logToConsole(LOG_DEBUG, "[VRR.Server]: Server script initialized!"); logToConsole(LOG_DEBUG, "[VRR.Server]: Server script initialized!");
} }
// =========================================================================== // ===========================================================================
function addAllNetworkHandlers() { function addAllNetworkHandlers() {
logToConsole(LOG_DEBUG, "[VRR.Server]: Adding network handlers ..."); logToConsole(LOG_DEBUG, "[VRR.Server]: Adding network handlers ...");
addNetworkEventHandler("vrr.smallGameMessage", showSmallGameMessage); // Chat history
addNetworkEventHandler("vrr.working", setLocalPlayerWorkingState); addNetworkEventHandler("m", receiveChatBoxMessageFromServer); // Not prefixed with VRR to make it as small as possible
addNetworkEventHandler("vrr.jobType", setLocalPlayerJobType); addNetworkEventHandler("vrr.chatScrollLines", setChatScrollLines);
addNetworkEventHandler("vrr.passenger", enterVehicleAsPassenger); addNetworkEventHandler("vrr.chatAutoHideDelay", setChatAutoHideDelay);
addNetworkEventHandler("vrr.freeze", setLocalPlayerFrozenState); // Messaging (like textdraws and stuff)
addNetworkEventHandler("vrr.control", setLocalPlayerControlState); addNetworkEventHandler("vrr.smallGameMessage", showSmallGameMessage);
addNetworkEventHandler("vrr.fadeCamera", fadeLocalCamera);
addNetworkEventHandler("vrr.removeFromVehicle", removeLocalPlayerFromVehicle);
addNetworkEventHandler("vrr.clearPeds", clearLocalPlayerOwnedPeds);
addNetworkEventHandler("vrr.restoreCamera", restoreLocalCamera);
addNetworkEventHandler("vrr.cameraLookAt", setLocalCameraLookAt);
addNetworkEventHandler("vrr.logo", setServerLogoRenderState);
addNetworkEventHandler("vrr.ambience", setCityAmbienceState);
addNetworkEventHandler("vrr.runCode", runClientCode);
addNetworkEventHandler("vrr.clearWeapons", clearLocalPlayerWeapons);
addNetworkEventHandler("vrr.giveWeapon", giveLocalPlayerWeapon);
addNetworkEventHandler("vrr.position", setLocalPlayerPosition);
addNetworkEventHandler("vrr.heading", setLocalPlayerHeading);
addNetworkEventHandler("vrr.interior", setLocalPlayerInterior);
addNetworkEventHandler("vrr.minuteDuration", setMinuteDuration);
addNetworkEventHandler("vrr.showJobRouteLocation", showJobRouteLocation);
addNetworkEventHandler("vrr.hideJobRouteLocation", hideJobRouteLocation);
addNetworkEventHandler("vrr.snow", setSnowState);
addNetworkEventHandler("vrr.health", setLocalPlayerHealth);
addNetworkEventHandler("vrr.enterPropertyKey", setEnterPropertyKey);
addNetworkEventHandler("vrr.skinSelect", toggleSkinSelect);
addNetworkEventHandler("vrr.hotbar", updatePlayerHotBar);
addNetworkEventHandler("vrr.pedSpeech", playPedSpeech);
addNetworkEventHandler("vrr.clearPedState", clearLocalPedState);
addNetworkEventHandler("vrr.drunkEffect", setLocalPlayerDrunkEffect);
addNetworkEventHandler("vrr.showItemActionDelay", showItemActionDelay);
addNetworkEventHandler("vrr.set2DRendering", setPlayer2DRendering);
addNetworkEventHandler("vrr.mouseCursor", toggleMouseCursor);
addNetworkEventHandler("vrr.mouseCamera", toggleMouseCamera);
addNetworkEventHandler("vrr.mouseCameraForce", setMouseCameraState);
addNetworkEventHandler("vrr.weaponDamageEnabled", setPlayerWeaponDamageEnabled);
addNetworkEventHandler("vrr.weaponDamageEvent", setPlayerWeaponDamageEvent);
addNetworkEventHandler("vrr.spawned", onServerSpawnedPlayer);
addNetworkEventHandler("vrr.money", setLocalPlayerCash);
addNetworkEventHandler("vrr.armour", setLocalPlayerArmour);
addNetworkEventHandler("vrr.wantedLevel", forceLocalPlayerWantedLevel);
addNetworkEventHandler("vrr.delKeyBind", unBindAccountKey); // Job
addNetworkEventHandler("vrr.addKeyBind", bindAccountKey); addNetworkEventHandler("vrr.job", receiveJobFromServer);
addNetworkEventHandler("vrr.clearKeyBinds", clearKeyBinds); addNetworkEventHandler("vrr.working", setLocalPlayerWorkingState);
addNetworkEventHandler("vrr.jobType", setLocalPlayerJobType);
addNetworkEventHandler("vrr.showJobRouteLocation", showJobRouteLocation);
addNetworkEventHandler("vrr.hideJobRouteLocation", hideJobRouteLocation);
addNetworkEventHandler("vrr.nametag", updatePlayerNameTag); // Local player states and values
addNetworkEventHandler("vrr.ping", updatePlayerPing); addNetworkEventHandler("vrr.restoreCamera", restoreLocalCamera);
addNetworkEventHandler("vrr.cameraLookAt", setLocalCameraLookAt);
addNetworkEventHandler("vrr.freeze", setLocalPlayerFrozenState);
addNetworkEventHandler("vrr.control", setLocalPlayerControlState);
addNetworkEventHandler("vrr.fadeCamera", fadeLocalCamera);
addNetworkEventHandler("vrr.removeFromVehicle", removeLocalPlayerFromVehicle);
addNetworkEventHandler("vrr.clearWeapons", clearLocalPlayerWeapons);
addNetworkEventHandler("vrr.giveWeapon", giveLocalPlayerWeapon);
addNetworkEventHandler("vrr.position", setLocalPlayerPosition);
addNetworkEventHandler("vrr.heading", setLocalPlayerHeading);
addNetworkEventHandler("vrr.interior", setLocalPlayerInterior);
addNetworkEventHandler("vrr.spawned", onServerSpawnedLocalPlayer);
addNetworkEventHandler("vrr.money", setLocalPlayerCash);
addNetworkEventHandler("vrr.armour", setLocalPlayerArmour);
addNetworkEventHandler("vrr.localPlayerSkin", setLocalPlayerSkin);
addNetworkEventHandler("vrr.pedSpeak", makeLocalPlayerPedSpeak);
addNetworkEventHandler("vrr.infiniteRun", setLocalPlayerInfiniteRun);
addNetworkEventHandler("vrr.playerCop", setLocalPlayerAsCopState);
addNetworkEventHandler("vrr.health", setLocalPlayerHealth);
addNetworkEventHandler("vrr.wantedLevel", setLocalPlayerWantedLevel);
addNetworkEventHandler("vrr.playerPedId", sendLocalPlayerNetworkIdToServer);
addNetworkEventHandler("vrr.ped", setLocalPlayerPedPartsAndProps);
addNetworkEventHandler("vrr.spawn", serverRequestedLocalPlayerSpawn);
addNetworkEventHandler("vrr.clearPedState", clearLocalPedState);
addNetworkEventHandler("vrr.drunkEffect", setLocalPlayerDrunkEffect);
addNetworkEventHandler("vrr.m", receiveChatBoxMessageFromServer); // Vehicle
addNetworkEventHandler("vrr.chatScrollLines", setChatScrollLines); addNetworkEventHandler("vrr.vehicle", receiveVehicleFromServer);
addNetworkEventHandler("vrr.veh.lights", setVehicleLights);
addNetworkEventHandler("vrr.veh.engine", setVehicleEngine);
addNetworkEventHandler("vrr.veh.repair", repairVehicle);
addNetworkEventHandler("vrr.radioStream", playStreamingRadio); // Radio
addNetworkEventHandler("vrr.audioFileStream", playAudioFile); addNetworkEventHandler("vrr.radioStream", playStreamingRadio);
addNetworkEventHandler("vrr.stopRadioStream", stopStreamingRadio); addNetworkEventHandler("vrr.audioFileStream", playAudioFile);
addNetworkEventHandler("vrr.radioVolume", setStreamingRadioVolume); addNetworkEventHandler("vrr.stopRadioStream", stopStreamingRadio);
addNetworkEventHandler("vrr.radioVolume", setStreamingRadioVolume);
addNetworkEventHandler("vrr.veh.lights", setVehicleLights); // Key Bindings
addNetworkEventHandler("vrr.veh.engine", setVehicleEngine); addNetworkEventHandler("vrr.delKeyBind", unBindAccountKey);
addNetworkEventHandler("vrr.veh.repair", repairVehicle); addNetworkEventHandler("vrr.addKeyBind", bindAccountKey);
addNetworkEventHandler("vrr.clearKeyBinds", clearKeyBinds);
addNetworkEventHandler("vrr.pedAnim", makePedPlayAnimation); // Weapon Damage
addNetworkEventHandler("vrr.pedStopAnim", makePedStopAnimation); addNetworkEventHandler("vrr.weaponDamageEnabled", setPlayerWeaponDamageEnabled);
addNetworkEventHandler("vrr.localPlayerSkin", setLocalPlayerSkin); addNetworkEventHandler("vrr.weaponDamageEvent", setPlayerWeaponDamageEvent);
addNetworkEventHandler("vrr.forcePedAnim", forcePedAnimation);
addNetworkEventHandler("vrr.hideAllGUI", hideAllGUI);
addNetworkEventHandler("vrr.clientInfo", serverRequestedClientInfo);
addNetworkEventHandler("vrr.interiorLights", updateInteriorLightsState);
addNetworkEventHandler("vrr.syncElement", forceSyncElementProperties); // GUI
addNetworkEventHandler("vrr.elementPosition", setElementPosition); addNetworkEventHandler("vrr.showRegistration", showRegistrationGUI);
addNetworkEventHandler("vrr.elementCollisions", setElementCollisionsEnabled); addNetworkEventHandler("vrr.showNewCharacter", showNewCharacterGUI);
addNetworkEventHandler("vrr.showLogin", showLoginGUI);
addNetworkEventHandler("vrr.vehBuyState", setVehiclePurchaseState); // Business
addNetworkEventHandler("vrr.business", receiveBusinessFromServer);
addNetworkEventHandler("vrr.showRegistration", showRegistrationGUI); // House
addNetworkEventHandler("vrr.showNewCharacter", showNewCharacterGUI); addNetworkEventHandler("vrr.house", receiveHouseFromServer);
addNetworkEventHandler("vrr.showLogin", showLoginGUI);
addNetworkEventHandler("vrr.logLevel", setLogLevel); // Locale
addNetworkEventHandler("vrr.infiniteRun", setLocalPlayerInfiniteRun); addNetworkEventHandler("vrr.localeString", receiveLocaleStringFromServer);
addNetworkEventHandler("vrr.business", receiveBusinessFromServer); // Misc
addNetworkEventHandler("vrr.house", receiveHouseFromServer); addNetworkEventHandler("vrr.mouseCursor", toggleMouseCursor);
addNetworkEventHandler("vrr.mouseCamera", toggleMouseCamera);
addNetworkEventHandler("vrr.holdObject", makePedHoldObject); addNetworkEventHandler("vrr.clearPeds", clearLocalPlayerOwnedPeds);
addNetworkEventHandler("vrr.passenger", enterVehicleAsPassenger);
addNetworkEventHandler("vrr.playerPedId", sendLocalPlayerNetworkIdToServer); addNetworkEventHandler("vrr.logo", setServerLogoRenderState);
addNetworkEventHandler("vrr.ambience", setCityAmbienceState);
addNetworkEventHandler("vrr.ped", setLocalPlayerPedPartsAndProps); addNetworkEventHandler("vrr.runCode", runClientCode);
addNetworkEventHandler("vrr.minuteDuration", setMinuteDuration);
addNetworkEventHandler("vrr.snow", setSnowState);
addNetworkEventHandler("vrr.enterPropertyKey", setEnterPropertyKey);
addNetworkEventHandler("vrr.skinSelect", toggleSkinSelect);
addNetworkEventHandler("vrr.hotbar", updatePlayerHotBar);
addNetworkEventHandler("vrr.showItemActionDelay", showItemActionDelay);
addNetworkEventHandler("vrr.set2DRendering", set2DRendering);
addNetworkEventHandler("vrr.mouseCameraForce", setMouseCameraState);
addNetworkEventHandler("vrr.logLevel", setLogLevel);
addNetworkEventHandler("vrr.hideAllGUI", hideAllGUI);
addNetworkEventHandler("vrr.nametag", updatePlayerNameTag);
addNetworkEventHandler("vrr.ping", updatePlayerPing);
addNetworkEventHandler("vrr.pedAnim", makePedPlayAnimation);
addNetworkEventHandler("vrr.pedStopAnim", makePedStopAnimation);
addNetworkEventHandler("vrr.forcePedAnim", forcePedAnimation);
addNetworkEventHandler("vrr.clientInfo", serverRequestedClientInfo);
addNetworkEventHandler("vrr.interiorLights", updateInteriorLightsState);
addNetworkEventHandler("vrr.cutsceneInterior", setCutsceneInterior);
addNetworkEventHandler("vrr.syncElement", forceSyncElementProperties);
addNetworkEventHandler("vrr.elementPosition", setElementPosition);
addNetworkEventHandler("vrr.elementCollisions", setElementCollisionsEnabled);
addNetworkEventHandler("vrr.vehBuyState", setVehiclePurchaseState);
addNetworkEventHandler("vrr.holdObject", makePedHoldObject);
} }
// =========================================================================== // ===========================================================================
function sendResourceReadySignalToServer() { function sendResourceReadySignalToServer() {
sendNetworkEventToServer("vrr.clientReady"); sendNetworkEventToServer("vrr.clientReady");
} }
// =========================================================================== // ===========================================================================
function sendResourceStartedSignalToServer() { function sendResourceStartedSignalToServer() {
sendNetworkEventToServer("vrr.clientStarted"); sendNetworkEventToServer("vrr.clientStarted");
} }
// =========================================================================== // ===========================================================================
function sendResourceStoppedSignalToServer() { function sendResourceStoppedSignalToServer() {
if(isConnected) { if(isConnected) {
sendNetworkEventToServer("vrr.clientStopped"); sendNetworkEventToServer("vrr.clientStopped");
} }
} }
// =========================================================================== // ===========================================================================
function setPlayer2DRendering(hudState, labelState, smallGameMessageState, scoreboardState, hotBarState, itemActionDelayState) { function set2DRendering(hudState, labelState, smallGameMessageState, scoreboardState, hotBarState, itemActionDelayState) {
logToConsole(LOG_DEBUG, `[VRR.Main] Updating render states (HUD: ${hudState}, Labels: ${labelState}, Bottom Text: ${smallGameMessageState}, Scoreboard: ${scoreboardState}, HotBar: ${hotBarState}, Item Action Delay: ${itemActionDelayState})`); logToConsole(LOG_DEBUG, `[VRR.Main] Updating render states (HUD: ${hudState}, Labels: ${labelState}, Bottom Text: ${smallGameMessageState}, Scoreboard: ${scoreboardState}, HotBar: ${hotBarState}, Item Action Delay: ${itemActionDelayState})`);
renderHUD = hudState; renderHUD = hudState;
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
natives.displayCash(hudState); natives.displayCash(hudState);
natives.displayAmmo(hudState); natives.displayAmmo(hudState);
natives.displayHud(hudState); natives.displayHud(hudState);
natives.displayRadar(hudState); natives.displayRadar(hudState);
natives.displayAreaName(hudState); natives.displayAreaName(hudState);
} else { } else {
if(typeof setHUDEnabled != "undefined") { if(typeof setHUDEnabled != "undefined") {
setHUDEnabled(hudState); setHUDEnabled(hudState);
} }
} }
renderLabels = labelState; renderLabels = labelState;
renderSmallGameMessage = smallGameMessageState; renderSmallGameMessage = smallGameMessageState;
renderScoreBoard = scoreboardState; renderScoreBoard = scoreboardState;
renderHotBar = hotBarState; renderHotBar = hotBarState;
renderItemActionDelay = itemActionDelayState; renderItemActionDelay = itemActionDelayState;
} }
// =========================================================================== // ===========================================================================
function onServerSpawnedPlayer(state) { function onServerSpawnedLocalPlayer(state) {
logToConsole(LOG_DEBUG, `[VRR.Main] Setting spawned state to ${state}`); logToConsole(LOG_DEBUG, `[VRR.Main] Setting spawned state to ${state}`);
isSpawned = state; isSpawned = state;
if(state) { if(state) {
setUpInitialGame(); setUpInitialGame();
calledDeathEvent = false; setTimeout(function() {
} calledDeathEvent = false;
}, 1000);
}
} }
// =========================================================================== // ===========================================================================
function tellServerPlayerUsedKeyBind(key) { function tellServerPlayerUsedKeyBind(key) {
sendNetworkEventToServer("vrr.useKeyBind", key); sendNetworkEventToServer("vrr.useKeyBind", key);
} }
// =========================================================================== // ===========================================================================
function tellServerPlayerArrivedAtJobRouteLocation() { function tellServerPlayerArrivedAtJobRouteLocation() {
sendNetworkEventToServer("vrr.arrivedAtJobRouteLocation"); sendNetworkEventToServer("vrr.arrivedAtJobRouteLocation");
} }
// =========================================================================== // ===========================================================================
function tellServerItemActionDelayComplete() { function tellServerItemActionDelayComplete() {
sendNetworkEventToServer("vrr.itemActionDelayComplete"); sendNetworkEventToServer("vrr.itemActionDelayComplete");
} }
// =========================================================================== // ===========================================================================
function sendServerClientInfo() { function sendServerClientInfo() {
let clientVersion = "0.0.0.0"; let clientVersion = "0.0.0.0";
if(typeof CLIENT_VERSION_MAJOR != "undefined") { if(typeof CLIENT_VERSION_MAJOR != "undefined") {
clientVersion = `${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_PATCH}.${CLIENT_VERSION_BUILD}`; clientVersion = `${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_PATCH}.${CLIENT_VERSION_BUILD}`;
} }
sendNetworkEventToServer("vrr.clientInfo", clientVersion, game.width, game.height); sendNetworkEventToServer("vrr.clientInfo", clientVersion, game.width, game.height);
} }
// =========================================================================== // ===========================================================================
function sendServerNewAFKStatus(state) { function sendServerNewAFKStatus(state) {
sendNetworkEventToServer("vrr.afk", state); sendNetworkEventToServer("vrr.afk", state);
} }
// =========================================================================== // ===========================================================================
@@ -210,109 +229,167 @@ function anchorBoat(vehicleId) {
// =========================================================================== // ===========================================================================
function setEnterPropertyKey(key) { function setEnterPropertyKey(key) {
enterPropertyKey = key; enterPropertyKey = key;
} }
// =========================================================================== // ===========================================================================
function serverRequestedClientInfo() { function serverRequestedClientInfo() {
sendServerClientInfo(); sendServerClientInfo();
} }
// =========================================================================== // ===========================================================================
function updateInteriorLightsState(state) { function updateInteriorLightsState(state) {
interiorLightsEnabled = state; interiorLightsEnabled = state;
} }
// =========================================================================== // ===========================================================================
function forceSyncElementProperties(elementId) { function forceSyncElementProperties(elementId) {
if(getElementFromId(elementId) == null) { if(getElementFromId(elementId) == null) {
return false; return false;
} }
syncElementProperties(getElementFromId(elementId)); syncElementProperties(getElementFromId(elementId));
} }
// =========================================================================== // ===========================================================================
function setElementPosition(elementId, position) { function setElementPosition(elementId, position) {
if(getElementFromId(elementId) == null) { if(getElementFromId(elementId) == null) {
return false; return false;
} }
if(!getElementFromId(elementId).isSyncer) { if(!getElementFromId(elementId).isSyncer) {
return false; return false;
} }
getElementFromId(elementId).position = position; getElementFromId(elementId).position = position;
} }
// =========================================================================== // ===========================================================================
function setElementCollisionsEnabled(elementId, state) { function setElementCollisionsEnabled(elementId, state) {
if(getElementFromId(elementId) == null) { if(getElementFromId(elementId) == null) {
return false; return false;
} }
getElementFromId(elementId).collisionsEnabled = state; getElementFromId(elementId).collisionsEnabled = state;
} }
// =========================================================================== // ===========================================================================
function setLocalPlayerArmour(armour) { function setLocalPlayerArmour(armour) {
if(typeof localPlayer.armour != "undefined") { if(typeof localPlayer.armour != "undefined") {
localPlayer.armour = armour; localPlayer.armour = armour;
} }
} }
// =========================================================================== // ===========================================================================
function forceLocalPlayerWantedLevel(wantedLevel) { function setLocalPlayerWantedLevel(wantedLevel) {
forceWantedLevel = toInteger(wantedLevel); forceWantedLevel = toInteger(wantedLevel);
} }
// =========================================================================== // ===========================================================================
function setLogLevel(level) { function setLogLevel(level) {
logLevel = level; logLevel = level;
} }
// =========================================================================== // ===========================================================================
function setLocalPlayerInfiniteRun(state) { function setLocalPlayerInfiniteRun(state) {
if(localPlayer != null) { if(localPlayer != null) {
if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) { if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) {
game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), boolToInt(state)); game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), boolToInt(state));
} }
} }
} }
// =========================================================================== // ===========================================================================
function setLocalPlayerSkin(skinId) { function setLocalPlayerSkin(skinId) {
if(getGame() == VRR_GAME_GTA_IV) { logToConsole(LOG_INFO, skinId);
natives.changePlayerModel(natives.getPlayerId(), skinId); if(getGame() == VRR_GAME_GTA_IV) {
//localPlayer.skin = allowedSkins[skinSelectorIndex][0]; if(natives.isModelInCdimage(skinId)) {
//localPlayer.modelIndex = allowedSkins[skinSelectorIndex][0]; natives.requestModel(skinId);
} else { natives.loadAllObjectsNow();
localPlayer.skin = skinId; if(natives.hasModelLoaded(skinId)) {
} natives.changePlayerModel(natives.getPlayerId(), skinId);
}
}
} else {
localPlayer.skin = skinId;
}
} }
// =========================================================================== // ===========================================================================
function makePedHoldObject(pedId, modelIndex) { function makePedHoldObject(pedId, modelIndex) {
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
natives.givePedAmbientObject(natives.getPedFromNetworkId(pedId), getGameConfig().objects[getGame()][modelIndex][1]) natives.givePedAmbientObject(natives.getPedFromNetworkId(pedId), getGameConfig().objects[getGame()][modelIndex][1])
} }
} }
// =========================================================================== // ===========================================================================
function sendLocalPlayerNetworkIdToServer() { function sendLocalPlayerNetworkIdToServer() {
sendNetworkEventToServer("vrr.playerPedId", natives.getNetworkIdFromPed(localPlayer)); sendNetworkEventToServer("vrr.playerPedId", natives.getNetworkIdFromPed(localPlayer));
}
// ===========================================================================
function setCutsceneInterior(cutsceneName) {
if(getGame() == VRR_GAME_GTA_IV) {
if(cutsceneName == "") {
natives.clearCutscene();
} else {
if(natives.isInteriorScene()) {
natives.clearCutscene();
}
natives.initCutscene(cutsceneName);
}
}
}
// ===========================================================================
function makeLocalPlayerPedSpeak(speechName) {
if(getGame() == VRR_GAME_GTA_IV) {
// if player is in vehicle, allow megaphone (if last arg is "1", it will cancel megaphone echo)
// Only speeches with _MEGAPHONE will have the bullhorn effect
// Afaik it only works on police voices anyway
if(localPlayer.vehicle != null) {
natives.sayAmbientSpeech(localPlayer, speechName, true, false, 0);
} else {
natives.sayAmbientSpeech(localPlayer, speechName, true, false, 1);
}
} else if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) {
// Don't have a way to get the ped ref ID and can't use ped in arg
//game.SET_CHAR_SAY(game.GET_PLAYER_ID(), int);
}
}
// ===========================================================================
function setLocalPlayerAsCopState(state) {
if(getGame() == VRR_GAME_GTA_IV) {
natives.setPlayerAsCop(natives.getPlayerId(), state);
natives.setPoliceIgnorePlayer(natives.getPlayerId(), state);
}
}
// ===========================================================================
function serverRequestedLocalPlayerSpawn(skinId, position) {
if(getGame() == VRR_GAME_GTA_IV) {
natives.createPlayer(skinId, position);
//if(isCustomCameraSupported()) {
// game.restoreCamera(true);
//}
}
} }
// =========================================================================== // ===========================================================================

View File

@@ -45,95 +45,111 @@ function loadSkinSelectMessageFontBottom() {
function processSkinSelectKeyPress(keyCode) { function processSkinSelectKeyPress(keyCode) {
if(usingSkinSelector) { if(usingSkinSelector) {
if(keyCode == SDLK_PAGEUP) { if(keyCode == SDLK_PAGEUP) {
if(skinSelectorIndex >= allowedSkins.length-1) { if(skinSelectorIndex >= allowedSkins.length-1) {
skinSelectorIndex = 1; skinSelectorIndex = 1;
} else { } else {
skinSelectorIndex = skinSelectorIndex + 1; skinSelectorIndex = skinSelectorIndex + 1;
} }
logToConsole(LOG_DEBUG, `Switching to skin ${allowedSkins[skinSelectorIndex][1]} (Index: ${skinSelectorIndex}, Skin: ${allowedSkins[skinSelectorIndex][0]})`); logToConsole(LOG_DEBUG, `Switching to skin ${allowedSkins[skinSelectorIndex][1]} (Index: ${skinSelectorIndex}, Skin: ${allowedSkins[skinSelectorIndex][0]})`);
skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1]; skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1];
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
//natives.changePlayerModel(natives.getPlayerId(), allowedSkins[skinSelectorIndex][0]); let skinId = allowedSkins[skinSelectorIndex][0];
//localPlayer.skin = allowedSkins[skinSelectorIndex][0]; if(natives.isModelInCdimage(skinId)) {
//localPlayer.modelIndex = allowedSkins[skinSelectorIndex][0]; natives.requestModel(skinId);
} else { natives.loadAllObjectsNow();
localPlayer.skin = allowedSkins[skinSelectorIndex][0]; if(natives.hasModelLoaded(skinId)) {
} natives.changePlayerModel(natives.getPlayerId(), skinId);
} else if(keyCode == SDLK_PAGEDOWN) { }
if(skinSelectorIndex <= 0) { }
skinSelectorIndex = allowedSkins.length-1; } else {
} else { localPlayer.skin = allowedSkins[skinSelectorIndex][0];
skinSelectorIndex = skinSelectorIndex - 1; }
} } else if(keyCode == SDLK_PAGEDOWN) {
logToConsole(LOG_DEBUG, `Switching to skin ${allowedSkins[skinSelectorIndex][1]} (Index: ${skinSelectorIndex}, Skin: ${allowedSkins[skinSelectorIndex][0]})`); if(skinSelectorIndex <= 0) {
skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1]; skinSelectorIndex = allowedSkins.length-1;
if(getGame() == VRR_GAME_GTA_IV) { } else {
//natives.changePlayerModel(natives.getPlayerId(), allowedSkins[skinSelectorIndex][0]); skinSelectorIndex = skinSelectorIndex - 1;
//localPlayer.skin = allowedSkins[skinSelectorIndex][0]; }
//localPlayer.modelIndex = allowedSkins[skinSelectorIndex][0]; logToConsole(LOG_DEBUG, `Switching to skin ${allowedSkins[skinSelectorIndex][1]} (Index: ${skinSelectorIndex}, Skin: ${allowedSkins[skinSelectorIndex][0]})`);
} else { skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1];
localPlayer.skin = allowedSkins[skinSelectorIndex][0]; if(getGame() == VRR_GAME_GTA_IV) {
} let skinId = allowedSkins[skinSelectorIndex][0];
} else if(keyCode == SDLK_RETURN) { if(natives.isModelInCdimage(skinId)) {
sendNetworkEventToServer("vrr.skinSelected", skinSelectorIndex); natives.requestModel(skinId);
toggleSkinSelect(false); natives.loadAllObjectsNow();
return true; if(natives.hasModelLoaded(skinId)) {
} else if(keyCode == SDLK_BACKSPACE) { natives.changePlayerModel(natives.getPlayerId(), skinId);
sendNetworkEventToServer("vrr.skinSelected", -1); }
toggleSkinSelect(false); }
return true; } else {
} localPlayer.skin = allowedSkins[skinSelectorIndex][0];
localPlayer.heading = skinSelectHeading; }
} } else if(keyCode == SDLK_RETURN) {
sendNetworkEventToServer("vrr.skinSelected", skinSelectorIndex);
toggleSkinSelect(false);
return true;
} else if(keyCode == SDLK_BACKSPACE) {
sendNetworkEventToServer("vrr.skinSelected", -1);
toggleSkinSelect(false);
return true;
}
localPlayer.heading = skinSelectHeading;
}
} }
// =========================================================================== // ===========================================================================
function processSkinSelectRendering() { function processSkinSelectRendering() {
if(usingSkinSelector) { if(usingSkinSelector) {
if(skinSelectMessageFontTop != null && skinSelectMessageFontBottom != null) { if(skinSelectMessageFontTop != null && skinSelectMessageFontBottom != null) {
if(skinSelectMessageTextTop != "" && skinSelectMessageTextBottom != "") { if(skinSelectMessageTextTop != "" && skinSelectMessageTextBottom != "") {
skinSelectMessageFontTop.render(skinSelectMessageTextTop, [0, game.height-100], game.width, 0.5, 0.0, skinSelectMessageFontTop.size, skinSelectMessageColourTop, true, true, false, true); skinSelectMessageFontTop.render(skinSelectMessageTextTop, [0, game.height-100], game.width, 0.5, 0.0, skinSelectMessageFontTop.size, skinSelectMessageColourTop, true, true, false, true);
skinSelectMessageFontBottom.render(skinSelectMessageTextBottom, [0, game.height-65], game.width, 0.5, 0.0, skinSelectMessageFontBottom.size, skinSelectMessageColourBottom, true, true, false, true); skinSelectMessageFontBottom.render(skinSelectMessageTextBottom, [0, game.height-65], game.width, 0.5, 0.0, skinSelectMessageFontBottom.size, skinSelectMessageColourBottom, true, true, false, true);
} }
} }
} }
} }
// =========================================================================== // ===========================================================================
function toggleSkinSelect(state) { function toggleSkinSelect(state) {
if(state) { if(state) {
skinSelectorIndex = getAllowedSkinIndexFromSkin(localPlayer.skin); skinSelectorIndex = getAllowedSkinIndexFromSkin(localPlayer.skin);
if(!skinSelectorIndex) { if(!skinSelectorIndex) {
skinSelectorIndex = 0; skinSelectorIndex = 0;
} }
usingSkinSelector = true; usingSkinSelector = true;
skinSelectPosition = localPlayer.position; skinSelectPosition = localPlayer.position;
skinSelectHeading = localPlayer.heading; skinSelectHeading = localPlayer.heading;
if(isCustomCameraSupported()) { if(isCustomCameraSupported()) {
let tempPosition = localPlayer.position; let tempPosition = localPlayer.position;
tempPosition.z += 0.5; tempPosition.z += 0.5;
let frontCameraPosition = getPosInFrontOfPos(tempPosition, localPlayer.heading, 3); let frontCameraPosition = getPosInFrontOfPos(tempPosition, localPlayer.heading, 3);
game.setCameraLookAt(frontCameraPosition, localPlayer.position, true); game.setCameraLookAt(frontCameraPosition, localPlayer.position, true);
} }
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
//natives.changePlayerModel(natives.getPlayerId(), allowedSkins[skinSelectorIndex][0]); let skinId = allowedSkins[skinSelectorIndex][0];
localPlayer.skin = allowedSkins[skinSelectorIndex][0]; if(natives.isModelInCdimage(skinId)) {
} else { natives.requestModel(skinId);
localPlayer.skin = allowedSkins[skinSelectorIndex][0]; natives.loadAllObjectsNow();
} if(natives.hasModelLoaded(skinId)) {
natives.changePlayerModel(natives.getPlayerId(), skinId);
}
}
} else {
localPlayer.skin = allowedSkins[skinSelectorIndex][0];
}
skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1]; skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1];
setLocalPlayerControlState(false, false); setLocalPlayerControlState(false, false);
} else { } else {
usingSkinSelector = false; usingSkinSelector = false;
setLocalPlayerControlState(false, false); setLocalPlayerControlState(false, false);
} }
} }
// =========================================================================== // ===========================================================================

View File

@@ -8,158 +8,167 @@
// =========================================================================== // ===========================================================================
function initClientScripts() { function initClientScripts() {
initGUIScript(); initGUIScript();
initNameTagScript(); initNameTagScript();
initScoreBoardScript(); initScoreBoardScript();
initMessagingScript(); initMessagingScript();
initServerScript(); initServerScript();
initLogoScript(); initLogoScript();
initLabelScript(); initLabelScript();
initChatBoxScript(); initChatBoxScript();
initAFKScript(); initAFKScript();
initKeyBindScript(); initKeyBindScript();
initEventScript(); initEventScript();
initSkinSelectScript(); initSkinSelectScript();
} }
// =========================================================================== // ===========================================================================
function setUpInitialGame() { function setUpInitialGame() {
if(getGame() == VRR_GAME_GTA_III) { switch(getGame()) {
game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0); case VRR_GAME_GTA_III:
game.setGameStat(STAT_PROGRESSMADE, 9999); game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0);
game.setGameStat(STAT_TOTALPROGRESSINGAME, 9999); game.setGameStat(STAT_PROGRESSMADE, 9999);
game.SET_CAR_DENSITY_MULTIPLIER(3.0); game.setGameStat(STAT_TOTALPROGRESSINGAME, 9999);
game.SET_PED_DENSITY_MULTIPLIER(3.0); //game.SET_CAR_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
game.onMission = true; //game.SET_PED_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
SetStandardControlsEnabled(true); game.onMission = true; // Disables taxi/vigilante/etc and other start mission triggers
return true; SetStandardControlsEnabled(true); // Provided by mouse camera script (mousecam.js)
} break;
if(getGame() == VRR_GAME_GTA_VC) { case VRR_GAME_GTA_VC:
game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0); game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0);
game.setGameStat(STAT_PROGRESSMADE, 9999); game.setGameStat(STAT_PROGRESSMADE, 9999);
game.setGameStat(STAT_TOTALPROGRESSINGAME, 9999); game.setGameStat(STAT_TOTALPROGRESSINGAME, 9999);
game.SET_CAR_DENSITY_MULTIPLIER(3.0); //game.SET_CAR_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
game.SET_PED_DENSITY_MULTIPLIER(3.0); //game.SET_PED_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
game.REQUEST_ANIMATION("bikev"); game.REQUEST_ANIMATION("bikev");
game.REQUEST_ANIMATION("bikeh"); game.REQUEST_ANIMATION("bikeh");
game.REQUEST_ANIMATION("biked"); game.REQUEST_ANIMATION("biked");
game.REQUEST_ANIMATION("knife"); game.REQUEST_ANIMATION("knife");
game.REQUEST_ANIMATION("python"); game.REQUEST_ANIMATION("python");
game.REQUEST_ANIMATION("shotgun"); game.REQUEST_ANIMATION("shotgun");
game.REQUEST_ANIMATION("buddy"); game.REQUEST_ANIMATION("buddy");
game.REQUEST_ANIMATION("tec"); game.REQUEST_ANIMATION("tec");
game.REQUEST_ANIMATION("uzi"); game.REQUEST_ANIMATION("uzi");
game.REQUEST_ANIMATION("rifle"); game.REQUEST_ANIMATION("rifle");
game.REQUEST_ANIMATION("m60"); game.REQUEST_ANIMATION("m60");
game.REQUEST_ANIMATION("sniper"); game.REQUEST_ANIMATION("sniper");
game.REQUEST_ANIMATION("grenade"); game.REQUEST_ANIMATION("grenade");
game.REQUEST_ANIMATION("flame"); game.REQUEST_ANIMATION("flame");
game.REQUEST_ANIMATION("medic"); game.REQUEST_ANIMATION("medic");
game.REQUEST_ANIMATION("sunbathe"); game.REQUEST_ANIMATION("sunbathe");
//game.REQUEST_ANIMATION("playidles"); //game.REQUEST_ANIMATION("playidles");
game.REQUEST_ANIMATION("riot"); game.REQUEST_ANIMATION("riot");
game.REQUEST_ANIMATION("strip"); game.REQUEST_ANIMATION("strip");
game.REQUEST_ANIMATION("lance"); game.REQUEST_ANIMATION("lance");
game.REQUEST_ANIMATION("skate"); game.REQUEST_ANIMATION("skate");
game.LOAD_ALL_MODELS_NOW(); game.LOAD_ALL_MODELS_NOW();
game.onMission = true; game.onMission = true; // Disables taxi/vigilante/etc and other start mission triggers
SetStandardControlsEnabled(true); SetStandardControlsEnabled(true); // Provided by mouse camera script (mousecam.js)
return true; break;
}
if(getGame() == VRR_GAME_GTA_SA) { case VRR_GAME_GTA_SA:
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_PISTOL_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SILENCED_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_PISTOL_SILENCED_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_DESERT_EAGLE_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_DESERT_EAGLE_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_SHOTGUN_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_SHOTGUN_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_SAWNOFF_SHOTGUN_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_SAWNOFF_SHOTGUN_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_SPAS12_SHOTGUN_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_SPAS12_SHOTGUN_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_MICRO_UZI_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_MICRO_UZI_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_MP5_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_MP5_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_AK47_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_AK47_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_M4_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_M4_SKILL, 400);
game.setGameStat(STAT_DRIVING_SKILL, 9999); game.setGameStat(STAT_DRIVING_SKILL, 9999);
game.setGameStat(STAT_FAT, 9999); game.setGameStat(STAT_FAT, 9999);
game.setGameStat(STAT_ENERGY, 9999); game.setGameStat(STAT_ENERGY, 9999);
game.setGameStat(STAT_CYCLE_SKILL, 9999); game.setGameStat(STAT_CYCLE_SKILL, 9999);
game.setGameStat(STAT_BIKE_SKILL, 9999); game.setGameStat(STAT_BIKE_SKILL, 9999);
game.setGameStat(STAT_GAMBLING, 9999); game.setGameStat(STAT_GAMBLING, 9999);
game.setGameStat(STAT_PROGRESS_MADE, 9999); game.setGameStat(STAT_PROGRESS_MADE, 9999);
game.setGameStat(STAT_RESPECT, 0); game.setGameStat(STAT_RESPECT, 0);
game.setGameStat(STAT_RESPECT_TOTAL, 0); game.setGameStat(STAT_RESPECT_TOTAL, 0);
game.setGameStat(STAT_SEX_APPEAL, 0); game.setGameStat(STAT_SEX_APPEAL, 0);
game.setGameStat(STAT_STAMINA, 9999); game.setGameStat(STAT_STAMINA, 9999);
game.setGameStat(STAT_TOTAL_PROGRESS, 9999); game.setGameStat(STAT_TOTAL_PROGRESS, 9999);
game.setGameStat(STAT_UNDERWATER_STAMINA, 9999); game.setGameStat(STAT_UNDERWATER_STAMINA, 9999);
game.setGameStat(STAT_BODY_MUSCLE, 9999); game.setGameStat(STAT_BODY_MUSCLE, 9999);
game.setDefaultInteriors(false); game.setDefaultInteriors(false); // Disables default yellow cone at doors for entering places in singleplayer
game.onMission = true; game.onMission = true; // Disables taxi/vigilante/etc and other start mission triggers
return true; break;
}
if(getGame() == VRR_GAME_GTA_IV) { case VRR_GAME_GTA_IV:
natives.allowEmergencyServices(false); natives.allowEmergencyServices(false);
natives.setCreateRandomCops(true); natives.setCreateRandomCops(true);
natives.setMaxWantedLevel(0); natives.setMaxWantedLevel(0);
natives.setWantedMultiplier(0.0); natives.setWantedMultiplier(0.0);
natives.allowPlayerToCarryNonMissionObjects(natives.getPlayerId(), true); natives.allowPlayerToCarryNonMissionObjects(natives.getPlayerId(), true);
natives.setPlayerTeam(natives.getPlayerId(), 0); natives.setPlayerTeam(natives.getPlayerId(), 0);
natives.loadAllObjectsNow(); natives.loadAllObjectsNow();
natives.setCellphoneRanked(false); natives.setCellphoneRanked(false);
natives.setOverrideNoSprintingOnPhoneInMultiplayer(false); natives.setOverrideNoSprintingOnPhoneInMultiplayer(false);
natives.setSyncWeatherAndGameTime(false); natives.setSyncWeatherAndGameTime(false);
natives.usePlayerColourInsteadOfTeamColour(true); natives.usePlayerColourInsteadOfTeamColour(true);
natives.disablePauseMenu(true); natives.disablePauseMenu(true);
natives.allowReactionAnims(localPlayer, true); //natives.allowReactionAnims(localPlayer, false);
natives.allowGameToPauseForStreaming(false); natives.allowGameToPauseForStreaming(false);
natives.allowStuntJumpsToTrigger(false); natives.allowStuntJumpsToTrigger(false);
natives.setPickupsFixCars(false); natives.setPickupsFixCars(false);
natives.forceFullVoice(localPlayer);
// HUD and Display // HUD and Display
//natives.displayCash(false); //natives.displayCash(false);
//natives.displayAmmo(false); //natives.displayAmmo(false);
//natives.displayHud(false); //natives.displayHud(false);
//natives.displayRadar(false); //natives.displayRadar(false);
//natives.displayAreaName(false); //natives.displayAreaName(false);
//natives.displayPlayerNames(false); natives.displayPlayerNames(true);
natives.setPoliceRadarBlips(false); natives.setPoliceRadarBlips(false);
natives.removeTemporaryRadarBlipsForPickups(); natives.removeTemporaryRadarBlipsForPickups();
natives.displayNonMinigameHelpMessages(false); natives.displayNonMinigameHelpMessages(false);
natives.setDisplayPlayerNameAndIcon(natives.getPlayerId(), false); natives.setDisplayPlayerNameAndIcon(natives.getPlayerId(), true);
// Item/Money Dropping // Item/Money Dropping
natives.setMoneyCarriedByAllNewPeds(0); natives.setMoneyCarriedByAllNewPeds(0);
natives.setDeadPedsDropWeapons(false); natives.setDeadPedsDropWeapons(false);
natives.setPlayersDropMoneyInNetworkGame(false); natives.setPlayersDropMoneyInNetworkGame(false);
// Population // Population
//natives.dontSuppressAnyCarModels(5.0); //natives.dontSuppressAnyCarModels(5.0);
//natives.dontSuppressAnyPedModels(5.0); //natives.dontSuppressAnyPedModels(5.0);
//natives.forceGenerateParkedCarsTooCloseToOthers(true); //natives.forceGenerateParkedCarsTooCloseToOthers(true);
//natives.setParkedCarDensityMultiplier(5.0); //natives.setParkedCarDensityMultiplier(5.0);
//natives.setRandomCarDensityMultiplier(5.0); //natives.setRandomCarDensityMultiplier(5.0);
//natives.setPedDensityMultiplier(5.0); //natives.setPedDensityMultiplier(5.0);
//natives.setCarDensityMultiplier(5.0); //natives.setCarDensityMultiplier(5.0);
//natives.setScenarioPedDensityMultiplier(5.0, 5.0); //natives.setScenarioPedDensityMultiplier(5.0, 5.0);
natives.switchRandomTrains(true); natives.switchRandomTrains(true);
natives.switchRandomBoats(true); natives.switchRandomBoats(true);
natives.switchAmbientPlanes(true); natives.switchAmbientPlanes(true);
natives.switchMadDrivers(false); natives.switchMadDrivers(false);
natives.requestAnims("DANCING"); // Singleplayer Cellphone
return true; natives.requestScript("spcellphone");
} natives.startNewScript("spcellphone", 0);
// Script "v-blockedscripts" blocks the mpcellphone scripts
natives.setMessagesWaiting(false); // Seems to have no effect
natives.setMobilePhoneRadioState(false);
if(getGame() == VRR_GAME_MAFIA_ONE) { // Animation libraries
game.mapEnabled = false; natives.requestAnims("DANCING");
game.setTrafficEnabled(false);
return true; // Some last steps
} natives.loadAllObjectsNow();
break;
case VRR_GAME_MAFIA_ONE:
game.mapEnabled = false;
game.setTrafficEnabled(false);
break;
}
} }
// =========================================================================== // ===========================================================================

View File

@@ -8,37 +8,37 @@
// =========================================================================== // ===========================================================================
function processSync(event, deltaTime) { function processSync(event, deltaTime) {
if(localPlayer != null) { if(localPlayer != null) {
if(!areServerElementsSupported()) { if(!areServerElementsSupported()) {
sendNetworkEventToServer("vrr.plr.pos", localPlayer.position); sendNetworkEventToServer("vrr.plr.pos", (localPlayer.vehicle != null) ? localPlayer.vehicle.position : localPlayer.position);
sendNetworkEventToServer("vrr.plr.rot", localPlayer.heading); sendNetworkEventToServer("vrr.plr.rot", (localPlayer.vehicle != null) ? localPlayer.vehicle.heading : localPlayer.heading);
//if(localPlayer.vehicle != null) { //if(localPlayer.vehicle != null) {
// sendNetworkEventToServer("vrr.veh.pos", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.position); // sendNetworkEventToServer("vrr.veh.pos", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.position);
// sendNetworkEventToServer("vrr.veh.rot", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.heading); // sendNetworkEventToServer("vrr.veh.rot", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.heading);
//} //}
} }
if(localPlayer.health <= 0) { if(localPlayer.health <= 0) {
if(!calledDeathEvent) { if(!calledDeathEvent) {
logToConsole(LOG_DEBUG, `Local player died`); logToConsole(LOG_DEBUG, `Local player died`);
localPlayer.clearWeapons(); localPlayer.clearWeapons();
calledDeathEvent = true; calledDeathEvent = true;
sendNetworkEventToServer("vrr.playerDeath"); sendNetworkEventToServer("vrr.playerDeath");
} }
} }
if(streamingRadioElement) { if(streamingRadioElement) {
streamingRadio.position = getElementPosition(streamingRadioElement); streamingRadio.position = getElementPosition(streamingRadioElement);
//streamingRadio.volume = getStreamingRadioVolumeForPosition(streamingRadio.position); //streamingRadio.volume = getStreamingRadioVolumeForPosition(streamingRadio.position);
} }
} }
} }
// =========================================================================== // ===========================================================================
function setVehicleEngine(vehicleId, state) { function setVehicleEngine(vehicleId, state) {
getElementFromId(vehicleId).engine = state; getElementFromId(vehicleId).engine = state;
} }
// =========================================================================== // ===========================================================================
@@ -46,370 +46,390 @@ function setVehicleEngine(vehicleId, state) {
function setVehicleLights(vehicleId, state) { function setVehicleLights(vehicleId, state) {
if(getGame() != VRR_GAME_MAFIA_ONE) { if(getGame() != VRR_GAME_MAFIA_ONE) {
if(!state) { if(!state) {
getElementFromId(vehicleId).lightStatus = 2; getElementFromId(vehicleId).lightStatus = 2;
} else { } else {
getElementFromId(vehicleId).lightStatus = 1; getElementFromId(vehicleId).lightStatus = 1;
} }
} else if(getGame() == VRR_GAME_GTA_IV) { } else if(getGame() == VRR_GAME_GTA_IV) {
if(!state) { if(!state) {
natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 0)); natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 0));
} else { } else {
natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 1)); natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 1));
} }
} else { } else {
if(!state) { if(!state) {
getElementFromId(vehicleId).lights = false; getElementFromId(vehicleId).lights = false;
} else { } else {
getElementFromId(vehicleId).lights = true; getElementFromId(vehicleId).lights = true;
} }
} }
} }
// =========================================================================== // ===========================================================================
function repairVehicle(syncId) { function repairVehicle(syncId) {
getVehicleFromSyncId(syncId).fix(); getVehicleFromSyncId(syncId).fix();
} }
// =========================================================================== // ===========================================================================
function syncVehicleProperties(vehicle) { function syncVehicleProperties(vehicle) {
if(!areServerElementsSupported()) { if(!areServerElementsSupported()) {
return false; return false;
} }
if(doesEntityDataExist(vehicle, "vrr.lights")) { if(doesEntityDataExist(vehicle, "vrr.lights")) {
let lightStatus = getEntityData(vehicle, "vrr.lights"); let lightStatus = getEntityData(vehicle, "vrr.lights");
if(!lightStatus) { if(!lightStatus) {
vehicle.lightStatus = 2; vehicle.lightStatus = 2;
} else { } else {
vehicle.lightStatus = 1; vehicle.lightStatus = 1;
} }
} }
if(doesEntityDataExist(vehicle, "vrr.invincible")) { if(doesEntityDataExist(vehicle, "vrr.invincible")) {
let invincible = getEntityData(vehicle, "vrr.invincible"); let invincible = getEntityData(vehicle, "vrr.invincible");
element.setProofs(invincible, invincible, invincible, invincible, invincible); element.setProofs(invincible, invincible, invincible, invincible, invincible);
} }
if(doesEntityDataExist(vehicle, "vrr.panelStatus")) { if(doesEntityDataExist(vehicle, "vrr.panelStatus")) {
let panelsStatus = getEntityData(vehicle, "vrr.panelStatus"); let panelsStatus = getEntityData(vehicle, "vrr.panelStatus");
for(let i in panelsStatus) { for(let i in panelsStatus) {
vehicle.setPanelStatus(i, panelsStatus[i]); vehicle.setPanelStatus(i, panelsStatus[i]);
} }
} }
if(doesEntityDataExist(vehicle, "vrr.wheelStatus")) { if(doesEntityDataExist(vehicle, "vrr.wheelStatus")) {
let wheelsStatus = getEntityData(vehicle, "vrr.wheelStatus"); let wheelsStatus = getEntityData(vehicle, "vrr.wheelStatus");
for(let i in wheelsStatus) { for(let i in wheelsStatus) {
vehicle.setWheelStatus(i, wheelsStatus[i]); vehicle.setWheelStatus(i, wheelsStatus[i]);
} }
} }
if(doesEntityDataExist(vehicle, "vrr.lightStatus")) { if(doesEntityDataExist(vehicle, "vrr.lightStatus")) {
let lightStatus = getEntityData(vehicle, "vrr.lightStatus"); let lightStatus = getEntityData(vehicle, "vrr.lightStatus");
for(let i in lightStatus) { for(let i in lightStatus) {
vehicle.setLightStatus(i, lightStatus[i]); vehicle.setLightStatus(i, lightStatus[i]);
} }
} }
if(doesEntityDataExist(vehicle, "vrr.suspensionHeight")) { if(doesEntityDataExist(vehicle, "vrr.suspensionHeight")) {
let suspensionHeight = getEntityData(vehicle, "vrr.suspensionHeight"); let suspensionHeight = getEntityData(vehicle, "vrr.suspensionHeight");
vehicle.setSuspensionHeight(suspensionHeight); vehicle.setSuspensionHeight(suspensionHeight);
} }
if(getGame() == VRR_GAME_GTA_SA) { if(getGame() == VRR_GAME_GTA_SA) {
let allUpgrades = getGameConfig().vehicleUpgrades[getGame()]; let allUpgrades = getGameConfig().vehicleUpgrades[getGame()];
for(let i in allUpgrades) { for(let i in allUpgrades) {
vehicle.removeUpgrade(i); vehicle.removeUpgrade(i);
} }
if(doesEntityDataExist(vehicle, "vrr.upgrades")) { if(doesEntityDataExist(vehicle, "vrr.upgrades")) {
let upgrades = getEntityData(vehicle, "vrr.upgrades"); let upgrades = getEntityData(vehicle, "vrr.upgrades");
for(let i in upgrades) { for(let i in upgrades) {
if(upgrades[i] != 0) { if(upgrades[i] != 0) {
vehicle.addUpgrade(upgrades[i]); vehicle.addUpgrade(upgrades[i]);
} }
} }
} }
} }
if(getGame() == VRR_GAME_GTA_SA || getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_SA || getGame() == VRR_GAME_GTA_IV) {
if(doesEntityDataExist(vehicle, "vrr.livery")) { if(doesEntityDataExist(vehicle, "vrr.livery")) {
let livery = getEntityData(vehicle, "vrr.livery"); let livery = getEntityData(vehicle, "vrr.livery");
if(getGame() == VRR_GAME_GTA_SA) { if(getGame() == VRR_GAME_GTA_SA) {
vehicle.setPaintJob(livery); vehicle.setPaintJob(livery);
} else if(getGame() == VRR_GAME_GTA_IV) { } else if(getGame() == VRR_GAME_GTA_IV) {
vehicle.livery = livery; vehicle.livery = livery;
} }
} }
} }
} }
// =========================================================================== // ===========================================================================
function syncCivilianProperties(civilian) { function syncCivilianProperties(civilian) {
if(!areServerElementsSupported()) { if(!areServerElementsSupported()) {
return false; return false;
} }
if(getGame() == VRR_GAME_GTA_III) { if(getGame() == VRR_GAME_GTA_III) {
if(doesEntityDataExist(civilian, "vrr.scale")) { if(doesEntityDataExist(civilian, "vrr.scale")) {
let scaleFactor = getEntityData(civilian, "vrr.scale"); let scaleFactor = getEntityData(civilian, "vrr.scale");
let tempMatrix = civilian.matrix; let tempMatrix = civilian.matrix;
tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z)); tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z));
let tempPosition = civilian.position; let tempPosition = civilian.position;
civilian.matrix = tempMatrix; civilian.matrix = tempMatrix;
tempPosition.z += scaleFactor.z; tempPosition.z += scaleFactor.z;
civilian.position = tempPosition; civilian.position = tempPosition;
} }
} }
if(getGame() == VRR_GAME_GTA_SA) { if(getGame() == VRR_GAME_GTA_SA) {
if(doesEntityDataExist(civilian, "vrr.fightStyle")) { if(doesEntityDataExist(civilian, "vrr.fightStyle")) {
let fightStyle = getEntityData(civilian, "vrr.fightStyle"); let fightStyle = getEntityData(civilian, "vrr.fightStyle");
civilian.setFightStyle(fightStyle[0], fightStyle[1]); civilian.setFightStyle(fightStyle[0], fightStyle[1]);
} }
} }
if(getGame() == VRR_GAME_GTA_III) { if(getGame() == VRR_GAME_GTA_III) {
if(doesEntityDataExist(civilian, "vrr.walkStyle")) { if(doesEntityDataExist(civilian, "vrr.walkStyle")) {
let walkStyle = getEntityData(civilian, "vrr.walkStyle"); let walkStyle = getEntityData(civilian, "vrr.walkStyle");
civilian.walkStyle = walkStyle; civilian.walkStyle = walkStyle;
} }
} }
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
if(doesEntityDataExist(civilian, "vrr.bodyPropHair")) { if(doesEntityDataExist(civilian, "vrr.bodyPropHair")) {
let bodyPropHair = getEntityData(civilian, "vrr.bodyPropHair"); let bodyPropHair = getEntityData(civilian, "vrr.bodyPropHair");
civilian.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]); civilian.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropHead")) { if(doesEntityDataExist(civilian, "vrr.bodyPropHead")) {
let bodyPropHead = getEntityData(civilian, "vrr.bodyPropHead"); let bodyPropHead = getEntityData(civilian, "vrr.bodyPropHead");
civilian.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]); civilian.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropEyes")) { if(doesEntityDataExist(civilian, "vrr.bodyPropEyes")) {
let bodyPropEyes = getEntityData(civilian, "vrr.bodyPropEyes"); let bodyPropEyes = getEntityData(civilian, "vrr.bodyPropEyes");
civilian.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]); civilian.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropLeftHand")) { if(doesEntityDataExist(civilian, "vrr.bodyPropLeftHand")) {
let bodyPropLeftHand = getEntityData(civilian, "vrr.bodyPropLeftHand"); let bodyPropLeftHand = getEntityData(civilian, "vrr.bodyPropLeftHand");
civilian.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]); civilian.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropRightHand")) { if(doesEntityDataExist(civilian, "vrr.bodyPropRightHand")) {
let bodyPropRightHand = getEntityData(civilian, "vrr.bodyPropRightHand"); let bodyPropRightHand = getEntityData(civilian, "vrr.bodyPropRightHand");
civilian.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]); civilian.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropLeftWrist")) { if(doesEntityDataExist(civilian, "vrr.bodyPropLeftWrist")) {
let bodyPropLeftWrist = getEntityData(civilian, "vrr.bodyPropLeftWrist"); let bodyPropLeftWrist = getEntityData(civilian, "vrr.bodyPropLeftWrist");
civilian.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]); civilian.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) { if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) {
let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist"); let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist");
civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]); civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) { if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) {
let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist"); let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist");
civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]); civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropHip")) { if(doesEntityDataExist(civilian, "vrr.bodyPropHip")) {
let bodyPropHip = getEntityData(civilian, "vrr.bodyPropHip"); let bodyPropHip = getEntityData(civilian, "vrr.bodyPropHip");
civilian.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]); civilian.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropLeftFoot")) { if(doesEntityDataExist(civilian, "vrr.bodyPropLeftFoot")) {
let bodyPropLeftFoot = getEntityData(civilian, "vrr.bodyPropLeftFoot"); let bodyPropLeftFoot = getEntityData(civilian, "vrr.bodyPropLeftFoot");
civilian.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]); civilian.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]);
} }
if(doesEntityDataExist(civilian, "vrr.bodyPropRightFoot")) { if(doesEntityDataExist(civilian, "vrr.bodyPropRightFoot")) {
let bodyPropRightFoot = getEntityData(civilian, "vrr.bodyPropRightFoot"); let bodyPropRightFoot = getEntityData(civilian, "vrr.bodyPropRightFoot");
civilian.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]); civilian.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]);
} }
} }
if(doesEntityDataExist(civilian, "vrr.anim")) { if(doesEntityDataExist(civilian, "vrr.anim")) {
let animData = getEntityData(vehicle, "vrr.anim"); let animData = getEntityData(civilian, "vrr.anim");
civilian.addAnimation(animData[0], animData[1]); civilian.addAnimation(animData[0], animData[1]);
} }
} }
// =========================================================================== // ===========================================================================
function syncPlayerProperties(player) { function syncPlayerProperties(player) {
if(!areServerElementsSupported()) { if(!areServerElementsSupported()) {
return false; return false;
} }
if(getGame() == VRR_GAME_GTA_III) { if(getGame() == VRR_GAME_GTA_III) {
if(doesEntityDataExist(player, "vrr.scale")) { if(doesEntityDataExist(player, "vrr.scale")) {
let scaleFactor = getEntityData(player, "vrr.scale"); let scaleFactor = getEntityData(player, "vrr.scale");
let tempMatrix = player.matrix; let tempMatrix = player.matrix;
tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z)); tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z));
let tempPosition = player.position; let tempPosition = player.position;
player.matrix = tempMatrix; player.matrix = tempMatrix;
tempPosition.z += scaleFactor.z; tempPosition.z += scaleFactor.z;
player.position = tempPosition; player.position = tempPosition;
} }
} }
if(getGame() == VRR_GAME_GTA_SA) { if(getGame() == VRR_GAME_GTA_SA) {
if(doesEntityDataExist(player, "vrr.fightStyle")) { if(doesEntityDataExist(player, "vrr.fightStyle")) {
let fightStyle = getEntityData(player, "vrr.fightStyle"); let fightStyle = getEntityData(player, "vrr.fightStyle");
player.setFightStyle(fightStyle[0], fightStyle[1]); player.setFightStyle(fightStyle[0], fightStyle[1]);
} }
} }
//if(getGame() == VRR_GAME_GTA_SA) { //if(getGame() == VRR_GAME_GTA_SA) {
// if(doesEntityDataExist(player, "vrr.walkStyle")) { // if(doesEntityDataExist(player, "vrr.walkStyle")) {
// let walkStyle = getEntityData(player, "vrr.walkStyle"); // let walkStyle = getEntityData(player, "vrr.walkStyle");
// player.walkStyle = walkStyle; // player.walkStyle = walkStyle;
// } // }
//} //}
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
if(doesEntityDataExist(player, "vrr.bodyPartHair")) { if(doesEntityDataExist(player, "vrr.bodyPartHair")) {
let bodyPartHead = getEntityData(player, "vrr.bodyPartHair"); let bodyPartHead = getEntityData(player, "vrr.bodyPartHair");
player.changeBodyPart(0, bodyPartHead[0], bodyPartHair[1]); player.changeBodyPart(0, bodyPartHead[0], bodyPartHair[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPartHead")) { if(doesEntityDataExist(player, "vrr.bodyPartHead")) {
let bodyPartHead = getEntityData(player, "vrr.bodyPartHead"); let bodyPartHead = getEntityData(player, "vrr.bodyPartHead");
player.changeBodyPart(1, bodyPartHead[0], bodyPartHead[1]); player.changeBodyPart(1, bodyPartHead[0], bodyPartHead[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPartUpper")) { if(doesEntityDataExist(player, "vrr.bodyPartUpper")) {
let bodyPartUpper = getEntityData(player, "vrr.bodyPartUpper"); let bodyPartUpper = getEntityData(player, "vrr.bodyPartUpper");
player.changeBodyPart(1, bodyPartUpper[0], bodyPartUpper[1]); player.changeBodyPart(1, bodyPartUpper[0], bodyPartUpper[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPartLower")) { if(doesEntityDataExist(player, "vrr.bodyPartLower")) {
let bodyPartLower = getEntityData(player, "vrr.bodyPartLower"); let bodyPartLower = getEntityData(player, "vrr.bodyPartLower");
player.changeBodyPart(1, bodyPartLower[0], bodyPartLower[1]); player.changeBodyPart(1, bodyPartLower[0], bodyPartLower[1]);
} }
} }
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
if(doesEntityDataExist(player, "vrr.bodyPropHair")) { if(doesEntityDataExist(player, "vrr.bodyPropHair")) {
let bodyPropHair = getEntityData(player, "vrr.bodyPropHair"); let bodyPropHair = getEntityData(player, "vrr.bodyPropHair");
player.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]); player.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropHead")) { if(doesEntityDataExist(player, "vrr.bodyPropHead")) {
let bodyPropHead = getEntityData(player, "vrr.bodyPropHead"); let bodyPropHead = getEntityData(player, "vrr.bodyPropHead");
player.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]); player.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropEyes")) { if(doesEntityDataExist(player, "vrr.bodyPropEyes")) {
let bodyPropEyes = getEntityData(player, "vrr.bodyPropEyes"); let bodyPropEyes = getEntityData(player, "vrr.bodyPropEyes");
player.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]); player.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropLeftHand")) { if(doesEntityDataExist(player, "vrr.bodyPropLeftHand")) {
let bodyPropLeftHand = getEntityData(player, "vrr.bodyPropLeftHand"); let bodyPropLeftHand = getEntityData(player, "vrr.bodyPropLeftHand");
player.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]); player.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropRightHand")) { if(doesEntityDataExist(player, "vrr.bodyPropRightHand")) {
let bodyPropRightHand = getEntityData(player, "vrr.bodyPropRightHand"); let bodyPropRightHand = getEntityData(player, "vrr.bodyPropRightHand");
player.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]); player.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropLeftWrist")) { if(doesEntityDataExist(player, "vrr.bodyPropLeftWrist")) {
let bodyPropLeftWrist = getEntityData(player, "vrr.bodyPropLeftWrist"); let bodyPropLeftWrist = getEntityData(player, "vrr.bodyPropLeftWrist");
player.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]); player.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) { if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) {
let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist"); let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist");
player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]); player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) { if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) {
let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist"); let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist");
player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]); player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropHip")) { if(doesEntityDataExist(player, "vrr.bodyPropHip")) {
let bodyPropHip = getEntityData(player, "vrr.bodyPropHip"); let bodyPropHip = getEntityData(player, "vrr.bodyPropHip");
player.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]); player.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropLeftFoot")) { if(doesEntityDataExist(player, "vrr.bodyPropLeftFoot")) {
let bodyPropLeftFoot = getEntityData(player, "vrr.bodyPropLeftFoot"); let bodyPropLeftFoot = getEntityData(player, "vrr.bodyPropLeftFoot");
player.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]); player.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]);
} }
if(doesEntityDataExist(player, "vrr.bodyPropRightFoot")) { if(doesEntityDataExist(player, "vrr.bodyPropRightFoot")) {
let bodyPropRightFoot = getEntityData(player, "vrr.bodyPropRightFoot"); let bodyPropRightFoot = getEntityData(player, "vrr.bodyPropRightFoot");
player.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]); player.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]);
} }
} }
} }
// =========================================================================== // ===========================================================================
function syncObjectProperties(object) { function syncObjectProperties(object) {
if(!areServerElementsSupported()) { if(!areServerElementsSupported()) {
return false; return false;
} }
if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) { if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) {
if(doesEntityDataExist(object, "vrr.scale")) { if(doesEntityDataExist(object, "vrr.scale")) {
let scaleFactor = getEntityData(object, "vrr.scale"); let scaleFactor = getEntityData(object, "vrr.scale");
let tempMatrix = object.matrix; let tempMatrix = object.matrix;
tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z)); tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z));
let tempPosition = object.position; let tempPosition = object.position;
object.matrix = tempMatrix; object.matrix = tempMatrix;
tempPosition.z += scaleFactor.z; tempPosition.z += scaleFactor.z;
object.position = tempPosition; object.position = tempPosition;
} }
} }
} }
// =========================================================================== // ===========================================================================
function syncElementProperties(element) { function syncElementProperties(element) {
if(!areServerElementsSupported()) { if(!areServerElementsSupported()) {
return false; return false;
} }
if(doesEntityDataExist(element, "vrr.interior")) { if(doesEntityDataExist(element, "vrr.interior")) {
if(typeof element.interior != "undefined") { if(typeof element.interior != "undefined") {
element.interior = getEntityData(element, "vrr.interior"); element.interior = getEntityData(element, "vrr.interior");
} }
} }
switch(element.type) { if(getGame() == VRR_GAME_MAFIA_ONE) {
case ELEMENT_VEHICLE: switch(element.type) {
syncVehicleProperties(element); case ELEMENT_VEHICLE:
break; syncVehicleProperties(element);
break;
case ELEMENT_PED: case ELEMENT_PED:
syncCivilianProperties(element); syncCivilianProperties(element);
break; break;
case ELEMENT_PLAYER: case ELEMENT_PLAYER:
syncPlayerProperties(element); syncPlayerProperties(element);
break; break;
case ELEMENT_OBJECT: default:
syncObjectProperties(element); break;
break; }
} else {
switch(element.type) {
case ELEMENT_VEHICLE:
syncVehicleProperties(element);
break;
case ELEMENT_PED:
syncCivilianProperties(element);
break;
case ELEMENT_PLAYER:
syncPlayerProperties(element);
break;
case ELEMENT_OBJECT:
syncObjectProperties(element);
break;
default:
break;
}
}
default:
break;
}
} }
@@ -417,21 +437,21 @@ function syncElementProperties(element) {
// =========================================================================== // ===========================================================================
function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupModel, hasInterior) { function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupModel, hasInterior) {
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
} }
} }
// =========================================================================== // ===========================================================================
function setLocalPlayerPedPartsAndProps(parts, props) { function setLocalPlayerPedPartsAndProps(parts, props) {
for(let i in parts) { for(let i in parts) {
localPlayer.changeBodyPart(parts[i][0], parts[i][1], parts[i][2]); localPlayer.changeBodyPart(parts[i][0], parts[i][1], parts[i][2]);
} }
for(let j in props) { for(let j in props) {
localPlayer.changeBodyProp(props[j][0], props[j][1]); localPlayer.changeBodyProp(props[j][0], props[j][1]);
} }
} }
// =========================================================================== // ===========================================================================

File diff suppressed because it is too large Load Diff

18
scripts/client/vehicle.js Normal file
View File

@@ -0,0 +1,18 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: vehicle.js
// DESC: Provides vehicle functions and arrays with data
// TYPE: Client (JavaScript)
// ===========================================================================
function receiveVehicleFromServer(vehicleId, position, model, colour1, colour2, colour3 = 0, colour4 = 0) {
logToConsole(LOG_DEBUG, `[VRR.Job] Received vehicle ${vehicleId} (${getVehicleNameFromModel(model, getGame())}) from server`);
if(getGame() == VRR_GAME_GTA_IV) {
}
}
// ===========================================================================

View File

@@ -8,30 +8,30 @@
// =========================================================================== // ===========================================================================
function getPlayerAccentText(client) { function getPlayerAccentText(client) {
return getPlayerCurrentSubAccount(client).accent; return getPlayerCurrentSubAccount(client).accent;
} }
// =========================================================================== // ===========================================================================
function setPlayerAccentText(client, text) { function setPlayerAccentText(client, text) {
getPlayerCurrentSubAccount(client).accent = text; getPlayerCurrentSubAccount(client).accent = text;
} }
// =========================================================================== // ===========================================================================
function doesPlayerHaveAccent(client) { function doesPlayerHaveAccent(client) {
return (getPlayerCurrentSubAccount(client).accent != ""); return (getPlayerCurrentSubAccount(client).accent != "");
} }
// =========================================================================== // ===========================================================================
function getPlayerAccentInlineOutput(client) { function getPlayerAccentInlineOutput(client) {
let outputText = ""; let outputText = "";
if(doesPlayerHaveAccent(client)) { if(doesPlayerHaveAccent(client)) {
outputText = `[${getPlayerAccentText(client)}] `; outputText = `[${getPlayerAccentText(client)}] `;
} }
return outputText; return outputText;
} }
// =========================================================================== // ===========================================================================

View File

@@ -94,13 +94,13 @@ function toggleAutoSelectLastCharacterCommand(command, params, client) {
function toggleAccountGUICommand(command, params, client) { function toggleAccountGUICommand(command, params, client) {
let flagValue = getAccountSettingsFlagValue("NoGUI"); let flagValue = getAccountSettingsFlagValue("NoGUI");
if(!doesPlayerHaveGUIEnabled(client)) { if(doesPlayerHaveGUIEnabled(client)) {
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue); getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softRed}${toUpperCase(getLocaleString(client, "Off"))}`)); messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softRed}${toUpperCase(getLocaleString(client, "Off"))}{MAINCOLOUR}`));
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`); logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`);
} else { } else {
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue); getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softGreen}${toUpperCase(getLocaleString(client, "On"))}`)); messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softGreen}${toUpperCase(getLocaleString(client, "On"))}{MAINCOLOUR}`));
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`); logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`);
} }
@@ -271,6 +271,26 @@ function setAccountChatScrollLinesCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function setAccountChatAutoHideDelayCommand(command, params, client) {
if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command));
return false;
}
if(isNaN(params)) {
messagePlayerError(client, `The delay time must be a number!`);
return false;
}
let delay = Math.ceil(toInteger(params));
getPlayerData(client).accountData.chatAutoHideDelay = delay;
sendPlayerChatAutoHideDelay(client, delay);
messagePlayerSuccess(client, `Your chatbox will now automatically hide after ${toInteger(delay)} seconds!`);
}
// ===========================================================================
function setAccountEmailCommand(command, params, client) { function setAccountEmailCommand(command, params, client) {
if(areParamsEmpty(params)) { if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
@@ -569,6 +589,7 @@ function loginSuccess(client) {
if(doesServerHaveTesterOnlyEnabled()) { if(doesServerHaveTesterOnlyEnabled()) {
if(!hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("IsTester"))) { if(!hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("IsTester"))) {
setTimeout(function() { setTimeout(function() {
getPlayerData(client).customDisconnectReason = "Kicked - Not a tester";
client.disconnect(); client.disconnect();
}, 3500); }, 3500);
@@ -586,7 +607,7 @@ function loginSuccess(client) {
if(getPlayerData(client).subAccounts.length == 0) { if(getPlayerData(client).subAccounts.length == 0) {
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
showPlayerPromptGUI(client, getLocaleString(client, "NoCharactersGUIMessage"), getLocaleString(client, "NoCharactersGUIWindowTitle")); showPlayerPromptGUI(client, getLocaleString(client, "NoCharactersGUIMessage"), getLocaleString(client, "NoCharactersGUIWindowTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
getPlayerData(client).promptType = VRR_PROMPT_CREATEFIRSTCHAR; getPlayerData(client).promptType = VRR_PROMPT_CREATEFIRSTCHAR;
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`); logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`);
} else { } else {
@@ -600,8 +621,8 @@ function loginSuccess(client) {
getPlayerData(client).accountData.ipAddress = client.ip; getPlayerData(client).accountData.ipAddress = client.ip;
sendPlayerChatScrollLines(client, getPlayerData(client).accountData.chatScrollLines); sendPlayerChatScrollLines(client, getPlayerData(client).accountData.chatScrollLines);
messagePlayerNormal(null, `👋 ${getPlayerName(client)} has joined the server`, getColourByName("softYellow")); messagePlayerNormal(null, `👋 ${getPlayerName(client)} has joined the server`, getColourByName("softYellow"));
messageDiscordChatChannel(`👋 ${getPlayerName(client)} has joined the server`);
} }
// =========================================================================== // ===========================================================================
@@ -636,6 +657,7 @@ function saveAccountToDatabase(accountData) {
["acct_svr_staff_flags", accountData.flags.admin], ["acct_svr_staff_flags", accountData.flags.admin],
["acct_svr_mod_flags", accountData.flags.moderation], ["acct_svr_mod_flags", accountData.flags.moderation],
["acct_svr_chat_scroll_lines", accountData.chatScrollLines], ["acct_svr_chat_scroll_lines", accountData.chatScrollLines],
["acct_svr_chat_auto_hide_delay", accountData.chatAutoHideDelay],
]; ];
let queryString1 = createDatabaseUpdateQuery("acct_main", data, `acct_id=${accountData.databaseId}`); let queryString1 = createDatabaseUpdateQuery("acct_main", data, `acct_id=${accountData.databaseId}`);
@@ -915,13 +937,13 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
} else { } else {
messagePlayerError(client, "Password doesn't meet requirements!"); messagePlayerError(client, "Password doesn't meet requirements!");
} }
return false return false;
} }
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
if(!isValidEmailAddress(emailAddress)) { if(!isValidEmailAddress(emailAddress)) {
showPlayerRegistrationFailedGUI(client, getLocaleString(client, "RegistrationFailedInvalidEmail")); showPlayerRegistrationFailedGUI(client, getLocaleString(client, "RegistrationFailedInvalidEmail"));
return false return false;
} }
} }
@@ -947,7 +969,7 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
setAccountEmailVerificationCode(getPlayerData(client).accountData, emailVerificationCode); setAccountEmailVerificationCode(getPlayerData(client).accountData, emailVerificationCode);
sendEmailVerificationEmail(client, emailVerificationCode); sendEmailVerificationEmail(client, emailVerificationCode);
logToConsole(LOG_WARN, `${getPlayerDisplayForConsole(client)} was sent a registration email verification code`); logToConsole(LOG_WARN, `${getPlayerDisplayForConsole(client)} was sent a registration email verification code`);
} }
if(doesServerHaveTesterOnlyEnabled() && !isPlayerATester(client)) { if(doesServerHaveTesterOnlyEnabled() && !isPlayerATester(client)) {
setTimeout(function() { setTimeout(function() {
@@ -979,6 +1001,10 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
// =========================================================================== // ===========================================================================
function checkAccountResetPasswordRequest(client, inputText) { function checkAccountResetPasswordRequest(client, inputText) {
if(!checkForSMTPModule() || !getEmailConfig().enabled) {
return false;
}
if(getPlayerData(client).passwordResetState == VRR_RESETPASS_STATE_NONE) { if(getPlayerData(client).passwordResetState == VRR_RESETPASS_STATE_NONE) {
if(toLowerCase(getPlayerData(client).accountData.emailAddress) != toLowerCase(inputText)) { if(toLowerCase(getPlayerData(client).accountData.emailAddress) != toLowerCase(inputText)) {
logToConsole(LOG_DEBUG|LOG_WARN, `${getPlayerDisplayForConsole(client)} failed to reset their password (email not correct)`); logToConsole(LOG_DEBUG|LOG_WARN, `${getPlayerDisplayForConsole(client)} failed to reset their password (email not correct)`);
@@ -1063,7 +1089,7 @@ function isValidEmailAddress(emailAddress) {
// =========================================================================== // ===========================================================================
function saveAllClientsToDatabase() { function savePlayersToDatabase() {
logToConsole(LOG_DEBUG, "[VRR.Account]: Saving all clients to database ..."); logToConsole(LOG_DEBUG, "[VRR.Account]: Saving all clients to database ...");
getClients().forEach(function(client) { getClients().forEach(function(client) {
savePlayerToDatabase(client); savePlayerToDatabase(client);
@@ -1078,7 +1104,7 @@ function savePlayerToDatabase(client) {
return false; return false;
} }
if(!getPlayerData(client).loggedIn) { if(!isPlayerLoggedIn(client)) {
return false; return false;
} }
@@ -1088,7 +1114,7 @@ function savePlayerToDatabase(client) {
if(getPlayerData(client).currentSubAccount != -1) { if(getPlayerData(client).currentSubAccount != -1) {
//let subAccountData = getPlayerCurrentSubAccount(client); //let subAccountData = getPlayerCurrentSubAccount(client);
if(client.player != null) { if(getPlayerPed(client) != null) {
if(getPlayerData(client).returnToPosition != null) { if(getPlayerData(client).returnToPosition != null) {
getPlayerCurrentSubAccount(client).spawnPosition = getPlayerData(client).returnToPosition; getPlayerCurrentSubAccount(client).spawnPosition = getPlayerData(client).returnToPosition;
getPlayerCurrentSubAccount(client).spawnHeading = getPlayerData(client).returnToHeading.z; getPlayerCurrentSubAccount(client).spawnHeading = getPlayerData(client).returnToHeading.z;
@@ -1146,6 +1172,7 @@ function initClient(client) {
if(isAccountAutoIPLoginEnabled(tempAccountData) && getPlayerData(client).accountData.ipAddress == client.ip) { if(isAccountAutoIPLoginEnabled(tempAccountData) && getPlayerData(client).accountData.ipAddress == client.ip) {
messagePlayerAlert(client, getLocaleString(client, "AutoLoggedInIP")); messagePlayerAlert(client, getLocaleString(client, "AutoLoggedInIP"));
loginSuccess(client); loginSuccess(client);
playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client));
} else { } else {
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI.`); logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI.`);
@@ -1153,6 +1180,12 @@ function initClient(client) {
} else { } else {
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled).`); logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled).`);
messagePlayerNormal(client, getLocaleString(client, "WelcomeBack", getServerName(), getPlayerName(client), "/login"),getColourByName("softGreen")); messagePlayerNormal(client, getLocaleString(client, "WelcomeBack", getServerName(), getPlayerName(client), "/login"),getColourByName("softGreen"));
//if(checkForGeoIPModule()) {
// let iso = module.geoip.getCountryISO(client.ip);
// let localeId = getLocaleFromCountryISO(iso);
//}
//showGameMessage(client, getLocaleString(client, "LocaleOffer", `/lang ${getLocaleData(localeId)[2]}`), getColourByName("white"), 10000, "Roboto");
} }
playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client)); playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client));
} }

View File

@@ -20,17 +20,17 @@ function playPlayerAnimationCommand(command, params, client) {
return false; return false;
} }
let animationSlot = getAnimationFromParams(getParam(params, " ", 1)); let animationSlot = getAnimationFromParams(getParam(params, " ", 1));
let animationPositionOffset = 1; let animationPositionOffset = 1;
if(!animationSlot) { if(!animationSlot) {
messagePlayerError(client, getLocaleString(client, "AnimationNotFound")); messagePlayerError(client, getLocaleString(client, "InvalidAnimation"));
messagePlayerInfo(client, getLocaleString(client, "AnimationHelpTip"), `{ALTCOLOUR}/animlist{MAINCOLOUR}`); messagePlayerInfo(client, getLocaleString(client, "AnimationHelpTip"), `{ALTCOLOUR}/animlist{MAINCOLOUR}`);
return false; return false;
} }
if(toInteger(animationPositionOffset) < 0 || toInteger(animationPositionOffset) > 3) { if(toInteger(animationPositionOffset) < 0 || toInteger(animationPositionOffset) > 3) {
messagePlayerError(client, getLocaleString(client, "AnimationInvalidDistance")); messagePlayerError(client, getLocaleString(client, "InvalidAnimationDistance"));
return false; return false;
} }
@@ -39,7 +39,7 @@ let animationSlot = getAnimationFromParams(getParam(params, " ", 1));
} }
if(isPlayerHandCuffed(client) || isPlayerTazed(client) || isPlayerInForcedAnimation(client)) { if(isPlayerHandCuffed(client) || isPlayerTazed(client) || isPlayerInForcedAnimation(client)) {
messagePlayerError(client, `You aren't able to do that`); messagePlayerError(client, getLocaleString(client, "UnableToDoThat"));
return false; return false;
} }
@@ -51,17 +51,17 @@ let animationSlot = getAnimationFromParams(getParam(params, " ", 1));
function stopPlayerAnimationCommand(command, params, client) { function stopPlayerAnimationCommand(command, params, client) {
if(isPlayerHandCuffed(client) || isPlayerTazed(client) || isPlayerInForcedAnimation(client)) { if(isPlayerHandCuffed(client) || isPlayerTazed(client) || isPlayerInForcedAnimation(client)) {
messagePlayerError(client, `You aren't able to do that`); messagePlayerError(client, getLocaleString(client, "UnableToDoThat"));
return false; return false;
} }
setPlayerPosition(client, getPlayerData(client).currentAnimationPositionReturnTo); setPlayerPosition(client, getPlayerData(client).currentAnimationPositionReturnTo);
makePedStopAnimation(getPlayerData(client).ped); makePedStopAnimation(getPlayerPed(client));
getPlayerData(client).currentAnimation = -1; getPlayerData(client).currentAnimation = -1;
getPlayerData(client).currentAnimationPositionOffset = false; getPlayerData(client).currentAnimationPositionOffset = false;
getPlayerData(client).currentAnimationPositionReturnTo = false; getPlayerData(client).currentAnimationPositionReturnTo = false;
getPlayerData(client).animationStart = 0; getPlayerData(client).animationStart = 0;
getPlayerData(client).animationForced = false; getPlayerData(client).animationForced = false;
setPlayerMouseCameraState(client, false); setPlayerMouseCameraState(client, false);
@@ -70,7 +70,7 @@ function stopPlayerAnimationCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function showAnimationListCommand(command, params, client) { function showAnimationListCommand(command, params, client) {
let animList = getGameConfig().animations[getServerGame()].map(function(x) { return x[0]; }); let animList = getGameConfig().animations[getServerGame()].map(function(x) { return x.name; });
let chunkedList = splitArrayIntoChunks(animList, 10); let chunkedList = splitArrayIntoChunks(animList, 10);
@@ -88,7 +88,7 @@ function showAnimationListCommand(command, params, client) {
* @return {Array} The animation's data (array) * @return {Array} The animation's data (array)
*/ */
function getAnimationData(animationSlot, gameId = getServerGame()) { function getAnimationData(animationSlot, gameId = getServerGame()) {
return getGameConfig().animations[gameId][animationSlot]; return getGameConfig().animations[gameId][animationSlot];
} }
// =========================================================================== // ===========================================================================
@@ -100,14 +100,14 @@ function isPlayerInForcedAnimation(client) {
// =========================================================================== // ===========================================================================
function makePlayerPlayAnimation(client, animationSlot, offsetPosition = 1) { function makePlayerPlayAnimation(client, animationSlot, offsetPosition = 1) {
getPlayerData(client).currentAnimation = animationSlot; getPlayerData(client).currentAnimation = animationSlot;
getPlayerData(client).currentAnimationPositionOffset = offsetPosition; getPlayerData(client).currentAnimationPositionOffset = offsetPosition;
getPlayerData(client).currentAnimationPositionReturnTo = getPlayerPosition(client); getPlayerData(client).currentAnimationPositionReturnTo = getPlayerPosition(client);
getPlayerData(client).animationStart = getCurrentUnixTimestamp(); getPlayerData(client).animationStart = getCurrentUnixTimestamp();
getPlayerData(client).animationForced = false; getPlayerData(client).animationForced = false;
makePedPlayAnimation(getPlayerData(client).ped, animationSlot, offsetPosition); makePedPlayAnimation(getPlayerPed(client), animationSlot, offsetPosition);
setEntityData(getPlayerPed(client), "vrr.anim", animationSlot, true);
//if(getAnimationData(animationSlot)[9] != VRR_ANIMMOVE_NONE) { //if(getAnimationData(animationSlot)[9] != VRR_ANIMMOVE_NONE) {
// if(getGame() < VRR_GAME_GTA_SA) { // if(getGame() < VRR_GAME_GTA_SA) {
// setPlayerMouseCameraState(client, true); // setPlayerMouseCameraState(client, true);
@@ -118,35 +118,36 @@ function makePlayerPlayAnimation(client, animationSlot, offsetPosition = 1) {
// =========================================================================== // ===========================================================================
function forcePlayerPlayAnimation(client, animationSlot, offsetPosition = 1) { function forcePlayerPlayAnimation(client, animationSlot, offsetPosition = 1) {
getPlayerData(client).currentAnimation = animationSlot; getPlayerData(client).currentAnimation = animationSlot;
getPlayerData(client).currentAnimationPositionOffset = offsetPosition; getPlayerData(client).currentAnimationPositionOffset = offsetPosition;
getPlayerData(client).currentAnimationPositionReturnTo = getPlayerPosition(client); getPlayerData(client).currentAnimationPositionReturnTo = getPlayerPosition(client);
getPlayerData(client).animationStart = getCurrentUnixTimestamp(); getPlayerData(client).animationStart = getCurrentUnixTimestamp();
getPlayerData(client).animationForced = true; getPlayerData(client).animationForced = true;
setPlayerControlState(client, false); setPlayerControlState(client, false);
forcePedAnimation(getPlayerData(client).ped, animationSlot, offsetPosition); forcePedAnimation(getPlayerPed(client), animationSlot, offsetPosition);
} }
// =========================================================================== // ===========================================================================
function makePlayerStopAnimation(client) { function makePlayerStopAnimation(client) {
//setPlayerPosition(client, getPlayerData(client).currentAnimationPositionReturnTo); //setPlayerPosition(client, getPlayerData(client).currentAnimationPositionReturnTo);
makePedStopAnimation(getPlayerData(client).ped); makePedStopAnimation(getPlayerPed(client));
getPlayerData(client).currentAnimation = -1; getPlayerData(client).currentAnimation = -1;
getPlayerData(client).currentAnimationPositionOffset = false; getPlayerData(client).currentAnimationPositionOffset = false;
getPlayerData(client).currentAnimationPositionReturnTo = false; getPlayerData(client).currentAnimationPositionReturnTo = false;
getPlayerData(client).animationStart = 0; getPlayerData(client).animationStart = 0;
getPlayerData(client).animationForced = false; getPlayerData(client).animationForced = false;
} }
// =========================================================================== // ===========================================================================
function getAnimationFromParams(params) { function getAnimationFromParams(params) {
let animations = getGameConfig().animations[getServerGame()];
if(isNaN(params)) { if(isNaN(params)) {
for(let i in getGameConfig().animations[getServerGame()]) { for(let i in animations) {
if(toLowerCase(getGameConfig().animations[getServerGame()][i][0]).indexOf(toLowerCase(params)) != -1) { if(toLowerCase(animations[i].name).indexOf(toLowerCase(params)) != -1) {
return i; return i;
} }
} }

View File

@@ -8,14 +8,14 @@
// =========================================================================== // ===========================================================================
function initAntiCheatScript() { function initAntiCheatScript() {
logToConsole(LOG_DEBUG, "[VRR.AntiCheat]: Initializing anticheat script ..."); logToConsole(LOG_DEBUG, "[VRR.AntiCheat]: Initializing anticheat script ...");
logToConsole(LOG_DEBUG, "[VRR.AntiCheat]: Anticheat script initialized!"); logToConsole(LOG_DEBUG, "[VRR.AntiCheat]: Anticheat script initialized!");
} }
// =========================================================================== // ===========================================================================
function clearPlayerStateToEnterExitProperty(client) { function clearPlayerStateToEnterExitProperty(client) {
if(getPlayerData(client).pedState != VRR_PEDSTATE_READY) { if(getPlayerData(client).pedState != VRR_PEDSTATE_READY) {
if(getPlayerData(client).pedState == VRR_PEDSTATE_ENTERINGVEHICLE) { if(getPlayerData(client).pedState == VRR_PEDSTATE_ENTERINGVEHICLE) {
sendPlayerClearPedState(client); sendPlayerClearPedState(client);
getPlayerData(client).pedState = VRR_PEDSTATE_READY; getPlayerData(client).pedState = VRR_PEDSTATE_READY;

View File

@@ -10,8 +10,8 @@
// =========================================================================== // ===========================================================================
function initBanScript() { function initBanScript() {
logToConsole(LOG_INFO, "[VRR.Ban]: Initializing ban script ..."); logToConsole(LOG_INFO, "[VRR.Ban]: Initializing ban script ...");
logToConsole(LOG_INFO, "[VRR.Ban]: Ban script initialized!"); logToConsole(LOG_INFO, "[VRR.Ban]: Ban script initialized!");
} }
// =========================================================================== // ===========================================================================
@@ -22,24 +22,24 @@ function accountBanCommand(command, params, client) {
return false; return false;
} }
let splitParams = params.split(" "); let splitParams = params.split(" ");
let targetClient = getPlayerFromParams(getParam(params, " ", 1)); let targetClient = getPlayerFromParams(getParam(params, " ", 1));
let reason = splitParams.slice(1).join(" "); let reason = splitParams.slice(1).join(" ");
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!") messagePlayerError(client, "That player is not connected!")
return false; return false;
}
// Prevent banning admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, "ManageServer") || doesPlayerHaveStaffPermission(targetClient, "Developer")) {
messagePlayerError(client, getLocaleString(client, "CantBanPlayer"));
return false;
} }
logToConsole(LOG_WARN, `[VRR.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name}) account was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`); // Prevent banning admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, "ManageServer") || doesPlayerHaveStaffPermission(targetClient, "Developer")) {
messagePlayerError(client, getLocaleString(client, "CantBanPlayer"));
return false;
}
messageAdminAction(`{ALTCOLOUR}${getPlayerData(targetClient).currentSubAccountData.name} {MAINCOLOUR}has been account banned.`); logToConsole(LOG_WARN, `[VRR.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name}) account was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`);
announceAdminAction(`PlayerAccountBanned`, `{ALTCOLOUR}${targetClient.name}{MAINCOLOUR}`);
banAccount(getPlayerData(targetClient).accountData.databaseId, getPlayerData(client).accountData.databaseId, reason); banAccount(getPlayerData(targetClient).accountData.databaseId, getPlayerData(client).accountData.databaseId, reason);
disconnectPlayer(client); disconnectPlayer(client);
} }
@@ -52,27 +52,27 @@ function subAccountBanCommand(command, params, client, fromDiscord) {
return false; return false;
} }
let splitParams = params.split(" "); let splitParams = params.split(" ");
let targetClient = getPlayerFromParams(getParam(params, " ", 1)); let targetClient = getPlayerFromParams(getParam(params, " ", 1));
let reason = splitParams.slice(1).join(" "); let reason = splitParams.slice(1).join(" ");
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!") messagePlayerError(client, "That player is not connected!")
return false; return false;
} }
// Prevent banning admins with really high permissions // Prevent banning admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, "ManageServer") || doesPlayerHaveStaffPermission(targetClient, "Developer")) { if(doesPlayerHaveStaffPermission(targetClient, "ManageServer") || doesPlayerHaveStaffPermission(targetClient, "Developer")) {
messagePlayerError(client, getLocaleString(client, "CantBanPlayer")); messagePlayerError(client, getLocaleString(client, "CantBanPlayer"));
return false; return false;
} }
logToConsole(LOG_WARN, `[VRR.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name})'s subaccount was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`); logToConsole(LOG_WARN, `[VRR.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name})'s subaccount was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`);
messageAdminAction(`{ALTCOLOUR}${getPlayerData(targetClient).currentSubAccountData.name} {MAINCOLOUR}has been character banned.`); announceAdminAction(`PlayerCharacterBanned`, `{ALTCOLOUR}${targetClient.name}{MAINCOLOUR}`);
banSubAccount(getPlayerData(targetClient).currentSubAccountData.databaseId, getPlayerData(client).accountData.databaseId, reason); banSubAccount(getPlayerData(targetClient).currentSubAccountData.databaseId, getPlayerData(client).accountData.databaseId, reason);
disconnectPlayer(client); disconnectPlayer(client);
} }
// =========================================================================== // ===========================================================================
@@ -81,28 +81,28 @@ function ipBanCommand(command, params, client, fromDiscord) {
if(areParamsEmpty(params)) { if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
return false; return false;
} }
let splitParams = params.split(" "); let splitParams = params.split(" ");
let targetClient = getPlayerFromParams(getParam(params, " ", 1)); let targetClient = getPlayerFromParams(getParam(params, " ", 1));
let reason = splitParams.slice(1).join(" "); let reason = splitParams.slice(1).join(" ");
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!") messagePlayerError(client, "That player is not connected!")
return false; return false;
} }
// Prevent banning admins with really high permissions // Prevent banning admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, "ManageServer") || doesPlayerHaveStaffPermission(targetClient, "Developer")) { if(doesPlayerHaveStaffPermission(targetClient, "ManageServer") || doesPlayerHaveStaffPermission(targetClient, "Developer")) {
messagePlayerError(client, getLocaleString(client, "CantBanPlayer")); messagePlayerError(client, getLocaleString(client, "CantBanPlayer"));
return false; return false;
} }
messageAdminAction(`{ALTCOLOUR}${getPlayerData(targetClient).currentSubAccountData.name} {MAINCOLOUR}has been IP banned.`); announceAdminAction(`PlayerIPBanned`, `{ALTCOLOUR}${targetClient.name}{MAINCOLOUR}`);
banIPAddress(targetClient.ip, getPlayerData(client).accountData.databaseId, reason); banIPAddress(targetClient.ip, getPlayerData(client).accountData.databaseId, reason);
server.banIP(targetClient.ip); server.banIP(targetClient.ip);
targetClient.disconnect(); targetClient.disconnect();
} }
// =========================================================================== // ===========================================================================
@@ -111,190 +111,189 @@ function subNetBanCommand(command, params, client, fromDiscord) {
if(areParamsEmpty(params)) { if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
return false; return false;
} }
let splitParams = params.split(" "); let splitParams = params.split(" ");
let targetClient = getPlayerFromParams(getParam(params, " ", 1)); let targetClient = getPlayerFromParams(getParam(params, " ", 1));
let octetAmount = Number(getParam(params, " ", 2)); let octetAmount = Number(getParam(params, " ", 2));
let reason = splitParams.slice(2).join(" "); let reason = splitParams.slice(2).join(" ");
if(!targetClient) { if(!targetClient) {
messagePlayerError(client, "That player is not connected!") messagePlayerError(client, "That player is not connected!")
return false; return false;
} }
// Prevent banning admins with really high permissions // Prevent banning admins with really high permissions
if(doesPlayerHaveStaffPermission(targetClient, "ManageServer") || doesPlayerHaveStaffPermission(targetClient, "Developer")) { if(doesPlayerHaveStaffPermission(targetClient, "ManageServer") || doesPlayerHaveStaffPermission(targetClient, "Developer")) {
messagePlayerError(client, getLocaleString(client, "CantBanPlayer")); messagePlayerError(client, getLocaleString(client, "CantBanPlayer"));
return false; return false;
} }
messageAdminAction(`{ALTCOLOUR}${getPlayerData(targetClient).currentSubAccountData.name} {MAINCOLOUR}has been subnet banned`); announceAdminAction(`PlayerSubNetBanned`, `{ALTCOLOUR}${targetClient.name}{MAINCOLOUR}`);
banSubNet(targetClient.ip, getSubNet(targetClient.ip, octetAmount), getPlayerData(client).accountData.databaseId, reason); banSubNet(targetClient.ip, getSubNet(targetClient.ip, octetAmount), getPlayerData(client).accountData.databaseId, reason);
server.banIP(targetClient.ip); server.banIP(targetClient.ip);
} }
// =========================================================================== // ===========================================================================
function banAccount(accountId, adminAccountId, reason) { function banAccount(accountId, adminAccountId, reason) {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let safeReason = dbConnection.escapetoString(reason); let safeReason = dbConnection.escapetoString(reason);
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_ACCOUNT}, ${accountId}, ${adminAccountId}, '${safeReason}');`); let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_ACCOUNT}, ${accountId}, ${adminAccountId}, '${safeReason}');`);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
dbConnection.close(); dbConnection.close();
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function banSubAccount(subAccountId, adminAccountId, reason) { function banSubAccount(subAccountId, adminAccountId, reason) {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let safeReason = dbConnection.escapetoString(reason); let safeReason = dbConnection.escapetoString(reason);
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBACCOUNT}, ${subAccountId}, ${adminAccountId}, '${safeReason}');`); let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBACCOUNT}, ${subAccountId}, ${adminAccountId}, '${safeReason}');`);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
dbConnection.close(); dbConnection.close();
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function banIPAddress(ipAddress, adminAccountId, reason) { function banIPAddress(ipAddress, adminAccountId, reason) {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let safeReason = dbConnection.escapetoString(reason); let safeReason = dbConnection.escapetoString(reason);
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_IPADDRESS}, INET_ATON(${ipAddress}), ${adminAccountId}, '${safeReason}');`); let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_IPADDRESS}, INET_ATON(${ipAddress}), ${adminAccountId}, '${safeReason}');`);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
dbConnection.close(); dbConnection.close();
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function banSubNet(ipAddressStart, ipAddressEnd, adminAccountId, reason) { function banSubNet(ipAddressStart, ipAddressEnd, adminAccountId, reason) {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let safeReason = dbConnection.escapetoString(reason); let safeReason = dbConnection.escapetoString(reason);
let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_ip_start, ban_ip_end, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBNET}, INET_ATON(${ipAddressStart}), INET_ATON(${ipAddressEnd}), ${adminAccountId}, '${safeReason}');`); let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_ip_start, ban_ip_end, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBNET}, INET_ATON(${ipAddressStart}), INET_ATON(${ipAddressEnd}), ${adminAccountId}, '${safeReason}');`);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
dbConnection.close(); dbConnection.close();
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function unbanAccount(accountId, adminAccountId) { function unbanAccount(accountId, adminAccountId) {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_ACCOUNT} AND ban_detail=${accountId}`); let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_ACCOUNT} AND ban_detail=${accountId}`);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
dbConnection.close(); dbConnection.close();
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function unbanSubAccount(subAccountId, adminAccountId) { function unbanSubAccount(subAccountId, adminAccountId) {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBACCOUNT} AND ban_detail=${subAccountId}`); let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBACCOUNT} AND ban_detail=${subAccountId}`);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
dbConnection.close(); dbConnection.close();
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function unbanIPAddress(ipAddress, adminAccountId) { function unbanIPAddress(ipAddress, adminAccountId) {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_IPADDRESS} AND ban_detail=INET_ATON(${ipAddress})`); let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_IPADDRESS} AND ban_detail=INET_ATON(${ipAddress})`);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
dbConnection.close(); dbConnection.close();
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function unbanSubNet(ipAddressStart, ipAddressEnd, adminAccountId) { function unbanSubNet(ipAddressStart, ipAddressEnd, adminAccountId) {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBNET} AND ban_ip_start=INET_ATON(${ipAddressStart}) AND ban_ip_end=INET_ATON(${ipAddressEnd})`); let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBNET} AND ban_ip_start=INET_ATON(${ipAddressStart}) AND ban_ip_end=INET_ATON(${ipAddressEnd})`);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
dbConnection.close(); dbConnection.close();
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function isAccountBanned(accountId) { function isAccountBanned(accountId) {
let bans = getServerData().bans; let bans = getServerData().bans;
for(let i in bans) { for(let i in bans) {
if(bans[i].type == VRR_BANTYPE_ACCOUNT) { if(bans[i].type == VRR_BANTYPE_ACCOUNT) {
if(bans[i].detail == accountId) { if(bans[i].detail == accountId) {
return true; return true;
} }
} }
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function isSubAccountBanned(subAccountId) { function isSubAccountBanned(subAccountId) {
let bans = getServerData().bans; let bans = getServerData().bans;
for(let i in bans) { for(let i in bans) {
if(bans[i].type == VRR_BANTYPE_SUBACCOUNT) { if(bans[i].type == VRR_BANTYPE_SUBACCOUNT) {
if(bans[i].detail == subAccountId) { if(bans[i].detail == subAccountId) {
return true; return true;
} }
} }
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function isIpAddressBanned(ipAddress) { function isIpAddressBanned(ipAddress) {
let bans = getServerData().bans; let bans = getServerData().bans;
for(let i in bans) { for(let i in bans) {
if(bans[i].type == VRR_BANTYPE_IPADDRESS) { if(bans[i].type == VRR_BANTYPE_IPADDRESS) {
if(bans[i].detail == ipAddress) { if(bans[i].detail == ipAddress) {
return true; return true;
} }
} }
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================

View File

@@ -21,7 +21,6 @@ let serverBitFlags = {
npcTriggerTypeFlags: {}, npcTriggerTypeFlags: {},
npcTriggerConditionTypesFlags: {}, npcTriggerConditionTypesFlags: {},
npcTriggerResponseTypeFlags: {}, npcTriggerResponseTypeFlags: {},
serverSettings: {}
}; };
// =========================================================================== // ===========================================================================
@@ -41,6 +40,8 @@ let serverBitFlagKeys = {
"ManageWorld", "ManageWorld",
"ManageAntiCheat", "ManageAntiCheat",
"Developer", "Developer",
"ManageNPCs",
"ManageRaces",
], ],
moderationFlagKeys: [ moderationFlagKeys: [
"None", "None",
@@ -119,6 +120,8 @@ let serverBitFlagKeys = {
"NoRandomTips", "NoRandomTips",
"NoActionTips", "NoActionTips",
], ],
// Not going to be used. Use trigger, condition, and response stuff in trigger.js
npcTriggerTypeKeys: [ npcTriggerTypeKeys: [
"None", "None",
"FarProximity", // Comes within a far distance of NPC "FarProximity", // Comes within a far distance of NPC
@@ -219,26 +222,6 @@ let serverBitFlagKeys = {
"ShowItemsAfterPurchase", "ShowItemsAfterPurchase",
"BuyCommandAfterEnterBusiness", "BuyCommandAfterEnterBusiness",
], ],
serverSettingsKeys: [
"None",
"GUI",
"ServerLogo",
"FallingSnow",
"GroundSnow",
"Anticheat",
"CheckGameScripts",
"GameScriptBlackList",
"GameScriptWhiteList",
"JobBlips",
"JobPickups",
"BusinessBlips",
"BusinessPickups",
"HouseBlips",
"HousePickups",
"DiscordBot",
"RealTime",
"Testing",
],
}; };
// =========================================================================== // ===========================================================================
@@ -255,7 +238,6 @@ function initBitFlagScript() {
serverBitFlags.npcTriggerTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerTypeKeys); serverBitFlags.npcTriggerTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerTypeKeys);
serverBitFlags.npcTriggerConditionTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerConditionTypeKeys); serverBitFlags.npcTriggerConditionTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerConditionTypeKeys);
serverBitFlags.npcTriggerResponseTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerResponseTypeKeys); serverBitFlags.npcTriggerResponseTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerResponseTypeKeys);
serverBitFlags.serverSettings = createBitFlagTable(serverBitFlagKeys.serverSettingsKeys);
logToConsole(LOG_INFO, "[VRR.BitFlag]: Bit flag script initialized successfully!"); logToConsole(LOG_INFO, "[VRR.BitFlag]: Bit flag script initialized successfully!");
return true; return true;
} }
@@ -311,15 +293,15 @@ function doesPlayerHaveStaffPermission(client, requiredFlags) {
} }
// -1 is automatic override (having -1 for staff flags is basically god mode admin level) // -1 is automatic override (having -1 for staff flags is basically god mode admin level)
if(staffFlags == getStaffFlagValue("All")) { if(staffFlags == getStaffFlagValue("All")) {
return true; return true;
} }
if(hasBitFlag(staffFlags, requiredFlags)) { if(hasBitFlag(staffFlags, requiredFlags)) {
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
@@ -341,22 +323,22 @@ function doesPlayerHaveClanPermission(client, requiredFlags) {
clanFlags = getPlayerCurrentSubAccount(client).clanFlags | getClanRankFlags(getPlayerCurrentSubAccount(client).clanRank); clanFlags = getPlayerCurrentSubAccount(client).clanFlags | getClanRankFlags(getPlayerCurrentSubAccount(client).clanRank);
// -1 is automatic override (having -1 for staff flags is basically god mode admin level) // -1 is automatic override (having -1 for staff flags is basically god mode admin level)
if(clanFlags == getClanFlagValue("All")) { if(clanFlags == getClanFlagValue("All")) {
return true; return true;
} }
if(hasBitFlag(clanFlags, requiredFlags)) { if(hasBitFlag(clanFlags, requiredFlags)) {
return true; return true;
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================
function getStaffFlagValue(flagName) { function getStaffFlagValue(flagName) {
if(flagName == "All") { if(flagName == "All") {
return -1; return -1;
} }
if(typeof serverBitFlags.staffFlags[flagName] == "undefined") { if(typeof serverBitFlags.staffFlags[flagName] == "undefined") {
@@ -369,8 +351,8 @@ function getStaffFlagValue(flagName) {
// =========================================================================== // ===========================================================================
function getClanFlagValue(flagName) { function getClanFlagValue(flagName) {
if(flagName == "All") { if(flagName == "All") {
return -1; return -1;
} }
if(typeof getServerBitFlags().clanFlags[flagName] == "undefined") { if(typeof getServerBitFlags().clanFlags[flagName] == "undefined") {
@@ -383,8 +365,8 @@ function getClanFlagValue(flagName) {
// =========================================================================== // ===========================================================================
function getAccountSettingsFlagValue(flagName) { function getAccountSettingsFlagValue(flagName) {
if(flagName == "All") { if(flagName == "All") {
return -1; return -1;
} }
if(typeof serverBitFlags.accountSettingsFlags[flagName] == "undefined") { if(typeof serverBitFlags.accountSettingsFlags[flagName] == "undefined") {
@@ -397,8 +379,8 @@ function getAccountSettingsFlagValue(flagName) {
// =========================================================================== // ===========================================================================
function getModerationFlagValue(flagName) { function getModerationFlagValue(flagName) {
if(flagName == "All") { if(flagName == "All") {
return -1; return -1;
} }
if(typeof serverBitFlags.moderationFlags[flagName] == "undefined") { if(typeof serverBitFlags.moderationFlags[flagName] == "undefined") {
@@ -410,20 +392,6 @@ function getModerationFlagValue(flagName) {
// =========================================================================== // ===========================================================================
function getServerSettingsFlagValue(flagName) {
if(flagName == "All") {
return -1;
}
if(typeof serverBitFlags.serverSettings[flagName] == "undefined") {
return false;
}
return serverBitFlags.serverSettings[flagName];
}
// ===========================================================================
function givePlayerStaffFlag(client, flagName) { function givePlayerStaffFlag(client, flagName) {
if(!getStaffFlagValue(flagName)) { if(!getStaffFlagValue(flagName)) {
return false; return false;

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: bakery.js
// DESC: Provides bakery business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: bar.js
// DESC: Provides bar/pub business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: burger.js
// DESC: Provides burger joint (McDonalds?) business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,67 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: casino.js
// DESC: Provides casino business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================
let deckCards = [
DeckCardData("deckCardSpadeAce", VRR_DECKCARD_SUIT_SPADE, 1),
DeckCardData("deckCardSpade2", VRR_DECKCARD_SUIT_SPADE, 2),
DeckCardData("deckCardSpade3", VRR_DECKCARD_SUIT_SPADE, 3),
DeckCardData("deckCardSpade4", VRR_DECKCARD_SUIT_SPADE, 4),
DeckCardData("deckCardSpade5", VRR_DECKCARD_SUIT_SPADE, 5),
DeckCardData("deckCardSpade6", VRR_DECKCARD_SUIT_SPADE, 6),
DeckCardData("deckCardSpade7", VRR_DECKCARD_SUIT_SPADE, 7),
DeckCardData("deckCardSpade8", VRR_DECKCARD_SUIT_SPADE, 8),
DeckCardData("deckCardSpade9", VRR_DECKCARD_SUIT_SPADE, 9),
DeckCardData("deckCardSpade10", VRR_DECKCARD_SUIT_SPADE, 10),
DeckCardData("deckCardSpadeJack", VRR_DECKCARD_SUIT_SPADE, 11),
DeckCardData("deckCardSpadeQueen", VRR_DECKCARD_SUIT_SPADE, 12),
DeckCardData("deckCardSpadeKing", VRR_DECKCARD_SUIT_SPADE, 13),
DeckCardData("deckCardClubAce", VRR_DECKCARD_SUIT_CLUB, 1),
DeckCardData("deckCardClub2", VRR_DECKCARD_SUIT_CLUB, 2),
DeckCardData("deckCardClub3", VRR_DECKCARD_SUIT_CLUB, 3),
DeckCardData("deckCardClub4", VRR_DECKCARD_SUIT_CLUB, 4),
DeckCardData("deckCardClub5", VRR_DECKCARD_SUIT_CLUB, 5),
DeckCardData("deckCardClub6", VRR_DECKCARD_SUIT_CLUB, 6),
DeckCardData("deckCardClub7", VRR_DECKCARD_SUIT_CLUB, 7),
DeckCardData("deckCardClub8", VRR_DECKCARD_SUIT_CLUB, 8),
DeckCardData("deckCardClub9", VRR_DECKCARD_SUIT_CLUB, 9),
DeckCardData("deckCardClub10", VRR_DECKCARD_SUIT_CLUB, 10),
DeckCardData("deckCardClubJack", VRR_DECKCARD_SUIT_CLUB, 11),
DeckCardData("deckCardClubQueen", VRR_DECKCARD_SUIT_CLUB, 12),
DeckCardData("deckCardClubKing", VRR_DECKCARD_SUIT_CLUB, 13),
DeckCardData("deckCardHeartAce", VRR_DECKCARD_SUIT_HEART, 1),
DeckCardData("deckCardHeart2", VRR_DECKCARD_SUIT_HEART, 2),
DeckCardData("deckCardHeart3", VRR_DECKCARD_SUIT_HEART, 3),
DeckCardData("deckCardHeart4", VRR_DECKCARD_SUIT_HEART, 4),
DeckCardData("deckCardHeart5", VRR_DECKCARD_SUIT_HEART, 5),
DeckCardData("deckCardHeart6", VRR_DECKCARD_SUIT_HEART, 6),
DeckCardData("deckCardHeart7", VRR_DECKCARD_SUIT_HEART, 7),
DeckCardData("deckCardHeart8", VRR_DECKCARD_SUIT_HEART, 8),
DeckCardData("deckCardHeart9", VRR_DECKCARD_SUIT_HEART, 9),
DeckCardData("deckCardHeart10", VRR_DECKCARD_SUIT_HEART, 10),
DeckCardData("deckCardHeartJack", VRR_DECKCARD_SUIT_HEART, 11),
DeckCardData("deckCardHeartQueen", VRR_DECKCARD_SUIT_HEART, 12),
DeckCardData("deckCardHeartKing", VRR_DECKCARD_SUIT_HEART, 13),
DeckCardData("deckCardDiamondAce", VRR_DECKCARD_SUIT_DIAMOND, 1),
DeckCardData("deckCardDiamond2", VRR_DECKCARD_SUIT_DIAMOND, 2),
DeckCardData("deckCardDiamond3", VRR_DECKCARD_SUIT_DIAMOND, 3),
DeckCardData("deckCardDiamond4", VRR_DECKCARD_SUIT_DIAMOND, 4),
DeckCardData("deckCardDiamond5", VRR_DECKCARD_SUIT_DIAMOND, 5),
DeckCardData("deckCardDiamond6", VRR_DECKCARD_SUIT_DIAMOND, 6),
DeckCardData("deckCardDiamond7", VRR_DECKCARD_SUIT_DIAMOND, 7),
DeckCardData("deckCardDiamond8", VRR_DECKCARD_SUIT_DIAMOND, 8),
DeckCardData("deckCardDiamond9", VRR_DECKCARD_SUIT_DIAMOND, 9),
DeckCardData( "deckCardDiamond10", VRR_DECKCARD_SUIT_DIAMOND, 10),
DeckCardData("deckCardDiamondJack", VRR_DECKCARD_SUIT_DIAMOND, 11),
DeckCardData("deckCardDiamondQueen", VRR_DECKCARD_SUIT_DIAMOND, 12),
DeckCardData("deckCardDiamondKing", VRR_DECKCARD_SUIT_DIAMOND, 13),
];
let deckCardBacks = [
]

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: clothing.js
// DESC: Provides clothing (skin) business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: club.js
// DESC: Provides club/nightclub business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: fuel.js
// DESC: Provides fuel/petrol business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: mechanic.js
// DESC: Provides mechanic/vehicle repair business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: pizza.js
// DESC: Provides pizza restaurant business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: restaurant.js
// DESC: Provides generic restaurant business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,8 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: vehicle.js
// DESC: Provides vehicle dealership business functions and usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -1,9 +0,0 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: weapon.js
// DESC: Provides weapon (ammunations & illegal gunshops) business usage
// TYPE: Business (JavaScript)
// ===========================================================================

View File

@@ -39,12 +39,13 @@ function processPlayerChat(client, messageText) {
messageText = messageText.substring(0, 128); messageText = messageText.substring(0, 128);
messagePlayerNormal(null, `💬 ${getCharacterFullName(client)}: ${messageText}`); messagePlayerNormal(null, `💬 ${getCharacterFullName(client)}: ${messageText}`);
messageDiscordChatChannel(`💬 ${getCharacterFullName(client)}: ${messageText}`);
} else { } else {
messagePlayerNormal(null, `🛡️ (ADMIN) - ${messageText}`); messagePlayerNormal(null, `🛡️ (ADMIN) - ${messageText}`);
} }
/* /*
let clients = getClients(); let clients = getClients();
for(let i in clients) { for(let i in clients) {
let translatedText; let translatedText;
translatedText = await translateMessage(messageText, getPlayerData(client).locale, getPlayerData(clients[i]).locale); translatedText = await translateMessage(messageText, getPlayerData(client).locale, getPlayerData(clients[i]).locale);
@@ -52,9 +53,9 @@ function processPlayerChat(client, messageText) {
let original = (getPlayerData(client).locale == getPlayerData(clients[i]).locale) ? `` : ` {ALTCOLOUR}(${messageText})`; let original = (getPlayerData(client).locale == getPlayerData(clients[i]).locale) ? `` : ` {ALTCOLOUR}(${messageText})`;
messagePlayerNormal(clients[i], `💬 ${getCharacterFullName(client)}: [#FFFFFF]${translatedText}${original}`, clients[i], getColourByName("mediumGrey")); messagePlayerNormal(clients[i], `💬 ${getCharacterFullName(client)}: [#FFFFFF]${translatedText}${original}`, clients[i], getColourByName("mediumGrey"));
} }
*/ */
//messageDiscordChatChannel(`💬 ${getCharacterFullName(client)}: ${messageText}`); //messageDiscordChatChannel(`💬 ${getCharacterFullName(client)}: ${messageText}`);
} }
// =========================================================================== // ===========================================================================

View File

@@ -9,7 +9,10 @@
function initClanScript() { function initClanScript() {
logToConsole(LOG_INFO, "[VRR.Clan]: Initializing clans script ..."); logToConsole(LOG_INFO, "[VRR.Clan]: Initializing clans script ...");
getServerData().clans = loadClansFromDatabase(); if(!getServerConfig().devServer) {
getServerData().clans = loadClansFromDatabase();
}
setAllClanDataIndexes(); setAllClanDataIndexes();
logToConsole(LOG_INFO, "[VRR.Clan]: Clan script initialized successfully!"); logToConsole(LOG_INFO, "[VRR.Clan]: Clan script initialized successfully!");
return true; return true;
@@ -114,7 +117,7 @@ function createClanRank(clanId, rankId, rankName) {
let rankIndex = getClanData(clanId).ranks.push(tempClanRankData); let rankIndex = getClanData(clanId).ranks.push(tempClanRankData);
setAllClanDataIndexes(); setAllClanDataIndexes();
saveAllClanRanksToDatabase(clanId); saveClanRanksToDatabase(clanId);
return rankIndex; return rankIndex;
} }
@@ -927,12 +930,20 @@ function doesClanIdExist(clanId) {
// =========================================================================== // ===========================================================================
function reloadAllClans() { function reloadAllClans() {
if(getServerConfig().devServer) {
return false;
}
getServerData().clans = loadClansFromDatabase(); getServerData().clans = loadClansFromDatabase();
} }
// =========================================================================== // ===========================================================================
function saveAllClanRanksToDatabase(clanId) { function saveClanRanksToDatabase(clanId) {
if(getServerConfig().devServer) {
return false;
}
let ranks = getServerData().clans[clanId].ranks; let ranks = getServerData().clans[clanId].ranks;
for(let i in ranks) { for(let i in ranks) {
saveClanRankToDatabase(clanId, i); saveClanRankToDatabase(clanId, i);
@@ -948,9 +959,13 @@ function saveClanToDatabase(clanId) {
return false; return false;
} }
if(!tempClanData.needsSaved) { if(tempClanData.databaseId == -1) {
return false; return false;
} }
if(!tempClanData.needsSaved) {
return false;
}
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
@@ -982,7 +997,7 @@ function saveClanToDatabase(clanId) {
disconnectFromDatabase(dbConnection); disconnectFromDatabase(dbConnection);
} }
saveAllClanRanksToDatabase(clanId); saveClanRanksToDatabase(clanId);
return true; return true;
} }
@@ -994,41 +1009,41 @@ function saveClanToDatabase(clanId) {
function saveClanRankToDatabase(clanId, rankId) { function saveClanRankToDatabase(clanId, rankId) {
let tempClanRankData = getClanRankData(clanId, rankId); let tempClanRankData = getClanRankData(clanId, rankId);
if(!tempClanRankData.needsSaved) { if(!tempClanRankData.needsSaved) {
return false; return false;
} }
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let safeName = escapeDatabaseString(dbConnection, tempClanRankData.name); let safeName = escapeDatabaseString(dbConnection, tempClanRankData.name);
let safeTag = escapeDatabaseString(dbConnection, tempClanRankData.customTag); let safeTag = escapeDatabaseString(dbConnection, tempClanRankData.customTag);
//let safeTitle = escapeDatabaseString(dbConnection, tempClanRankData.name); //let safeTitle = escapeDatabaseString(dbConnection, tempClanRankData.name);
let data = [ let data = [
["clan_rank_name", safeName], ["clan_rank_name", safeName],
["clan_rank_clan", tempClanRankData.clan], ["clan_rank_clan", tempClanRankData.clan],
["clan_rank_custom_tag", safeTag], ["clan_rank_custom_tag", safeTag],
//["clan_rank_title", safeTitle], //["clan_rank_title", safeTitle],
["clan_rank_flags", tempClanRankData.flags], ["clan_rank_flags", tempClanRankData.flags],
["clan_rank_level", tempClanRankData.level], ["clan_rank_level", tempClanRankData.level],
["clan_rank_enabled", boolToInt(tempClanRankData.enabled)], ["clan_rank_enabled", boolToInt(tempClanRankData.enabled)],
]; ];
let dbQuery = null; let dbQuery = null;
if(tempClanRankData.databaseId == 0) { if(tempClanRankData.databaseId == 0) {
let queryString = createDatabaseInsertQuery("clan_rank", data); let queryString = createDatabaseInsertQuery("clan_rank", data);
dbQuery = queryDatabase(dbConnection, queryString); dbQuery = queryDatabase(dbConnection, queryString);
getClanRankData(clanId, rankId).databaseId = getDatabaseInsertId(dbConnection); getClanRankData(clanId, rankId).databaseId = getDatabaseInsertId(dbConnection);
getClanRankData(clanId, rankId).needsSaved = false; getClanRankData(clanId, rankId).needsSaved = false;
} else { } else {
let queryString = createDatabaseUpdateQuery("clan_rank", data, `clan_rank_id=${tempClanRankData.databaseId} LIMIT 1`); let queryString = createDatabaseUpdateQuery("clan_rank", data, `clan_rank_id=${tempClanRankData.databaseId} LIMIT 1`);
dbQuery = queryDatabase(dbConnection, queryString); dbQuery = queryDatabase(dbConnection, queryString);
getClanRankData(clanId, rankId).needsSaved = false; getClanRankData(clanId, rankId).needsSaved = false;
} }
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
disconnectFromDatabase(dbConnection); disconnectFromDatabase(dbConnection);
return true; return true;
} }
return false; return false;
@@ -1071,7 +1086,11 @@ function setClanRankTitle(clanId, rankId, title) {
// =========================================================================== // ===========================================================================
function saveAllClansToDatabase() { function saveClansToDatabase() {
if(getServerConfig().devServer) {
return false;
}
for(let i in getServerData().clans) { for(let i in getServerData().clans) {
saveClanToDatabase(i); saveClanToDatabase(i);
} }
@@ -1134,6 +1153,11 @@ function getClanRankIdFromDatabaseId(clanId, databaseId) {
// =========================================================================== // ===========================================================================
/**
* @param {number} clanId - The data index of the clan
* @param {number} clanRankId - The data index of the clan rank
* @return {ClanRankData} The clan rank's data (class instance)
*/
function getClanRankData(clanId, rankId) { function getClanRankData(clanId, rankId) {
return getServerData().clans[clanId].ranks[rankId]; return getServerData().clans[clanId].ranks[rankId];
} }
@@ -1213,6 +1237,10 @@ let rankId = getClanRankFromParams(clanId, getParam(params, " ", 1));
} }
*/ */
/**
* @param {String} params - The params to search for
* @return {Number} The data index of a matching clan
*/
function getClanFromParams(params) { function getClanFromParams(params) {
if(isNaN(params)) { if(isNaN(params)) {
for(let i in getServerData().clans) { for(let i in getServerData().clans) {
@@ -1231,6 +1259,11 @@ function getClanFromParams(params) {
// =========================================================================== // ===========================================================================
/**
* @param {Number} clanId - The clan ID to search ranks for
* @param {String} params - The params to search for
* @return {Number} The data index of a matching clan
*/
function getClanRankFromParams(clanId, params) { function getClanRankFromParams(clanId, params) {
if(isNaN(params)) { if(isNaN(params)) {
for(let i in getClanData(clanId).ranks) { for(let i in getClanData(clanId).ranks) {

View File

@@ -19,7 +19,7 @@ function initClassScript() {
/** /**
* @class Representing data for server configuration * @class Representing data for server configuration
*/ */
class ServerData { class ServerConfigData {
constructor(dbAssoc = false) { constructor(dbAssoc = false) {
this.databaseId = 0; this.databaseId = 0;
this.needsSaved = false; this.needsSaved = false;
@@ -58,7 +58,7 @@ class ServerData {
this.showLogo = true; this.showLogo = true;
this.inflationMultiplier = 1; this.inflationMultiplier = 1;
this.testerOnly = false; this.testerOnly = false;
this.settings = 0; this.devServer = false;
this.antiCheat = { this.antiCheat = {
enabled: false, enabled: false,
@@ -87,9 +87,6 @@ class ServerData {
this.realTimeZone = 0; this.realTimeZone = 0;
this.discordConfig = { this.discordConfig = {
eventChannelWebHookURL: "",
chatChannelWebHookURL: "",
adminChannelWebHookURL: "",
sendEvents: true, sendEvents: true,
sendChat: true, sendChat: true,
sendAdminEvents: true, sendAdminEvents: true,
@@ -104,7 +101,6 @@ class ServerData {
bank: dbAssoc["svr_newchar_bank"], bank: dbAssoc["svr_newchar_bank"],
skin: dbAssoc["svr_newchar_skin"], skin: dbAssoc["svr_newchar_skin"],
}, },
this.settings = toInteger(dbAssoc["svr_settings"]);
this.connectCameraPosition = toVector3(dbAssoc["svr_connectcam_pos_x"], dbAssoc["svr_connectcam_pos_y"], dbAssoc["svr_connectcam_pos_z"]); this.connectCameraPosition = toVector3(dbAssoc["svr_connectcam_pos_x"], dbAssoc["svr_connectcam_pos_y"], dbAssoc["svr_connectcam_pos_z"]);
this.connectCameraLookAt = toVector3(dbAssoc["svr_connectcam_lookat_x"], dbAssoc["svr_connectcam_lookat_y"], dbAssoc["svr_connectcam_lookat_z"]); this.connectCameraLookAt = toVector3(dbAssoc["svr_connectcam_lookat_x"], dbAssoc["svr_connectcam_lookat_y"], dbAssoc["svr_connectcam_lookat_z"]);
@@ -113,6 +109,21 @@ class ServerData {
this.minute = toInteger(dbAssoc["svr_start_time_min"]); this.minute = toInteger(dbAssoc["svr_start_time_min"]);
this.minuteDuration = toInteger(dbAssoc["svr_time_min_duration"]); this.minuteDuration = toInteger(dbAssoc["svr_time_min_duration"]);
this.weather = toInteger(dbAssoc["svr_start_weather"]); this.weather = toInteger(dbAssoc["svr_start_weather"]);
//this.fallingSnow = intToBool(toInteger(dbAssoc["svr_start_snow_falling"]));
//this.groundSnow = intToBool(toInteger(dbAssoc["svr_start_snow_ground"]));
//this.useGUI = intToBool(toInteger(dbAssoc["svr_gui_enabled"]));
//this.showLogo = intToBool(toInteger(dbAssoc["svr_logo_enabled"]));
//this.testerOnly = intToBool(toInteger(dbAssoc["svr_tester_only"]));
/*
this.createJobPickups = intToBool(toInteger(dbAssoc["svr_job_pickups_enabled"]));
this.createBusinessPickups = intToBool(toInteger(dbAssoc["svr_biz_pickups_enabled"]));
this.createHousePickups = intToBool(toInteger(dbAssoc["svr_house_pickups_enabled"]));
this.createJobBlips = intToBool(toInteger(dbAssoc["svr_job_blips_enabled"]));
this.createBusinessBlips = intToBool(toInteger(dbAssoc["svr_biz_blips_enabled"]));
this.createHouseBlips = intToBool(toInteger(dbAssoc["svr_house_blips_enabled"]));
*/
this.guiColourPrimary = [toInteger(dbAssoc["svr_gui_col1_r"]), toInteger(dbAssoc["svr_gui_col1_g"]), toInteger(dbAssoc["svr_gui_col1_b"])]; this.guiColourPrimary = [toInteger(dbAssoc["svr_gui_col1_r"]), toInteger(dbAssoc["svr_gui_col1_g"]), toInteger(dbAssoc["svr_gui_col1_b"])];
this.guiColourSecondary = [toInteger(dbAssoc["svr_gui_col2_r"]), toInteger(dbAssoc["svr_gui_col2_g"]), toInteger(dbAssoc["svr_gui_col2_b"])]; this.guiColourSecondary = [toInteger(dbAssoc["svr_gui_col2_r"]), toInteger(dbAssoc["svr_gui_col2_g"]), toInteger(dbAssoc["svr_gui_col2_b"])];
this.guiTextColourPrimary = [toInteger(dbAssoc["svr_gui_textcol1_r"]), toInteger(dbAssoc["svr_gui_textcol1_g"]), toInteger(dbAssoc["svr_gui_textcol1_b"])]; this.guiTextColourPrimary = [toInteger(dbAssoc["svr_gui_textcol1_r"]), toInteger(dbAssoc["svr_gui_textcol1_g"]), toInteger(dbAssoc["svr_gui_textcol1_b"])];
@@ -121,15 +132,14 @@ class ServerData {
this.discordBotToken = intToBool(dbAssoc["svr_discord_bot_token"]); this.discordBotToken = intToBool(dbAssoc["svr_discord_bot_token"]);
this.introMusicURL = dbAssoc["svr_intro_music"]; this.introMusicURL = dbAssoc["svr_intro_music"];
this.realTimeZone = dbAssoc["svr_time_realtime_timezone"];
this.discordConfig = { //this.useRealTime = intToBool(toInteger(dbAssoc["svr_real_time_enabled"]));
eventChannelWebHookURL: dbAssoc["svr_discord_event_webhook"], //this.realTimeZone = dbAssoc["svr_real_time_timezone"];
chatChannelWebHookURL: dbAssoc["svr_discord_chat_webhook"],
adminChannelWebHookURL: dbAssoc["svr_discord_admin_webhook"], this.discord = {
sendEvents: true, sendEvents: true,
sendChat: true, sendChat: true,
sendAdminEvents: true, sendAdmin: true,
}; };
} }
} }
@@ -239,6 +249,10 @@ class ClientData {
this.locale = 0; this.locale = 0;
this.enteringVehicle = null; this.enteringVehicle = null;
this.customDisconnectReason = "";
this.interiorCutscene = "";
} }
}; };
@@ -271,6 +285,7 @@ class AccountData {
this.twoFactorAuthVerificationCode = ""; this.twoFactorAuthVerificationCode = "";
this.chatScrollLines = 1; this.chatScrollLines = 1;
this.chatAutoHideDelay = 0;
this.streamingRadioVolume = 20; this.streamingRadioVolume = 20;
this.locale = 0; this.locale = 0;
@@ -300,6 +315,7 @@ class AccountData {
this.emailVerificationCode = dbAssoc["acct_code_verifyemail"]; this.emailVerificationCode = dbAssoc["acct_code_verifyemail"];
this.twoFactorAuthVerificationCode = dbAssoc["acct_code_2fa"]; this.twoFactorAuthVerificationCode = dbAssoc["acct_code_2fa"];
this.chatScrollLines = toInteger(dbAssoc["acct_svr_chat_scroll_lines"]); this.chatScrollLines = toInteger(dbAssoc["acct_svr_chat_scroll_lines"]);
this.chatAutoHideDelay = toInteger(dbAssoc["acct_svr_chat_auto_hide_delay"]);
this.streamingRadioVolume = toInteger(dbAssoc["acct_streaming_radio_volume"]); this.streamingRadioVolume = toInteger(dbAssoc["acct_streaming_radio_volume"]);
this.locale = toInteger(dbAssoc["acct_locale"]); this.locale = toInteger(dbAssoc["acct_locale"]);
} }
@@ -524,6 +540,7 @@ class BusinessData {
this.entranceBlipModel = -1; this.entranceBlipModel = -1;
this.entrancePickup = null; this.entrancePickup = null;
this.entranceBlip = null; this.entranceBlip = null;
this.entranceCutscene = "";
this.exitPosition = false; this.exitPosition = false;
this.exitRotation = 0.0; this.exitRotation = 0.0;
@@ -533,6 +550,7 @@ class BusinessData {
this.exitBlipModel = -1; this.exitBlipModel = -1;
this.exitPickup = null; this.exitPickup = null;
this.exitBlip = null; this.exitBlip = null;
this.exitCutscene = "";
this.entranceFee = 0; this.entranceFee = 0;
this.till = 0; this.till = 0;
@@ -541,6 +559,8 @@ class BusinessData {
this.labelHelpType = VRR_PROPLABEL_INFO_NONE; this.labelHelpType = VRR_PROPLABEL_INFO_NONE;
this.triggers = [];
if(dbAssoc) { if(dbAssoc) {
this.databaseId = toInteger(dbAssoc["biz_id"]); this.databaseId = toInteger(dbAssoc["biz_id"]);
this.name = toString(dbAssoc["biz_name"]); this.name = toString(dbAssoc["biz_name"]);
@@ -557,6 +577,7 @@ class BusinessData {
this.entranceDimension = toInteger(dbAssoc["biz_entrance_vw"]); this.entranceDimension = toInteger(dbAssoc["biz_entrance_vw"]);
this.entrancePickupModel = toInteger(dbAssoc["biz_entrance_pickup"]); this.entrancePickupModel = toInteger(dbAssoc["biz_entrance_pickup"]);
this.entranceBlipModel = toInteger(dbAssoc["biz_entrance_blip"]); this.entranceBlipModel = toInteger(dbAssoc["biz_entrance_blip"]);
this.entranceCutscene = toString(dbAssoc["biz_entrance_cutscene"]);
this.exitPosition = toVector3(dbAssoc["biz_exit_pos_x"], dbAssoc["biz_exit_pos_y"], dbAssoc["biz_exit_pos_z"]); this.exitPosition = toVector3(dbAssoc["biz_exit_pos_x"], dbAssoc["biz_exit_pos_y"], dbAssoc["biz_exit_pos_z"]);
this.exitRotation = toInteger(dbAssoc["biz_exit_rot_z"]); this.exitRotation = toInteger(dbAssoc["biz_exit_rot_z"]);
@@ -564,12 +585,14 @@ class BusinessData {
this.exitDimension = toInteger(dbAssoc["biz_exit_vw"]); this.exitDimension = toInteger(dbAssoc["biz_exit_vw"]);
this.exitPickupModel = toInteger(dbAssoc["biz_exit_pickup"]); this.exitPickupModel = toInteger(dbAssoc["biz_exit_pickup"]);
this.exitBlipModel = toInteger(dbAssoc["biz_exit_blip"]); this.exitBlipModel = toInteger(dbAssoc["biz_exit_blip"]);
this.exitCutscene = toString(dbAssoc["biz_exit_cutscene"]);
this.entranceFee = toInteger(dbAssoc["biz_entrance_fee"]); this.entranceFee = toInteger(dbAssoc["biz_entrance_fee"]);
this.till = toInteger(dbAssoc["biz_till"]); this.till = toInteger(dbAssoc["biz_till"]);
this.labelHelpType = toInteger(dbAssoc["biz_label_help_type"]); this.labelHelpType = toInteger(dbAssoc["biz_label_help_type"]);
this.streamingRadioStation = toInteger(dbAssoc["biz_radiostation"]); this.streamingRadioStation = toInteger(dbAssoc["biz_radiostation"]);
} }
}; };
}; };
@@ -658,6 +681,7 @@ class HouseData {
this.entranceBlipModel = -1; this.entranceBlipModel = -1;
this.entrancePickup = null; this.entrancePickup = null;
this.entranceBlip = null; this.entranceBlip = null;
this.entranceCutscene = "";
this.exitPosition = false; this.exitPosition = false;
this.exitRotation = 0.0; this.exitRotation = 0.0;
@@ -667,9 +691,12 @@ class HouseData {
this.exitBlipModel = -1; this.exitBlipModel = -1;
this.exitPickup = null; this.exitPickup = null;
this.exitBlip = null; this.exitBlip = null;
this.exitCutscene = "";
this.streamingRadioStation = -1; this.streamingRadioStation = -1;
this.triggers = [];
if(dbAssoc) { if(dbAssoc) {
this.databaseId = toInteger(dbAssoc["house_id"]); this.databaseId = toInteger(dbAssoc["house_id"]);
this.description = toString(dbAssoc["house_description"]); this.description = toString(dbAssoc["house_description"]);
@@ -688,6 +715,7 @@ class HouseData {
this.entranceDimension = toInteger(dbAssoc["house_entrance_vw"]); this.entranceDimension = toInteger(dbAssoc["house_entrance_vw"]);
this.entrancePickupModel = toInteger(dbAssoc["house_entrance_pickup"]); this.entrancePickupModel = toInteger(dbAssoc["house_entrance_pickup"]);
this.entranceBlipModel = toInteger(dbAssoc["house_entrance_blip"]); this.entranceBlipModel = toInteger(dbAssoc["house_entrance_blip"]);
this.entranceCutscene = toString(dbAssoc["house_entrance_cutscene"]);
this.exitPosition = toVector3(toFloat(dbAssoc["house_exit_pos_x"]), toFloat(dbAssoc["house_exit_pos_y"]), toFloat(dbAssoc["house_exit_pos_z"])); this.exitPosition = toVector3(toFloat(dbAssoc["house_exit_pos_x"]), toFloat(dbAssoc["house_exit_pos_y"]), toFloat(dbAssoc["house_exit_pos_z"]));
this.exitRotation = toFloat(dbAssoc["house_exit_rot_z"]); this.exitRotation = toFloat(dbAssoc["house_exit_rot_z"]);
@@ -695,6 +723,7 @@ class HouseData {
this.exitDimension = toInteger(dbAssoc["house_exit_vw"]); this.exitDimension = toInteger(dbAssoc["house_exit_vw"]);
this.exitPickupModel = toInteger(dbAssoc["house_exit_pickup"]); this.exitPickupModel = toInteger(dbAssoc["house_exit_pickup"]);
this.exitBlipModel = toInteger(dbAssoc["house_exit_blip"]); this.exitBlipModel = toInteger(dbAssoc["house_exit_blip"]);
this.exitCutscene = toString(dbAssoc["house_exit_cutscene"]);
} }
} }
}; };
@@ -934,6 +963,8 @@ class VehicleData {
this.lastActiveTime = false; this.lastActiveTime = false;
this.triggers = [];
if(dbAssoc) { if(dbAssoc) {
// General Info // General Info
this.databaseId = toInteger(dbAssoc["veh_id"]); this.databaseId = toInteger(dbAssoc["veh_id"]);
@@ -1003,7 +1034,7 @@ class VehicleData {
}; };
/** /**
* @class Representing a command's data. Loaded and saved in the database * @class Representing a command's data.
*/ */
class CommandData { class CommandData {
enable() { enable() {
@@ -1018,7 +1049,7 @@ class CommandData {
this.enabled = !this.enabled; this.enabled = !this.enabled;
} }
constructor(command, handlerFunction, syntaxString, requiredStaffFlags, requireLogin, allowOnDiscord, helpDescription) { constructor(command, handlerFunction, syntaxString = "", requiredStaffFlags = 0, requireLogin = true, allowOnDiscord = false, helpDescription = "") {
this.command = command; this.command = command;
this.handlerFunction = handlerFunction; this.handlerFunction = handlerFunction;
this.syntaxString = syntaxString; this.syntaxString = syntaxString;
@@ -1302,49 +1333,6 @@ class KeyBindData {
} }
}; };
class BlackListedGameScriptData {
constructor(dbAssoc = false) {
this.databaseId = 0;
this.enabled = false
this.serverId = 0;
this.scriptName = "";
this.index = -1;
this.needsSaved = false;
if(dbAssoc) {
this.databaseId = dbAssoc["ac_script_bl_id"];
this.enabled = intToBool(dbAssoc["ac_script_bl_enabled"]);
this.serverId = dbAssoc["ac_script_bl_server"];
this.scriptName = dbAssoc["ac_script_bl_name"];
}
}
};
class WhiteListedGameScriptData {
constructor(dbAssoc = false) {
this.databaseId = 0;
this.enabled = false
this.serverId = 0;
this.scriptName = "";
this.index = -1;
this.needsSaved = false;
if(dbAssoc) {
this.databaseId = dbAssoc["ac_script_wl_id"];
this.enabled = intToBool(dbAssoc["ac_script_wl_enabled"]);
this.serverId = dbAssoc["ac_script_wl_server"];
this.scriptName = dbAssoc["ac_script_wl_name"];
}
}
};
class InteriorTemplateData {
constructor(exitPosition, exitInterior) {
this.exitPosition = exitPosition;
this.exitInterior = exitInterior;
}
};
class RadioStationData { class RadioStationData {
constructor(dbAssoc = false) { constructor(dbAssoc = false) {
this.databaseId = 0; this.databaseId = 0;
@@ -1486,6 +1474,7 @@ class ItemTypeData {
} }
} }
}; };
class NPCData { class NPCData {
constructor(dbAssoc = false) { constructor(dbAssoc = false) {
this.databaseId = 0; this.databaseId = 0;
@@ -1495,8 +1484,10 @@ class NPCData {
this.middleName = "Q"; this.middleName = "Q";
this.skin = 0; this.skin = 0;
this.cash = 0; this.cash = 0;
this.spawnPosition = toVector3(0.0, 0.0, 0.0); this.position = toVector3(0.0, 0.0, 0.0);
this.spawnHeading = 0.0; this.rotation = toVector3(0.0, 0.0, 0.0);
this.scale = toVector3(1.0, 1.0, 1.0);
this.heading = 0.0;
this.clan = 0; this.clan = 0;
this.isWorking = false; this.isWorking = false;
this.jobUniform = this.skin; this.jobUniform = this.skin;
@@ -1505,13 +1496,16 @@ class NPCData {
this.weapons = []; this.weapons = [];
this.interior = 0; this.interior = 0;
this.dimension = 0; this.dimension = 0;
this.pedScale = toVector3(1.0, 1.0, 1.0);
this.walkStyle = 0; this.walkStyle = 0;
this.fightStyle = 0; this.fightStyle = 0;
this.health = 100; this.health = 100;
this.armour = 100; this.armour = 100;
this.currentAction = VRR_NPCACTION_NONE; this.currentAction = VRR_NPCACTION_NONE;
this.triggers = []; this.triggers = [];
this.typeFlags = 0;
this.heedThreats = false;
this.threats = 0;
this.invincible = false;
this.bodyParts = { this.bodyParts = {
hair: [0,0], hair: [0,0],
@@ -1533,6 +1527,8 @@ class NPCData {
rightFoot: [0,0], rightFoot: [0,0],
}; };
this.triggers = [];
if(dbAssoc) { if(dbAssoc) {
this.databaseId = toInteger(dbAssoc["npc_id"]); this.databaseId = toInteger(dbAssoc["npc_id"]);
this.serverId = toInteger(dbAssoc["npc_server"]); this.serverId = toInteger(dbAssoc["npc_server"]);
@@ -1541,21 +1537,24 @@ class NPCData {
this.middleName = dbAssoc["npc_name_middle"] || ""; this.middleName = dbAssoc["npc_name_middle"] || "";
this.skin = toInteger(dbAssoc["npc_skin"]); this.skin = toInteger(dbAssoc["npc_skin"]);
this.cash = toInteger(dbAssoc["npc_cash"]); this.cash = toInteger(dbAssoc["npc_cash"]);
this.spawnPosition = toVector3(toFloat(dbAssoc["npc_pos_x"]), toFloat(dbAssoc["npc_pos_y"]), toFloat(dbAssoc["npc_pos_z"])); this.position = toVector3(toFloat(dbAssoc["npc_pos_x"]), toFloat(dbAssoc["npc_pos_y"]), toFloat(dbAssoc["npc_pos_z"]));
this.spawnHeading = toFloat(dbAssoc["npc_angle"]); this.rotation = toVector3(toFloat(dbAssoc["npc_rot_x"]), toFloat(dbAssoc["npc_rot_y"]), toFloat(dbAssoc["npc_rot_z"]));
this.scale = toVector3(toFloat(dbAssoc["npc_scale_x"]), toFloat(dbAssoc["npc_scale_y"]), toFloat(dbAssoc["npc_scale_z"]));
this.heading = toFloat(dbAssoc["npc_rot_z"]);
this.lastLogin = toInteger(dbAssoc["npc_when_lastlogin"]); this.lastLogin = toInteger(dbAssoc["npc_when_lastlogin"]);
this.clan = toInteger(dbAssoc["npc_clan"]); this.rank = toInteger(dbAssoc["npc_rank"]);
this.clanFlags = toInteger(dbAssoc["npc_clan_flags"]); this.title = toInteger(dbAssoc["npc_title"]);
this.clanRank = toInteger(dbAssoc["npc_clan_rank"]);
this.clanTitle = toInteger(dbAssoc["npc_clan_title"]);
this.job = toInteger(dbAssoc["npc_job"]); this.job = toInteger(dbAssoc["npc_job"]);
this.interior = toInteger(dbAssoc["npc_int"]); this.interior = toInteger(dbAssoc["npc_int"]);
this.dimension = toInteger(dbAssoc["npc_vw"]); this.dimension = toInteger(dbAssoc["npc_vw"]);
this.pedScale = toVector3(toFloat(dbAssoc["npc_scale_x"]), toFloat(dbAssoc["npc_scale_y"]), toFloat(dbAssoc["npc_scale_z"]));
this.walkStyle = toInteger(dbAssoc["npc_walkstyle"]); this.walkStyle = toInteger(dbAssoc["npc_walkstyle"]);
this.fightStyle = toInteger(dbAssoc["npc_fightstyle"]); this.fightStyle = toInteger(dbAssoc["npc_fightstyle"]);
this.health = toInteger(dbAssoc["npc_health"]); this.health = toInteger(dbAssoc["npc_health"]);
this.armour = toInteger(dbAssoc["npc_armour"]); this.armour = toInteger(dbAssoc["npc_armour"]);
this.typeFlags = toInteger(dbAssoc["npc_type_flags"]);
this.heedThreats = intToBool(dbAssoc["npc_headthreats"]);
this.threats = toInteger(dbAssoc["npc_threats"]);
this.invincible = intToBool(dbAssoc["npc_invincible"]);
this.bodyParts = { this.bodyParts = {
hair: [toInteger(dbAssoc["npc_hd_part_hair_model"]) || 0, toInteger(dbAssoc["npc_hd_part_hair_texture"]) || 0], hair: [toInteger(dbAssoc["npc_hd_part_hair_model"]) || 0, toInteger(dbAssoc["npc_hd_part_hair_texture"]) || 0],
@@ -1656,28 +1655,6 @@ class BanData {
} }
} }
class DeckCardData {
constructor(imageName, value) {
this.imageName = imageName,
this.value = value;
}
}
class DeckCardGameData {
constructor() {
this.gameType = VRR_DECKCARD_GAME_NONE;
this.playedCards = [];
this.remainingCards = [];
}
}
class DeckCardHandData {
constructor() {
this.cards = [];
this.total = 0;
}
}
class JobRouteData { class JobRouteData {
constructor(dbAssoc = false) { constructor(dbAssoc = false) {
this.databaseId = 0; this.databaseId = 0;
@@ -1708,7 +1685,7 @@ class JobRouteData {
this.pay = toInteger(dbAssoc["job_route_pay"]); this.pay = toInteger(dbAssoc["job_route_pay"]);
this.startMessage = toString(dbAssoc["job_route_start_msg"]); this.startMessage = toString(dbAssoc["job_route_start_msg"]);
this.finishMessage = toString(dbAssoc["job_route_finish_msg"]); this.finishMessage = toString(dbAssoc["job_route_finish_msg"]);
this.locationArriveMessage = toString(dbAssoc["job_route_loc_arrive_msg"]); this.locationArriveMessage = toString(dbAssoc["job_route_loc_arrive_msg"]);
this.locationNextMessage = toString(dbAssoc["job_route_loc_next_msg"]); this.locationNextMessage = toString(dbAssoc["job_route_loc_next_msg"]);
this.vehicleColour1 = toInteger(dbAssoc["job_route_veh_colour1"]); this.vehicleColour1 = toInteger(dbAssoc["job_route_veh_colour1"]);
this.vehicleColour2 = toInteger(dbAssoc["job_route_veh_colour2"]); this.vehicleColour2 = toInteger(dbAssoc["job_route_veh_colour2"]);
@@ -1724,7 +1701,7 @@ class JobRouteLocationData {
this.routeId = 0; this.routeId = 0;
this.enabled = false; this.enabled = false;
this.index = -1; this.index = -1;
this.jobIndex = -1; this.jobIndex = -1;
this.routeIndex = -1; this.routeIndex = -1;
this.needsSaved = false; this.needsSaved = false;
this.position = toVector3(0.0, 0.0, 0.0); this.position = toVector3(0.0, 0.0, 0.0);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -15,6 +15,8 @@ let gameConfig = false;
// =========================================================================== // ===========================================================================
let globalConfig = { let globalConfig = {
keyBind: [],
economy: {},
accountPasswordHash: "SHA512", accountPasswordHash: "SHA512",
npcFarProximity: 100, npcFarProximity: 100,
npcMediumProximity: 40, npcMediumProximity: 40,
@@ -31,7 +33,6 @@ let globalConfig = {
stopWorkingDistance: 10, stopWorkingDistance: 10,
spawnCarDistance: 5, spawnCarDistance: 5,
payAndSprayDistance: 5, payAndSprayDistance: 5,
keyBind: [],
exitPropertyDistance: 3.0, exitPropertyDistance: 3.0,
enterPropertyDistance: 3.0, enterPropertyDistance: 3.0,
businessDimensionStart: 5000, businessDimensionStart: 5000,
@@ -67,10 +68,19 @@ let globalConfig = {
], ],
vehicleInactiveRespawnDelay: 1800000, // 20 minutes vehicleInactiveRespawnDelay: 1800000, // 20 minutes
chatSectionHeaderLength: 96, chatSectionHeaderLength: 96,
economy: {}, useServerSideVehiclePurchaseCheck: true,
locales: [], businessPickupStreamInDistance: 100,
accents: [], businessPickupStreamOutDistance: 120,
useServerSideVehiclePurchaseCheck: false, housePickupStreamInDistance: 100,
housePickupStreamOutDistance: 120,
jobPickupStreamInDistance: 100,
jobPickupStreamOutDistance: 120,
businessBlipStreamInDistance: 200,
businessBlipStreamOutDistance: 220,
houseBlipStreamInDistance: 200,
houseBlipStreamOutDistance: 220,
jobBlipStreamInDistance: 200,
jobBlipStreamOutDistance: 220,
}; };
// =========================================================================== // ===========================================================================
@@ -84,20 +94,20 @@ function initConfigScript() {
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port, getMultiplayerMod()); serverConfig = loadServerConfigFromGameAndPort(server.game, server.port, getMultiplayerMod());
logToConsole(LOG_INFO, "[VRR.Config]: Applying server config ..."); logToConsole(LOG_INFO, "[VRR.Config]: Applying server config ...");
getServerConfig().fallingSnow = intToBool(toInteger(server.getCVar("fallingsnow"))); getServerConfig().fallingSnow = intToBool(toInteger(server.getCVar("vrr_fallingsnow")));
getServerConfig().groundSnow = intToBool(toInteger(server.getCVar("groundsnow"))); getServerConfig().groundSnow = intToBool(toInteger(server.getCVar("vrr_groundsnow")));
getServerConfig().useGUI = intToBool(toInteger(server.getCVar("gui"))); getServerConfig().useGUI = intToBool(toInteger(server.getCVar("vrr_gui")));
getServerConfig().showLogo = false; getServerConfig().showLogo = false;
getServerConfig().testerOnly = intToBool(toInteger(server.getCVar("testeronly"))); getServerConfig().testerOnly = intToBool(toInteger(server.getCVar("vrr_testeronly")));
getServerConfig().discordEnabled = false; getServerConfig().discordEnabled = false;
getServerConfig().createJobPickups = intToBool(toInteger(server.getCVar("jobpickups"))); getServerConfig().createJobPickups = intToBool(toInteger(server.getCVar("vrr_jobpickups")));
getServerConfig().createBusinessPickups = intToBool(toInteger(server.getCVar("businesspickups"))); getServerConfig().createBusinessPickups = intToBool(toInteger(server.getCVar("vrr_businesspickups")));
getServerConfig().createHousePickups = intToBool(toInteger(server.getCVar("housepickups"))); getServerConfig().createHousePickups = intToBool(toInteger(server.getCVar("vrr_housepickups")));
getServerConfig().createJobBlips = intToBool(toInteger(server.getCVar("jobblips"))); getServerConfig().createJobBlips = intToBool(toInteger(server.getCVar("vrr_jobblips")));
getServerConfig().createBusinessBlips = intToBool(toInteger(server.getCVar("businessblips"))); getServerConfig().createBusinessBlips = intToBool(toInteger(server.getCVar("vrr_businessblips")));
getServerConfig().createHouseBlips = intToBool(toInteger(server.getCVar("houseblips"))); getServerConfig().createHouseBlips = intToBool(toInteger(server.getCVar("vrr_houseblips")));
getServerConfig().useRealTime = intToBool(toInteger(server.getCVar("realtime"))); getServerConfig().useRealTime = intToBool(toInteger(server.getCVar("vrr_realtime")));
getServerConfig().antiCheat.enabled = intToBool(toInteger(server.getCVar("anticheat"))); getServerConfig().antiCheat.enabled = intToBool(toInteger(server.getCVar("vrr_anticheat")));
applyConfigToServer(serverConfig); applyConfigToServer(serverConfig);
logToConsole(LOG_DEBUG, "[VRR.Config]: Server config applied successfully!"); logToConsole(LOG_DEBUG, "[VRR.Config]: Server config applied successfully!");
@@ -112,6 +122,7 @@ function loadGlobalConfig() {
getGlobalConfig().economy = loadEconomyConfig(); getGlobalConfig().economy = loadEconomyConfig();
getGlobalConfig().locale = loadLocaleConfig(); getGlobalConfig().locale = loadLocaleConfig();
getGlobalConfig().accents = loadAccentConfig(); getGlobalConfig().accents = loadAccentConfig();
getGlobalConfig().discord = loadDiscordConfig();
} }
// =========================================================================== // ===========================================================================
@@ -124,7 +135,7 @@ function loadServerConfigFromGameAndPort(gameId, port, mpMod) {
if(dbQuery) { if(dbQuery) {
if(dbQuery.numRows > 0) { if(dbQuery.numRows > 0) {
let dbAssoc = fetchQueryAssoc(dbQuery); let dbAssoc = fetchQueryAssoc(dbQuery);
let tempServerConfigData = new ServerData(dbAssoc); let tempServerConfigData = new ServerConfigData(dbAssoc);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
return tempServerConfigData; return tempServerConfigData;
} }
@@ -144,7 +155,7 @@ function loadServerConfigFromId(tempServerId) {
if(dbQuery) { if(dbQuery) {
if(dbQuery.numRows > 0) { if(dbQuery.numRows > 0) {
let dbAssoc = fetchQueryAssoc(dbQuery); let dbAssoc = fetchQueryAssoc(dbQuery);
let tempServerConfigData = new ServerData(dbAssoc); let tempServerConfigData = new ServerConfigData(dbAssoc);
freeDatabaseQuery(dbQuery); freeDatabaseQuery(dbQuery);
return tempServerConfigData; return tempServerConfigData;
} }
@@ -178,7 +189,7 @@ function saveServerConfigToDatabase() {
let dbConnection = connectToDatabase(); let dbConnection = connectToDatabase();
if(dbConnection) { if(dbConnection) {
let data = [ let data = [
["svr_settings", toInteger(getServerConfig().settings)], //["svr_settings", toInteger(getServerConfig().settings)],
["svr_start_time_hour", getServerConfig().hour], ["svr_start_time_hour", getServerConfig().hour],
["svr_start_time_min", getServerConfig().minute], ["svr_start_time_min", getServerConfig().minute],
["svr_start_weather", getServerConfig().weather], ["svr_start_weather", getServerConfig().weather],
@@ -233,7 +244,7 @@ function saveServerConfigToDatabase() {
/** /**
* *
* @return {ServerData} - Server configuration data * @return {ServerConfigData} - Server configuration data
* *
*/ */
function getServerConfig() { function getServerConfig() {
@@ -283,24 +294,24 @@ function setTimeCommand(command, params, client) {
if(hour > 23 || hour < 0) { if(hour > 23 || hour < 0) {
messagePlayerError(client, "The hour must be between 0 and 23!"); messagePlayerError(client, "The hour must be between 0 and 23!");
return false; return false;
} }
if(minute > 59 || minute < 0) { if(minute > 59 || minute < 0) {
messagePlayerError(client, "The minute must be between 0 and 59!"); messagePlayerError(client, "The minute must be between 0 and 59!");
return false; return false;
} }
getServerConfig().hour = hour; getServerConfig().hour = hour;
getServerConfig().minute = minute; getServerConfig().minute = minute;
game.time.hour = getServerConfig().hour; game.time.hour = getServerConfig().hour;
game.time.minute = getServerConfig().minute; game.time.minute = getServerConfig().minute;
//checkServerGameTime(); //checkServerGameTime();
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} set the time to ${makeReadableTime(hour, minute)}`); announceAdminAction("ServerTimeSet", getPlayerName(client), makeReadableTime(hour, minute));
return true; return true;
} }
@@ -322,13 +333,13 @@ function setMinuteDurationCommand(command, params, client) {
return false; return false;
} }
let minuteDuration = toInteger(params); let minuteDuration = toInteger(params);
getServerConfig().minuteDuration = minuteDuration; getServerConfig().minuteDuration = minuteDuration;
setTimeMinuteDuration(null, minuteDuration); setTimeMinuteDuration(null, minuteDuration);
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} set the minute duration to ${minuteDuration}ms`); announceAdminAction("ServerMinuteDurationSet", getPlayerName(client), makeReadableTime(hour, minute));
return true; return true;
} }
@@ -354,15 +365,15 @@ function setWeatherCommand(command, params, client) {
if(!weatherId) { if(!weatherId) {
messagePlayerError(client, `That weather ID or name is invalid!`); messagePlayerError(client, `That weather ID or name is invalid!`);
return false; return false;
} }
game.forceWeather(toInteger(weatherId)); game.forceWeather(toInteger(weatherId));
getServerConfig().weather = weatherId; getServerConfig().weather = weatherId;
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} set the weather to {ALTCOLOUR}${getGameConfig().weatherNames[getServerGame()][toInteger(weatherId)]}`); announceAdminAction("ServerWeatherSet", getPlayerName(client), getGameConfig().weatherNames[getServerGame()][toInteger(weatherId)]);
updateServerRules(); updateServerRules();
return true; return true;
} }
@@ -384,7 +395,7 @@ function setSnowingCommand(command, params, client) {
} }
let splitParams = params.split(" "); let splitParams = params.split(" ");
let falling = toInteger(getParam(params, " ", 1)); let falling = toInteger(getParam(params, " ", 1));
let ground = toInteger(getParam(params, " ", 2)); let ground = toInteger(getParam(params, " ", 2));
getServerConfig().fallingSnow = intToBool(falling); getServerConfig().fallingSnow = intToBool(falling);
@@ -394,8 +405,8 @@ function setSnowingCommand(command, params, client) {
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned falling snow ${getBoolRedGreenInlineColour(falling)}${getOnOffFromBool(falling)} {MAINCOLOUR}and ground snow ${getBoolRedGreenInlineColour(ground)}${getOnOffFromBool(ground)}`); announceAdminAction("ServerSnowSet", getPlayerName(client), `${getBoolRedGreenInlineColour(falling)}${getOnOffFromBool(falling)}`, `${getBoolRedGreenInlineColour(ground)}${getOnOffFromBool(ground)}`);
updateServerRules(); updateServerRules();
return true; return true;
} }
@@ -417,7 +428,7 @@ function setServerGUIColoursCommand(command, params, client) {
} }
let splitParams = params.split(" "); let splitParams = params.split(" ");
let colourRed = toInteger(getParam(params, " ", 1)) || 255; let colourRed = toInteger(getParam(params, " ", 1)) || 255;
let colourGreen = toInteger(getParam(params, " ", 2)) || 255; let colourGreen = toInteger(getParam(params, " ", 2)) || 255;
let colourBlue = toInteger(getParam(params, " ", 3)) || 255; let colourBlue = toInteger(getParam(params, " ", 3)) || 255;
@@ -430,8 +441,8 @@ function setServerGUIColoursCommand(command, params, client) {
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
//messageAdminAction(`${getPlayerName(client)} ${getInlineChatColourByName("orange")}set the server ${getBoolRedGreenInlineColour(fallingSnow)}${getOnOffFromBool(fallingSnow)} ${getInlineChatColourByName("orange")}and ground snow ${getBoolRedGreenInlineColour(groundSnow)}${getOnOffFromBool(groundSnow)}`); //announceAdminAction(`${getPlayerName(client)} ${getInlineChatColourByName("orange")}set the server ${getBoolRedGreenInlineColour(fallingSnow)}${getOnOffFromBool(fallingSnow)} ${getInlineChatColourByName("orange")}and ground snow ${getBoolRedGreenInlineColour(groundSnow)}${getOnOffFromBool(groundSnow)}`);
//updateServerRules(); //updateServerRules();
return true; return true;
} }
@@ -452,8 +463,8 @@ function toggleServerLogoCommand(command, params, client) {
updatePlayerShowLogoState(null, getServerConfig().useLogo); updatePlayerShowLogoState(null, getServerConfig().useLogo);
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned the server logo image ${getBoolRedGreenInlineColour(doesServerHaveServerLogoEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().useLogo))}`); //announceAdminAction(`${getPlayerName(client)}{MAINCOLOUR}${getBoolRedGreenInlineColour(doesServerHaveServerLogoEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().useLogo))}`);
updateServerRules(); updateServerRules();
return true; return true;
} }
@@ -472,7 +483,7 @@ function toggleServerLogoCommand(command, params, client) {
getServerConfig().createJobBlips = !getServerConfig().createJobBlips; getServerConfig().createJobBlips = !getServerConfig().createJobBlips;
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveJobBlipsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createJobBlips))} {MAINCOLOUR}all job blips`); announceAdminAction("ServerJobBlipsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createJobBlips)}${toUpperCase(getOnOffFromBool(getServerConfig().createJobBlips))}{MAINCOLOUR}`);
resetAllJobBlips(); resetAllJobBlips();
return true; return true;
} }
@@ -492,7 +503,7 @@ function toggleServerLogoCommand(command, params, client) {
getServerConfig().createJobPickups = !getServerConfig().createJobPickups; getServerConfig().createJobPickups = !getServerConfig().createJobPickups;
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveJobPickupsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createJobPickups))} {MAINCOLOUR}all job pickups`); announceAdminAction("ServerJobPickupsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createJobPickups)}${toUpperCase(getOnOffFromBool(getServerConfig().createJobPickups))}{MAINCOLOUR}`);
resetAllJobPickups(); resetAllJobPickups();
return true; return true;
} }
@@ -512,7 +523,7 @@ function toggleServerLogoCommand(command, params, client) {
getServerConfig().createBusinessBlips = !getServerConfig().createBusinessBlips; getServerConfig().createBusinessBlips = !getServerConfig().createBusinessBlips;
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveBusinessBlipsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessBlips))} {MAINCOLOUR}all business blips`); announceAdminAction("ServerBusinessBlipsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createBusinessBlips)}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessBlips))}{MAINCOLOUR}`);
resetAllBusinessBlips(); resetAllBusinessBlips();
return true; return true;
} }
@@ -532,7 +543,7 @@ function toggleServerLogoCommand(command, params, client) {
getServerConfig().createBusinessPickups = !getServerConfig().createBusinessPickups; getServerConfig().createBusinessPickups = !getServerConfig().createBusinessPickups;
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveBusinessPickupsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessPickups))} {MAINCOLOUR}all business pickups`); announceAdminAction("ServerBusinessPickupsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createBusinessPickups)}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessPickups))}{MAINCOLOUR}`);
resetAllBusinessPickups(); resetAllBusinessPickups();
return true; return true;
} }
@@ -552,7 +563,7 @@ function toggleServerLogoCommand(command, params, client) {
getServerConfig().createHouseBlips = !getServerConfig().createHouseBlips; getServerConfig().createHouseBlips = !getServerConfig().createHouseBlips;
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveHouseBlipsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createHouseBlips))} {MAINCOLOUR}all house blips`); announceAdminAction("ServerHouseBlipsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createHouseBlips)}${toUpperCase(getOnOffFromBool(getServerConfig().createHouseBlips))}{MAINCOLOUR}`);
resetAllHouseBlips(); resetAllHouseBlips();
return true; return true;
} }
@@ -572,7 +583,7 @@ function toggleServerLogoCommand(command, params, client) {
getServerConfig().createHousePickups = !getServerConfig().createHousePickups; getServerConfig().createHousePickups = !getServerConfig().createHousePickups;
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned ${getBoolRedGreenInlineColour(doesServerHaveHousePickupsEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().createHousePickups))} {MAINCOLOUR}all house pickups`); announceAdminAction("ServerHousePickupsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createHousePickups)}${toUpperCase(getOnOffFromBool(getServerConfig().createHousePickups))}{MAINCOLOUR}`);
resetAllHousePickups(); resetAllHousePickups();
return true; return true;
} }
@@ -593,8 +604,8 @@ function toggleServerGUICommand(command, params, client) {
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned GUI ${toLowerCase(getOnOffFromBool(doesServerHaveGUIEnabled()))} for this server`); announceAdminAction(`${getPlayerName(client)}{MAINCOLOUR} turned GUI ${toLowerCase(getOnOffFromBool(getServerConfig().useGUI))} for this server`);
updateServerRules(); updateServerRules();
return true; return true;
} }
@@ -614,9 +625,9 @@ function toggleServerUseRealWorldTimeCommand(command, params, client) {
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned real-world time ${getServerConfig().useRealTime} for this server (GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)})`); //announceAdminAction(`${getPlayerName(client)}{MAINCOLOUR} turned real-world time ${getServerConfig().useRealTime} for this server (GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)})`);
updateServerGameTime(); updateServerGameTime();
updateServerRules(); updateServerRules();
return true; return true;
} }
@@ -637,12 +648,12 @@ function setServerRealWorldTimeZoneCommand(command, params, client) {
return false; return false;
} }
getServerConfig().realTimeZone = toInteger(params); getServerConfig().realTimeZone = toInteger(params);
getServerConfig().needsSaved = true; getServerConfig().needsSaved = true;
messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}set the time zone for in-game's real-world time to GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)}`); //announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}set the time zone for in-game's real-world time to GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)}`);
updateServerGameTime(); updateServerGameTime();
updateServerRules(); updateServerRules();
return true; return true;
} }
@@ -662,7 +673,7 @@ function reloadServerConfigurationCommand(command, params, client) {
applyConfigToServer(serverConfig); applyConfigToServer(serverConfig);
updateServerRules(); updateServerRules();
messagePlayerSuccess(client, `You reloaded the server configuration!`); messagePlayerSuccess(client, `You reloaded the server configuration!`);
return true; return true;
} }
@@ -679,7 +690,7 @@ function reloadServerConfigurationCommand(command, params, client) {
*/ */
function reloadEmailConfigurationCommand(command, params, client) { function reloadEmailConfigurationCommand(command, params, client) {
emailConfig = loadEmailConfiguration(); emailConfig = loadEmailConfiguration();
messagePlayerSuccess(client, `You reloaded the email configuration!`); messagePlayerSuccess(client, `You reloaded the email configuration!`);
return true; return true;
} }
@@ -746,6 +757,15 @@ function loadAccentConfig() {
// =========================================================================== // ===========================================================================
function loadDiscordConfig() {
let discordConfig = JSON.parse(loadTextFile(`config/discord.json`));
if(discordConfig != null) {
return discordConfig;
}
}
// ===========================================================================
function doesServerHaveGUIEnabled() { function doesServerHaveGUIEnabled() {
return getServerConfig().useGUI; return getServerConfig().useGUI;
} }
@@ -782,7 +802,7 @@ function doesServerHaveJobPickupsEnabled() {
// =========================================================================== // ===========================================================================
function doesServerHaveBusinesBlipsEnabled() { function doesServerHaveBusinessBlipsEnabled() {
return getServerConfig().createBusinessBlips; return getServerConfig().createBusinessBlips;
} }

View File

@@ -11,6 +11,7 @@
const VRR_PROMPT_NONE = 0; const VRR_PROMPT_NONE = 0;
const VRR_PROMPT_CREATEFIRSTCHAR = 1; const VRR_PROMPT_CREATEFIRSTCHAR = 1;
const VRR_PROMPT_BIZORDER = 2; const VRR_PROMPT_BIZORDER = 2;
const VRR_PROMPT_GIVEVEHTOCLAN = 3;
// Job Types // Job Types
const VRR_JOB_NONE = 0; const VRR_JOB_NONE = 0;
@@ -347,3 +348,8 @@ const VRR_GPS_TYPE_POLICE = 2; // Police Station
const VRR_GPS_TYPE_HOSPITAL = 3; // Hospital const VRR_GPS_TYPE_HOSPITAL = 3; // Hospital
const VRR_GPS_TYPE_JOB = 4; // Job const VRR_GPS_TYPE_JOB = 4; // Job
const VRR_GPS_TYPE_GAMELOC = 5; // Game Location const VRR_GPS_TYPE_GAMELOC = 5; // Game Location
// Discord Webhook Types
const VRR_DISCORD_WEBHOOK_NONE = 0;
const VRR_DISCORD_WEBHOOK_LOG = 1;
const VRR_DISCORD_WEBHOOK_ADMIN = 2;

View File

@@ -9,7 +9,7 @@
let scriptVersion = "1.0"; let scriptVersion = "1.0";
let serverStartTime = 0; let serverStartTime = 0;
let logLevel = LOG_INFO; let logLevel = LOG_INFO|LOG_DEBUG|LOG_VERBOSE|LOG_WARN|LOG_ERROR;
// =========================================================================== // ===========================================================================
@@ -31,6 +31,10 @@ let serverData = {
localeStrings: {}, localeStrings: {},
cachedTranslations: [], cachedTranslations: [],
cachedTranslationFrom: [], cachedTranslationFrom: [],
triggers: [],
npcs: [],
locales: [],
accents: [],
}; };
// =========================================================================== // ===========================================================================

View File

@@ -20,4 +20,3 @@ function initDatabaseScript() {
} }
// =========================================================================== // ===========================================================================

View File

@@ -152,7 +152,7 @@ function addLogLevelCommand(command, params, client) {
sendPlayerLogLevel(null, logLevel); sendPlayerLogLevel(null, logLevel);
messageAdminAction(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}enabled log level {ALTCOLOUR}${toLowerCase(params)}`); messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}enabled log level {ALTCOLOUR}${toLowerCase(params)}`);
return true; return true;
} }
@@ -222,7 +222,7 @@ function removeLogLevelCommand(command, params, client) {
sendPlayerLogLevel(null, logLevel); sendPlayerLogLevel(null, logLevel);
messageAdminAction(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}disabled log level {ALTCOLOUR}${toLowerCase(params)}`); messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}disabled log level {ALTCOLOUR}${toLowerCase(params)}`);
return true; return true;
} }
@@ -380,15 +380,72 @@ function setPlayerTesterStatusCommand(command, params, client) {
let enabled = hasBitFlag(getPlayerData(targetClient).accountData.flags.moderation, getModerationFlagValue("IsTester")); let enabled = hasBitFlag(getPlayerData(targetClient).accountData.flags.moderation, getModerationFlagValue("IsTester"));
messageAdminAction(`{ALTCOLOUR}${client.name} ${getBoolRedGreenInlineColour(enabled)}${toUpperCase(getEnabledDisabledFromBool(enabled))} {ALTCOLOUR}${targetClient.name}'s {MAINCOLOUR}tester status`) messageAdmins(`{ALTCOLOUR}${client.name} ${getBoolRedGreenInlineColour(enabled)}${toUpperCase(getEnabledDisabledFromBool(enabled))} {ALTCOLOUR}${targetClient.name}'s {MAINCOLOUR}tester status`)
return true; return true;
} }
// =========================================================================== // ===========================================================================
function saveAllServerDataCommand(command, params, client) { function testPromptGUICommand(command, params, client) {
if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command));
return false;
}
let targetClient = getPlayerFromParams(params);
if(!targetClient) {
messagePlayerError(client, getLocaleString(client, "InvalidPlayer"));
return false;
}
showPlayerPromptGUI(targetClient, "Testing the two button prompt GUI", "Testing", "Yes", "No")
return true;
}
// ===========================================================================
function testInfoGUICommand(command, params, client) {
if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command));
return false;
}
let targetClient = getPlayerFromParams(params);
if(!targetClient) {
messagePlayerError(client, getLocaleString(client, "InvalidPlayer"));
return false;
}
showPlayerInfoGUI(targetClient, "Testing the info dialog GUI", "Testing", "Ok");
return true;
}
// ===========================================================================
function testErrorGUICommand(command, params, client) {
if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command));
return false;
}
let targetClient = getPlayerFromParams(params);
if(!targetClient) {
messagePlayerError(client, getLocaleString(client, "InvalidPlayer"));
return false;
}
showPlayerErrorGUI(targetClient, "Testing the error dialog GUI", "Testing", "Ok");
return true;
}
// ===========================================================================
function saveServerDataCommand(command, params, client) {
messageAdmins(`{clanOrange}Vortrex has forced a manual save of all data. Initiating ...`); messageAdmins(`{clanOrange}Vortrex has forced a manual save of all data. Initiating ...`);
saveAllServerDataToDatabase(); saveServerDataToDatabase();
messageAdmins(`{clanOrange}All server data saved to database successfully!`); messageAdmins(`{clanOrange}All server data saved to database successfully!`);
return true; return true;
} }
@@ -572,9 +629,9 @@ function streamAudioNameToAllPlayersCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function fixAllServerBlipsCommand(command, params, client) { function fixAllServerBlipsCommand(command, params, client) {
deleteAllBusinessBlips(); deleteAllBusinessBlips();
deleteAllJobBlips(); deleteAllJobBlips();
deleteAllHouseBlips(); deleteAllHouseBlips();
let blips = getElementsByType(ELEMENT_BLIP); let blips = getElementsByType(ELEMENT_BLIP);
blips.forEach((blip) => { blips.forEach((blip) => {

View File

@@ -16,31 +16,31 @@ function initDiscordScript() {
/* /*
addEventHandler("OnDiscordCommand", function(command, params, discordUser) { addEventHandler("OnDiscordCommand", function(command, params, discordUser) {
let commandData = getCommand(command); let commandData = getCommand(command);
if(!commandData) { if(!commandData) {
messagePlayerError(discordUser, "That command does not exist!"); messagePlayerError(discordUser, "That command does not exist!");
return false; return false;
} }
if(isCommandAllowedOnDiscord(command)) { if(isCommandAllowedOnDiscord(command)) {
messagePlayerError(discordUser, "That command can not be used on Discord!"); messagePlayerError(discordUser, "That command can not be used on Discord!");
return false; return false;
} }
if(doesClientHavePermission(discordUser, getCommandRequiredPermissions(command))) { if(doesClientHavePermission(discordUser, getCommandRequiredPermissions(command))) {
messagePlayerError(discordUser, "You do not have permission to use that command!"); messagePlayerError(discordUser, "You do not have permission to use that command!");
return false; return false;
} }
commandData.handlerFunction(command, params, discordUser); commandData.handlerFunction(command, params, discordUser);
}); });
*/ */
// =========================================================================== // ===========================================================================
function messageDiscordUser(discordUser, messageText) { function messageDiscordUser(discordUser, messageText) {
let socketData = JSON.stringify({ let socketData = JSON.stringify({
type: "chat.message.text", type: "chat.message.text",
payload: { payload: {
author: discordUser.name, author: discordUser.name,
@@ -53,88 +53,82 @@ function messageDiscordUser(discordUser, messageText) {
// =========================================================================== // ===========================================================================
function sendDiscordSocketData(socketData) { function sendDiscordSocketData(socketData) {
if(!getDiscordSocket()) { if(!getDiscordSocket()) {
return false; return false;
} }
getDiscordSocket().send(module.hash.encodeBase64(socketData) + "\r\n"); getDiscordSocket().send(module.hash.encodeBase64(socketData) + "\r\n");
} }
// =========================================================================== // ===========================================================================
function isClientFromDiscord(client) { function isClientFromDiscord(client) {
if(client == null) { if(client == null) {
return false; return false;
} }
if(client instanceof Client) { if(client instanceof Client) {
return false; return false;
} else { } else {
return true; return true;
} }
} }
// =========================================================================== // ===========================================================================
function getDiscordSocket() { function getDiscordSocket() {
return false; return false;
} }
// =========================================================================== // ===========================================================================
function getDiscordUserData(discordUserId) { function getDiscordUserData(discordUserId) {
return loadAccountFromDiscordUserId(discordUserId); return loadAccountFromDiscordUserId(discordUserId);
} }
// =========================================================================== // ===========================================================================
function messageDiscordChatChannel(message) { function messageDiscordChatChannel(messageString) {
if(!getServerConfig().discordConfig.sendChat) { if(getServerConfig().devServer) {
return false; return false;
} }
message = removeColoursInMessage(message); if(!getServerConfig().discord.sendChat) {
console.warn(message); return false;
let payloadData = { }
"username": "Chat",
"content": message,
};
triggerWebHook(getServerConfig().discordConfig.chatChannelWebHookURL, JSON.stringify(payloadData)); messageString = removeColoursInMessage(messageString);
triggerWebHook(messageString, getServerId(), VRR_DISCORD_WEBHOOK_LOG);
} }
// =========================================================================== // ===========================================================================
function messageDiscordAdminChannel(message) { function messageDiscordEventChannel(messageString) {
if(!getServerConfig().discordConfig.sendAdminEvents) { if(getServerConfig().devServer == true) {
return false; return false;
} }
message = removeColoursInMessage(message); if(!getServerConfig().discord.sendEvents) {
console.warn(message); return false;
let payloadData = { }
"username": "Admin Event",
"content": message,
};
triggerWebHook(getServerConfig().discordConfig.adminChannelWebHookURL, JSON.stringify(payloadData)); messageString = removeColoursInMessage(messageString);
triggerWebHook(messageString, getServerId(), VRR_DISCORD_WEBHOOK_LOG);
} }
// =========================================================================== // ===========================================================================
function messageDiscordEventChannel(message) { function messageDiscordAdminChannel(messageString) {
if(!getServerConfig().discordConfig.sendEvents) { if(getServerConfig().devServer == true) {
return false; return false;
} }
message = removeColoursInMessage(message); if(!getServerConfig().discord.sendAdmin) {
console.warn(message); return false;
let payloadData = { }
"username": "Event",
"content": message,
};
triggerWebHook(getServerConfig().discordConfig.eventChannelWebHookURL, JSON.stringify(payloadData)); messageString = removeColoursInMessage(messageString);
triggerWebHook(messageString, getServerId(), VRR_DISCORD_WEBHOOK_ADMIN);
} }
// =========================================================================== // ===========================================================================

View File

@@ -30,12 +30,17 @@ function playerPayDay(client) {
let wealth = calculateWealth(client); let wealth = calculateWealth(client);
let grossIncome = getPlayerData(client).payDayAmount; let grossIncome = getPlayerData(client).payDayAmount;
// Passive income // Passive income
grossIncome = grossIncome + getGlobalConfig().economy.passiveIncomePerPayDay; grossIncome = grossIncome + getGlobalConfig().economy.passiveIncomePerPayDay;
// Payday bonus // Payday bonus
grossIncome = grossIncome*getGlobalConfig().economy.grossIncomeMultiplier; grossIncome = grossIncome*getGlobalConfig().economy.grossIncomeMultiplier;
// Double bonus
if(isDoubleBonusActive()) {
grossIncome = grossIncome*2;
}
let incomeTaxAmount = calculateIncomeTax(wealth); let incomeTaxAmount = calculateIncomeTax(wealth);
let netIncome = grossIncome-incomeTaxAmount; let netIncome = grossIncome-incomeTaxAmount;
@@ -49,11 +54,11 @@ function playerPayDay(client) {
let canPayNow = totalCash+netIncome; let canPayNow = totalCash+netIncome;
if(incomeTaxAmount <= canPayNow) { if(incomeTaxAmount <= canPayNow) {
takePlayerCash(client, canPayNow); takePlayerCash(client, canPayNow);
messagePlayerInfo(client, `You covered the remaining taxes with {ALTCOLOUR}$${canPayNow} {MAINCOLOUR}in cash.`); messagePlayerInfo(client, `{orange}${getLocaleString(client, "RemainingTaxPaidInCash", `{ALTCOLOUR}${canPayNow}{MAINCOLOUR}`)}`);
messagePlayerAlert(client, `{orange}You lost money since your taxes are more than your paycheck!`); messagePlayerAlert(client, `{orange}${getLocaleString(client, "LostMoneyFromTaxes")}`);
messagePlayerAlert(client, `{orange}If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!`); messagePlayerAlert(client, `{orange}${getLocaleString(client, "NextPaycheckRepossessionWarning")}`);
} else { } else {
messagePlayerInfo(client, `{orange}You don't have enough cash to pay your taxes!`); messagePlayerInfo(client, `{orange}${getLocaleString(client, "NotEnoughCashForTax")}`);
takePlayerCash(client, canPayNow); takePlayerCash(client, canPayNow);
let vehicleCount = getAllVehiclesOwnedByPlayer(client).length; let vehicleCount = getAllVehiclesOwnedByPlayer(client).length;
@@ -65,7 +70,7 @@ function playerPayDay(client) {
let newVehicleCount = getAllVehiclesOwnedByPlayer(client).length; let newVehicleCount = getAllVehiclesOwnedByPlayer(client).length;
let newHouseCount = getAllHousesOwnedByPlayer(client).length; let newHouseCount = getAllHousesOwnedByPlayer(client).length;
let newBusinessCount = getAllBusinessesOwnedByPlayer(client).length; let newBusinessCount = getAllBusinessesOwnedByPlayer(client).length;
messagePlayerInfo(client, `{orange}You lost ${newVehicleCount-vehicleCount} vehicles, ${newHouseCount-houseCount} houses, and ${newBusinessCount-businessCount} businesses to cover the remaining tax.`); messagePlayerInfo(client, `{orange}${getLocaleString(client, "AssetsRepossessedForTaxes", newVehicleCount-vehicleCount, newHouseCount-houseCount, newBusinessCount-businessCount)}`);
} }
} }
@@ -120,14 +125,14 @@ function setPayDayBonusMultiplier(command, params, client) {
let newMultiplier = params; let newMultiplier = params;
if(isNaN(newMultiplier)) { if(isNaN(newMultiplier)) {
messagePlayerError(client, getLocaleString(client, "AmountNotNumber")); messagePlayerError(client, getLocaleString(client, "AmountNotNumber"));
return false; return false;
} }
getGlobalConfig().economy.grossIncomeMultiplier = newMultiplier; getGlobalConfig().economy.grossIncomeMultiplier = newMultiplier;
messageAdminAction(`${client.name} set payday bonus to ${newMultiplier*100}%`); announceAdminAction(`PaydayBonusSet`, `{adminRed}${client.name}{MAINCOLOUR}`, `{ALTCOLOUR}${newMultiplier*100}%{MAINCOLOUR}`);
} }
// =========================================================================== // ===========================================================================
@@ -157,6 +162,8 @@ function attemptRepossession(client, totalToPay) {
return true; return true;
} }
// ===========================================================================
function repossessFirstAsset(client) { function repossessFirstAsset(client) {
let vehicles = getAllVehiclesOwnedByPlayer(client); let vehicles = getAllVehiclesOwnedByPlayer(client);
if(vehicles.length > 0) { if(vehicles.length > 0) {
@@ -194,3 +201,15 @@ function getAllBusinessesOwnedByPlayer(client) {
function getAllHousesOwnedByPlayer(client) { function getAllHousesOwnedByPlayer(client) {
return getServerData().houses.filter((h) => h.ownerType == VRR_HOUSEOWNER_PLAYER && h.ownerId == getPlayerCurrentSubAccount(client).databaseId); return getServerData().houses.filter((h) => h.ownerType == VRR_HOUSEOWNER_PLAYER && h.ownerId == getPlayerCurrentSubAccount(client).databaseId);
} }
// ===========================================================================
function isDoubleBonusActive() {
if(isWeekend()) {
return true;
}
return false;
}
// ===========================================================================

View File

@@ -8,47 +8,47 @@
// =========================================================================== // ===========================================================================
function initEmailScript() { function initEmailScript() {
if(!checkForSMTPModule()) { if(!checkForSMTPModule()) {
return false; return false;
} }
logToConsole(LOG_INFO, "[VRR.Email]: Initializing email script ..."); logToConsole(LOG_INFO, "[VRR.Email]: Initializing email script ...");
emailConfig = loadEmailConfiguration(); emailConfig = loadEmailConfiguration();
logToConsole(LOG_INFO, "[VRR.Email]: Email script initialized successfully!"); logToConsole(LOG_INFO, "[VRR.Email]: Email script initialized successfully!");
} }
// =========================================================================== // ===========================================================================
function sendEmail(toEmail, toName, subject, body) { function sendEmail(toEmail, toName, subject, body) {
if(!checkForSMTPModule()) { if(!checkForSMTPModule()) {
return false; return false;
} }
module.smtp.send( module.smtp.send(
getEmailConfig().smtp.host, getEmailConfig().smtp.host,
getEmailConfig().smtp.port, getEmailConfig().smtp.port,
intToBool(getEmailConfig().smtp.useTLS), intToBool(getEmailConfig().smtp.useTLS),
getEmailConfig().smtp.username, getEmailConfig().smtp.username,
getEmailConfig().smtp.password, getEmailConfig().smtp.password,
toEmail, toEmail,
toName, toName,
subject, subject,
body, body,
getEmailConfig().smtp.from, getEmailConfig().smtp.from,
getEmailConfig().smtp.fromName); getEmailConfig().smtp.fromName);
} }
// =========================================================================== // ===========================================================================
function loadEmailConfiguration() { function loadEmailConfiguration() {
let emailConfigFile = loadTextFile("config/email.json"); let emailConfigFile = loadTextFile("config/email.json");
return JSON.parse(emailConfigFile); return JSON.parse(emailConfigFile);
} }
// =========================================================================== // ===========================================================================
function getEmailConfig() { function getEmailConfig() {
return emailConfig; return emailConfig;
} }
// =========================================================================== // ===========================================================================

View File

@@ -8,59 +8,60 @@
// =========================================================================== // ===========================================================================
function initEventScript() { function initEventScript() {
logToConsole(LOG_INFO, "[VRR.Event]: Initializing event script ..."); logToConsole(LOG_INFO, "[VRR.Event]: Initializing event script ...");
addAllEventHandlers(); addAllEventHandlers();
logToConsole(LOG_INFO, "[VRR.Event]: Event script initialized!"); logToConsole(LOG_INFO, "[VRR.Event]: Event script initialized!");
} }
// =========================================================================== // ===========================================================================
function addAllEventHandlers() { function addAllEventHandlers() {
addEventHandler("onResourceStart", onResourceStart); addEventHandler("onResourceStart", onResourceStart);
addEventHandler("onResourceStop", onResourceStop); addEventHandler("onResourceStop", onResourceStop);
addEventHandler("onServerStop", onResourceStop); addEventHandler("onServerStop", onResourceStop);
addEventHandler("onProcess", onProcess); addEventHandler("onProcess", onProcess);
addEventHandler("onEntityProcess", onEntityProcess); addEventHandler("onEntityProcess", onEntityProcess);
addEventHandler("onPlayerConnect", onPlayerConnect); addEventHandler("onPlayerConnect", onPlayerConnect);
addEventHandler("onPlayerJoin", onPlayerJoin); addEventHandler("onPlayerJoin", onPlayerJoin);
addEventHandler("onPlayerJoined", onPlayerJoined); addEventHandler("onPlayerJoined", onPlayerJoined);
addEventHandler("onPlayerChat", onPlayerChat); addEventHandler("onPlayerChat", onPlayerChat);
addEventHandler("onPlayerQuit", onPlayerQuit); addEventHandler("onPlayerQuit", onPlayerQuit);
addEventHandler("onElementStreamIn", onElementStreamIn); addEventHandler("onElementStreamIn", onElementStreamIn);
addEventHandler("onElementStreamOut", onElementStreamOut); addEventHandler("onElementStreamOut", onElementStreamOut);
addEventHandler("onPedSpawn", onPedSpawn); addEventHandler("onPedSpawn", onPedSpawn);
addEventHandler("onPedEnterVehicle", onPedEnteringVehicle); addEventHandler("onPedEnterVehicle", onPedEnteringVehicle);
addEventHandler("onPedExitVehicle", onPedExitingVehicle); addEventHandler("onPedExitVehicle", onPedExitingVehicle);
addEventHandler("onPedEnteringVehicle", onPedEnteringVehicle); addEventHandler("onPedEnteringVehicle", onPedEnteringVehicle);
addEventHandler("onPedExitingVehicle", onPedExitingVehicle); addEventHandler("onPedExitingVehicle", onPedExitingVehicle);
addEventHandler("OnPlayerCommand", onPlayerCommand); //addEventHandler("OnPlayerCommand", onPlayerCommand);
} }
// =========================================================================== // ===========================================================================
function onPlayerConnect(event, ipAddress, port) { function onPlayerConnect(event, ipAddress, port) {
logToConsole(LOG_INFO, `[VRR.Event] Client connecting (IP: ${ipAddress})`); logToConsole(LOG_INFO, `[VRR.Event] Client connecting (IP: ${ipAddress})`);
//if(isIpAddressBanned(ipAddress)) { //if(isIpAddressBanned(ipAddress)) {
// messagePlayerError(client, "You are banned from this server!"); // messagePlayerError(client, "You are banned from this server!");
// return false; // return false;
//} //}
} }
// =========================================================================== // ===========================================================================
function onPlayerJoin(event, client) { function onPlayerJoin(event, client) {
logToConsole(LOG_INFO, `[VRR.Event] Client ${client.name}[${client.index}] joining from ${client.ip}`); logToConsole(LOG_INFO, `[VRR.Event] Client ${client.name}[${client.index}] joining from ${client.ip}`);
if(isFadeCameraSupported()) { if(isFadeCameraSupported()) {
fadeCamera(client, true, 1.0); fadeCamera(client, true, 1.0);
} }
messageDiscordEventChannel(`👋 ${getPlayerDisplayForConsole(client)} has joined the server.`); messageDiscordEventChannel(`👋 ${client.name} is connecting to the server ...`);
//messageDiscordEventChannel(`👋 ${getPlayerDisplayForConsole(client)} has joined the server.`);
} }
// =========================================================================== // ===========================================================================
@@ -72,16 +73,16 @@ function onPlayerJoined(event, client) {
// =========================================================================== // ===========================================================================
function onElementStreamIn(event, element, client) { function onElementStreamIn(event, element, client) {
//if(getPlayerDimension(client) != getElementDimension(element)) { //if(getPlayerDimension(client) != getElementDimension(element)) {
// event.preventDefault(); // event.preventDefault();
//} //}
if(getPlayerData(getClientFromIndex(element.owner)) != false ) { if(getPlayerData(getClientFromIndex(element.owner)) != false ) {
if(hasBitFlag(getPlayerData(getClientFromIndex(element.owner)).accountData.flags.moderation, getModerationFlagValue("DontSyncClientElements"))) { if(hasBitFlag(getPlayerData(getClientFromIndex(element.owner)).accountData.flags.moderation, getModerationFlagValue("DontSyncClientElements"))) {
event.preventDefault(); event.preventDefault();
destroyGameElement(element); destroyGameElement(element);
} }
} }
} }
// =========================================================================== // ===========================================================================
@@ -93,39 +94,44 @@ function onElementStreamOut(event, element, client) {
// =========================================================================== // ===========================================================================
function onPlayerQuit(event, client, quitReasonId) { function onPlayerQuit(event, client, quitReasonId) {
logToConsole(LOG_INFO, `👋 Client ${getPlayerDisplayForConsole(client)} disconnected (${disconnectReasons[quitReasonId]}[${quitReasonId}])`); logToConsole(LOG_INFO, `👋 Client ${getPlayerDisplayForConsole(client)} disconnected (${disconnectReasons[quitReasonId]}[${quitReasonId}])`);
updateConnectionLogOnQuit(client, quitReasonId); updateConnectionLogOnQuit(client, quitReasonId);
if(isPlayerLoggedIn(client)) { if(isPlayerLoggedIn(client)) {
messagePlayerNormal(null, `👋 ${getPlayerName(client)} has left the server (${disconnectReasons[quitReasonId]})`, getColourByName("softYellow")); let reasonText = disconnectReasons[quitReasonId];
savePlayerToDatabase(client); if(getPlayerData(client).customDisconnectReason != "") {
resetClientStuff(client); reasonText = getPlayerData(client).customDisconnectReason;
getServerData().clients[client.index] = null; }
} messagePlayerNormal(null, `👋 ${getPlayerName(client)} has left the server (${reasonText})`, getColourByName("softYellow"));
messageDiscordEventChannel(`👋 ${client.name} has left the server (${reasonText})`);
messageDiscordEventChannel(`👋 ${getPlayerDisplayForConsole(client)} has left the server.`); savePlayerToDatabase(client);
resetClientStuff(client);
getServerData().clients[client.index] = null;
} else {
messageDiscordEventChannel(`👋 ${client.name} has left the server (${disconnectReasons[quitReasonId]}[${quitReasonId}])`);
}
clearTemporaryVehicles(); clearTemporaryVehicles();
clearTemporaryPeds(); clearTemporaryPeds();
} }
// =========================================================================== // ===========================================================================
async function onPlayerChat(event, client, messageText) { async function onPlayerChat(event, client, messageText) {
event.preventDefault(); processPlayerChat(client, messageText);
event.preventDefault();
processPlayerChat(client, messageText);
} }
// =========================================================================== // ===========================================================================
function onProcess(event, deltaTime) { function onProcess(event, deltaTime) {
updateServerGameTime(); updateServerGameTime();
//checkPlayerSpawning(); //checkPlayerSpawning();
//checkPlayerPedState(); //checkPlayerPedState();
//checkVehicleBurning(); //checkVehicleBurning();
processVehiclePurchasing(); processVehiclePurchasing();
} }
// =========================================================================== // ===========================================================================
@@ -136,89 +142,89 @@ function onEntityProcess(event, entity) {
// =========================================================================== // ===========================================================================
function onPedEnteringVehicle(event, ped, vehicle, seat) { function onPedEnteringVehicle(event, ped, vehicle, seat) {
if(ped.isType(ELEMENT_PLAYER)) { if(ped.isType(ELEMENT_PLAYER)) {
let client = getClientFromPlayerElement(ped); let client = getClientFromPlayerElement(ped);
getPlayerData(client).pedState = VRR_PEDSTATE_ENTERINGVEHICLE; getPlayerData(client).pedState = VRR_PEDSTATE_ENTERINGVEHICLE;
if(!getVehicleData(vehicle)) { if(!getVehicleData(vehicle)) {
return false; return false;
} }
if(getVehicleData(vehicle).locked) { if(getVehicleData(vehicle).locked) {
if(doesPlayerHaveVehicleKeys(client, vehicle)) { if(doesPlayerHaveVehicleKeys(client, vehicle)) {
if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "lock")) { if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "lock")) {
messagePlayerTip(client, `🔒 This ${getVehicleName(vehicle)} is locked. Press {ALTCOLOUR}${toUpperCase(getKeyNameFromId(getPlayerKeyBindForCommand(client, "lock").key))} {MAINCOLOUR}to unlock it.`); messagePlayerTip(client, `🔒 This ${getVehicleName(vehicle)} is locked. Press {ALTCOLOUR}${toUpperCase(getKeyNameFromId(getPlayerKeyBindForCommand(client, "lock").key))} {MAINCOLOUR}to unlock it.`);
} else { } else {
messagePlayerNormal(client, `🔒 This ${getVehicleName(vehicle)} is locked. Use /lock to unlock it`); messagePlayerNormal(client, `🔒 This ${getVehicleName(vehicle)} is locked. Use /lock to unlock it`);
} }
} else { } else {
messagePlayerNormal(client, `🔒 This ${getVehicleName(vehicle)} is locked and you don't have the keys to unlock it`); messagePlayerNormal(client, `🔒 This ${getVehicleName(vehicle)} is locked and you don't have the keys to unlock it`);
} }
getPlayerData(client).enteringVehicle = null; getPlayerData(client).enteringVehicle = null;
makePlayerStopAnimation(client); makePlayerStopAnimation(client);
return false; return false;
} }
getPlayerData(client).enteringVehicle = vehicle; getPlayerData(client).enteringVehicle = vehicle;
} }
} }
// =========================================================================== // ===========================================================================
function onPedExitingVehicle(event, ped, vehicle) { function onPedExitingVehicle(event, ped, vehicle) {
if(!getVehicleData(vehicle)) { if(!getVehicleData(vehicle)) {
return false; return false;
} }
if(ped.isType(ELEMENT_PLAYER)) { if(ped.isType(ELEMENT_PLAYER)) {
let client = getClientFromPlayerElement(ped); let client = getClientFromPlayerElement(ped);
getPlayerData(client).pedState = VRR_PEDSTATE_EXITINGVEHICLE; getPlayerData(client).pedState = VRR_PEDSTATE_EXITINGVEHICLE;
} }
if(!getVehicleData(vehicle).spawnLocked) { if(!getVehicleData(vehicle).spawnLocked) {
getVehicleData(vehicle).spawnPosition = getVehiclePosition(vehicle); getVehicleData(vehicle).spawnPosition = getVehiclePosition(vehicle);
getVehicleData(vehicle).spawnRotation = getVehicleHeading(vehicle); getVehicleData(vehicle).spawnRotation = getVehicleHeading(vehicle);
getVehicleData(vehicle).needsSaved = true; getVehicleData(vehicle).needsSaved = true;
} }
} }
// =========================================================================== // ===========================================================================
function onResourceStart(event, resource) { function onResourceStart(event, resource) {
logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} started!`); logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} started!`);
if(resource != thisResource) { if(resource != thisResource) {
messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name} {MAINCOLOUR}started!`); messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name} {MAINCOLOUR}started!`);
} }
} }
// =========================================================================== // ===========================================================================
function onResourceStop(event, resource) { function onResourceStop(event, resource) {
logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} stopped!`); logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} stopped!`);
if(resource != thisResource) { if(resource != thisResource) {
messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name} {MAINCOLOUR}stopped!`); messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name} {MAINCOLOUR}stopped!`);
} }
if(resource == thisResource) { if(resource == thisResource) {
saveAllServerDataToDatabase(); saveServerDataToDatabase();
clearArray(getServerData().vehicles); clearArray(getServerData().vehicles);
clearArray(getServerData().clients); clearArray(getServerData().clients);
clearArray(getServerData().businesses); clearArray(getServerData().businesses);
clearArray(getServerData().houses); clearArray(getServerData().houses);
clearArray(getServerData().factions); clearArray(getServerData().factions);
clearArray(getServerData().jobs); clearArray(getServerData().jobs);
clearArray(getServerData().clans); clearArray(getServerData().clans);
clearArray(getServerData().items); clearArray(getServerData().items);
clearArray(getServerData().itemTypes); clearArray(getServerData().itemTypes);
clearArray(getServerData().groundItemCache); clearArray(getServerData().groundItemCache);
clearArray(getServerData().groundPlantCache); clearArray(getServerData().groundPlantCache);
kickAllClients(); kickAllClients();
} }
collectAllGarbage(); collectAllGarbage();
} }
// =========================================================================== // ===========================================================================
@@ -236,183 +242,202 @@ function onPlayerExitedSphere(client, sphere) {
// =========================================================================== // ===========================================================================
async function onPlayerEnteredVehicle(client, clientVehicle, seat) { async function onPlayerEnteredVehicle(client, clientVehicle, seat) {
if(client == null) { if(client == null) {
return false; return false;
} }
let vehicle = null; let vehicle = null;
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
vehicle = getVehicleFromIVNetworkId(clientVehicle); vehicle = getVehicleFromIVNetworkId(clientVehicle);
} else { } else {
if(client.player == null) { if(getPlayerPed(client) == null) {
return false; return false;
} }
await waitUntil(() => client != null && client.player != null && client.player.vehicle != null); await waitUntil(() => client != null && getPlayerPed(client) != null && getPlayerVehicle(client) != null);
vehicle = client.player.vehicle; vehicle = getPlayerVehicle(client);
} }
if(!getVehicleData(vehicle)) { if(!getVehicleData(vehicle)) {
return false; return false;
} }
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} entered a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("vrr.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`); logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} entered a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("vrr.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`);
getPlayerData(client).lastVehicle = vehicle; getPlayerData(client).lastVehicle = vehicle;
getVehicleData(vehicle).lastActiveTime = getCurrentUnixTimestamp(); getVehicleData(vehicle).lastActiveTime = getCurrentUnixTimestamp();
if(getPlayerVehicleSeat(client) == VRR_VEHSEAT_DRIVER) { if(getPlayerVehicleSeat(client) == VRR_VEHSEAT_DRIVER) {
vehicle.engine = getVehicleData(vehicle).engine; vehicle.engine = getVehicleData(vehicle).engine;
if(getVehicleData(vehicle).buyPrice > 0) { if(getVehicleData(vehicle).buyPrice > 0) {
messagePlayerAlert(client, getLocaleString(client, "VehicleForSale", getVehicleName(vehicle), `{ALTCOLOUR}$${makeLargeNumberReadable(getVehicleData(vehicle).buyPrice)}{MAINCOLOUR}`, `{ALTCOLOUR}/vehbuy{MAINCOLOUR}`)); messagePlayerAlert(client, getLocaleString(client, "VehicleForSale", getVehicleName(vehicle), `{ALTCOLOUR}$${makeLargeNumberReadable(getVehicleData(vehicle).buyPrice)}{MAINCOLOUR}`, `{ALTCOLOUR}/vehbuy{MAINCOLOUR}`));
resetVehiclePosition(vehicle); resetVehiclePosition(vehicle);
} else if(getVehicleData(vehicle).rentPrice > 0) { } else if(getVehicleData(vehicle).rentPrice > 0) {
if(getVehicleData(vehicle).rentedBy != client) { if(getVehicleData(vehicle).rentedBy != client) {
messagePlayerAlert(client, getLocaleString(client, "VehicleForRent", getVehicleName(vehicle), `{ALTCOLOUR}$${makeLargeNumberReadable(getVehicleData(vehicle).rentPrice)}{MAINCOLOUR}`, `{ALTCOLOUR}/vehrent{MAINCOLOUR}`)); messagePlayerAlert(client, getLocaleString(client, "VehicleForRent", getVehicleName(vehicle), `{ALTCOLOUR}$${makeLargeNumberReadable(getVehicleData(vehicle).rentPrice)}{MAINCOLOUR}`, `{ALTCOLOUR}/vehrent{MAINCOLOUR}`));
resetVehiclePosition(vehicle); resetVehiclePosition(vehicle);
} else { } else {
messagePlayerAlert(client, `You are renting this ${getVehicleName(vehicle)} for {ALTCOLOUR}$${makeLargeNumberReadable(getVehicleData(vehicle).rentPrice)} per minute. {MAINCOLOUR}Use {ALTCOLOUR}/stoprent {MAINCOLOUR}if you want to stop renting it.`); messagePlayerAlert(client, `You are renting this ${getVehicleName(vehicle)} for {ALTCOLOUR}$${makeLargeNumberReadable(getVehicleData(vehicle).rentPrice)} per minute. {MAINCOLOUR}Use {ALTCOLOUR}/stoprent {MAINCOLOUR}if you want to stop renting it.`);
} }
} else { } else {
let ownerName = "Nobody"; let ownerName = "Nobody";
let ownerType = "None"; let ownerType = "None";
ownerType = toLowerCase(getVehicleOwnerTypeText(getVehicleData(vehicle).ownerType)); ownerType = toLowerCase(getVehicleOwnerTypeText(getVehicleData(vehicle).ownerType));
switch(getVehicleData(vehicle).ownerType) { switch(getVehicleData(vehicle).ownerType) {
case VRR_VEHOWNER_CLAN: case VRR_VEHOWNER_CLAN:
ownerName = getClanData(getClanIdFromDatabaseId(getVehicleData(vehicle).ownerId)).name; ownerName = getClanData(getClanIdFromDatabaseId(getVehicleData(vehicle).ownerId)).name;
ownerType = "clan"; ownerType = "clan";
break; break;
case VRR_VEHOWNER_JOB: case VRR_VEHOWNER_JOB:
ownerName = getJobData(getJobIdFromDatabaseId(getVehicleData(vehicle).ownerId)).name; ownerName = getJobData(getJobIdFromDatabaseId(getVehicleData(vehicle).ownerId)).name;
ownerType = "job"; ownerType = "job";
break; break;
case VRR_VEHOWNER_PLAYER: case VRR_VEHOWNER_PLAYER:
let subAccountData = loadSubAccountFromId(getVehicleData(vehicle).ownerId); let subAccountData = loadSubAccountFromId(getVehicleData(vehicle).ownerId);
ownerName = `${subAccountData.firstName} ${subAccountData.lastName}`; ownerName = `${subAccountData.firstName} ${subAccountData.lastName}`;
ownerType = "player"; ownerType = "player";
break; break;
case VRR_VEHOWNER_BIZ: case VRR_VEHOWNER_BIZ:
ownerName = getBusinessData(getVehicleData(vehicle).ownerId).name; ownerName = getBusinessData(getVehicleData(vehicle).ownerId).name;
ownerType = "business"; ownerType = "business";
break; break;
default: default:
break; break;
} }
messagePlayerAlert(client, `This ${getVehicleName(vehicle)} belongs to {ALTCOLOUR}${ownerName} (${ownerType})`); messagePlayerAlert(client, `This ${getVehicleName(vehicle)} belongs to {ALTCOLOUR}${ownerName} (${ownerType})`);
} }
if(!getVehicleData(vehicle).engine) { if(!getVehicleData(vehicle).engine) {
if(getVehicleData(vehicle).buyPrice == 0 && getVehicleData(vehicle).rentPrice == 0) { if(getVehicleData(vehicle).buyPrice == 0 && getVehicleData(vehicle).rentPrice == 0) {
if(doesPlayerHaveVehicleKeys(client, vehicle)) { if(doesPlayerHaveVehicleKeys(client, vehicle)) {
if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "engine")) { if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "engine")) {
messagePlayerTip(client, `This ${getVehicleName(vehicle)}'s engine is off. Press {ALTCOLOUR}${toUpperCase(getKeyNameFromId(getPlayerKeyBindForCommand(client, "engine").key))} {MAINCOLOUR}to start it.`); messagePlayerTip(client, `This ${getVehicleName(vehicle)}'s engine is off. Press {ALTCOLOUR}${toUpperCase(getKeyNameFromId(getPlayerKeyBindForCommand(client, "engine").key))} {MAINCOLOUR}to start it.`);
} else { } else {
messagePlayerAlert(client, `This ${getVehicleName(vehicle)}'s engine is off. Use /engine to start it`); messagePlayerAlert(client, `This ${getVehicleName(vehicle)}'s engine is off. Use /engine to start it`);
} }
} else { } else {
messagePlayerAlert(client, `This ${getVehicleName(vehicle)}'s engine is off and you don't have the keys to start it`); messagePlayerAlert(client, `This ${getVehicleName(vehicle)}'s engine is off and you don't have the keys to start it`);
} }
} }
resetVehiclePosition(vehicle); resetVehiclePosition(vehicle);
} }
let currentSubAccount = getPlayerCurrentSubAccount(client); let currentSubAccount = getPlayerCurrentSubAccount(client);
if(isPlayerWorking(client)) { if(isPlayerWorking(client)) {
if(getVehicleData(vehicle).ownerType == VRR_VEHOWNER_JOB) { if(getVehicleData(vehicle).ownerType == VRR_VEHOWNER_JOB) {
if(getVehicleData(vehicle).ownerId == getPlayerCurrentSubAccount(client).job) { if(getVehicleData(vehicle).ownerId == getPlayerCurrentSubAccount(client).job) {
getPlayerCurrentSubAccount(client).lastJobVehicle = vehicle; getPlayerCurrentSubAccount(client).lastJobVehicle = vehicle;
messagePlayerInfo(client, `Use /startroute to start working in this vehicle`); messagePlayerInfo(client, `Use /startroute to start working in this vehicle`);
} }
} }
} }
if(isPlayerWorking(client)) { if(isPlayerWorking(client)) {
if(isPlayerOnJobRoute(client)) { if(isPlayerOnJobRoute(client)) {
if(vehicle == getPlayerJobRouteVehicle(client)) { if(vehicle == getPlayerJobRouteVehicle(client)) {
stopReturnToJobVehicleCountdown(client); stopReturnToJobVehicleCountdown(client);
} }
} }
} }
} }
if(getVehicleData(vehicle).streamingRadioStation != -1) { if(getVehicleData(vehicle).streamingRadioStation != -1) {
if(getPlayerData(client).streamingRadioStation != getVehicleData(vehicle).streamingRadioStation) { if(getPlayerData(client).streamingRadioStation != getVehicleData(vehicle).streamingRadioStation) {
playRadioStreamForPlayer(client, radioStations[getVehicleData(vehicle).streamingRadioStation].url, true, getPlayerStreamingRadioVolume(client)); playRadioStreamForPlayer(client, getServerData().radioStations[getVehicleData(vehicle).streamingRadioStation].url, true, getPlayerStreamingRadioVolume(client));
} }
} }
} }
// =========================================================================== // ===========================================================================
function onPlayerExitedVehicle(client, vehicle) { function onPlayerExitedVehicle(client, vehicle) {
getPlayerData(client).pedState = VRR_PEDSTATE_READY; getPlayerData(client).pedState = VRR_PEDSTATE_READY;
stopRadioStreamForPlayer(client); stopRadioStreamForPlayer(client);
if(!getVehicleData(vehicle)) { if(!getVehicleData(vehicle)) {
return false; return false;
} }
if(isPlayerWorking(client)) { if(isPlayerWorking(client)) {
if(isPlayerOnJobRoute(client)) { if(isPlayerOnJobRoute(client)) {
if(vehicle == getPlayerJobRouteVehicle(client)) { if(vehicle == getPlayerJobRouteVehicle(client)) {
startReturnToJobVehicleCountdown(client); startReturnToJobVehicleCountdown(client);
} }
} }
} }
getVehicleData(vehicle).lastActiveTime = getCurrentUnixTimestamp(); getVehicleData(vehicle).lastActiveTime = getCurrentUnixTimestamp();
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} exited a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("vrr.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`); logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} exited a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("vrr.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`);
} }
// =========================================================================== // ===========================================================================
function onPlayerDeath(client, position) { function onPlayerDeath(client, position) {
logToConsole(LOG_INFO, `${getPlayerDisplayForConsole(client)} died.`); logToConsole(LOG_INFO, `${getPlayerDisplayForConsole(client)} died.`);
getPlayerData(client).pedState = VRR_PEDSTATE_DEAD; getPlayerData(client).pedState = VRR_PEDSTATE_DEAD;
updatePlayerSpawnedState(client, false); updatePlayerSpawnedState(client, false);
setPlayerControlState(client, false); setPlayerControlState(client, false);
setTimeout(function() { setTimeout(function() {
if(isFadeCameraSupported()) { if(isFadeCameraSupported()) {
fadeCamera(client, false, 1.0); fadeCamera(client, false, 1.0);
} }
setTimeout(function() { setTimeout(function() {
if(getPlayerCurrentSubAccount(client).inJail) { if(getPlayerCurrentSubAccount(client).inJail) {
let closestJail = getClosestPoliceStation(getPlayerPosition(client)); let closestJail = getClosestPoliceStation(getPlayerPosition(client));
client.despawnPlayer(); client.despawnPlayer();
getPlayerCurrentSubAccount(client).interior = closestJail.interior; getPlayerCurrentSubAccount(client).interior = closestJail.interior;
getPlayerCurrentSubAccount(client).dimension = closestJail.dimension; getPlayerCurrentSubAccount(client).dimension = closestJail.dimension;
spawnPlayer(client, closestJail.position, closestJail.heading, getGameConfig().skins[getGame()][getPlayerCurrentSubAccount(client).skin][0]);
if(isFadeCameraSupported()) { if(isPlayerWorking(client)) {
fadeCamera(client, true, 1.0); stopWorking(client);
} }
updatePlayerSpawnedState(client, true);
makePlayerStopAnimation(client); if(getGame() == VRR_GAME_MAFIA_ONE) {
setPlayerControlState(client, true); spawnPlayer(client, getGameConfig().skins[getGame()][getPlayerCurrentSubAccount(client).skin][0], closestJail.position, closestJail.heading);
} else {
spawnPlayer(client, closestJail.position, closestJail.heading, getGameConfig().skins[getGame()][getPlayerCurrentSubAccount(client).skin][0]);
}
if(isFadeCameraSupported()) {
fadeCamera(client, true, 1.0);
}
updatePlayerSpawnedState(client, true);
makePlayerStopAnimation(client);
setPlayerControlState(client, true);
} else { } else {
let closestHospital = getClosestHospital(getPlayerPosition(client)); let closestHospital = getClosestHospital(getPlayerPosition(client));
client.despawnPlayer(); client.despawnPlayer();
getPlayerCurrentSubAccount(client).interior = closestHospital.interior; getPlayerCurrentSubAccount(client).interior = closestHospital.interior;
getPlayerCurrentSubAccount(client).dimension = closestHospital.dimension; getPlayerCurrentSubAccount(client).dimension = closestHospital.dimension;
spawnPlayer(client, closestHospital.position, closestHospital.heading, getGameConfig().skins[getGame()][getPlayerCurrentSubAccount(client).skin][0]);
if(isFadeCameraSupported()) { if(isPlayerWorking(client)) {
fadeCamera(client, true, 1.0); stopWorking(client);
} }
updatePlayerSpawnedState(client, true);
makePlayerStopAnimation(client); if(getGame() == VRR_GAME_MAFIA_ONE) {
setPlayerControlState(client, true); spawnPlayer(client, getGameConfig().skins[getGame()][getPlayerCurrentSubAccount(client).skin][0], closestHospital.position, closestHospital.heading);
} else {
spawnPlayer(client, closestHospital.position, closestHospital.heading, getGameConfig().skins[getGame()][getPlayerCurrentSubAccount(client).skin][0]);
}
if(isFadeCameraSupported()) {
fadeCamera(client, true, 1.0);
}
updatePlayerSpawnedState(client, true);
makePlayerStopAnimation(client);
setPlayerControlState(client, true);
} }
}, 2000); }, 2000);
}, 1000); }, 1000);
@@ -421,179 +446,191 @@ function onPlayerDeath(client, position) {
// =========================================================================== // ===========================================================================
function onPedSpawn(ped) { function onPedSpawn(ped) {
if(ped.type == ELEMENT_PLAYER) { if(ped.type == ELEMENT_PLAYER) {
//setTimeout(onPlayerSpawn, 250, ped); //setTimeout(onPlayerSpawn, 250, ped);
onPlayerSpawn(); onPlayerSpawn();
} }
} }
// =========================================================================== // ===========================================================================
function onPlayerSpawn(client) { function onPlayerSpawn(client) {
logToConsole(LOG_DEBUG, `[VRR.Event] Checking for ${getPlayerDisplayForConsole(client)}'s player ped`); logToConsole(LOG_DEBUG, `[VRR.Event] Checking for ${getPlayerDisplayForConsole(client)}'s player ped`);
//if(client.player == null) { //if(getPlayerPed(client) == null) {
// logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player element not set yet. Rechecking ...`); // logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player element not set yet. Rechecking ...`);
// setTimeout(onPlayerSpawn, 500, client); // setTimeout(onPlayerSpawn, 500, client);
// return false; // return false;
//} //}
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player ped is valid. Continuing spawn processing ...`); logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player ped is valid. Continuing spawn processing ...`);
logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s player data`); logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s player data`);
if(!getPlayerData(client)) { if(!getPlayerData(client)) {
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player data is invalid. Kicking them from server.`); logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player data is invalid. Kicking them from server.`);
client.disconnect(); client.disconnect();
return false; return false;
} }
logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s login status`); logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s login status`);
if(!getPlayerData(client).loggedIn) { if(!isPlayerLoggedIn(client)) {
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} is NOT logged in. Despawning their player.`); logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} is NOT logged in. Despawning their player.`);
client.disconnect(); client.disconnect();
return false; return false;
} }
logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s selected character status`); logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s selected character status`);
if(getPlayerData(client).currentSubAccount == -1) { if(getPlayerData(client).currentSubAccount == -1) {
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} has NOT selected a character. Despawning their player.`); logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} has NOT selected a character. Despawning their player.`);
client.disconnect(); client.disconnect();
return false; return false;
} }
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player data is valid. Continuing spawn processing ...`); logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player data is valid. Continuing spawn processing ...`);
if(getServerGame() == VRR_GAME_GTA_IV) { if(getServerGame() == VRR_GAME_GTA_IV) {
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped body parts and props`); logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped body parts and props`);
setEntityData(client.player, "vrr.bodyParts", getPlayerCurrentSubAccount(client).bodyParts, true); setEntityData(getPlayerPed(client), "vrr.bodyParts", getPlayerCurrentSubAccount(client).bodyParts, true);
setEntityData(client.player, "vrr.bodyProps", getPlayerCurrentSubAccount(client).bodyProps, true); setEntityData(getPlayerPed(client), "vrr.bodyProps", getPlayerCurrentSubAccount(client).bodyProps, true);
} }
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped scale (${getPlayerCurrentSubAccount(client).pedScale})`); logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped scale (${getPlayerCurrentSubAccount(client).pedScale})`);
setEntityData(client.player, "vrr.scale", getPlayerCurrentSubAccount(client).pedScale, true); setEntityData(getPlayerPed(client), "vrr.scale", getPlayerCurrentSubAccount(client).pedScale, true);
if(isPlayerSwitchingCharacter(client) || isPlayerCreatingCharacter(client)) { if(isPlayerSwitchingCharacter(client) || isPlayerCreatingCharacter(client)) {
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s ped is being used for character selection/creation. No further spawn processing needed'`); logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s ped is being used for character selection/creation. No further spawn processing needed'`);
return false; return false;
} }
if(isCustomCameraSupported()) { if(isCustomCameraSupported()) {
restorePlayerCamera(client); restorePlayerCamera(client);
} }
logToConsole(LOG_DEBUG, `[VRR.Event] Storing ${getPlayerDisplayForConsole(client)} ped in client data `); logToConsole(LOG_DEBUG, `[VRR.Event] Storing ${getPlayerDisplayForConsole(client)} ped in client data `);
if(areServerElementsSupported()) { if(areServerElementsSupported()) {
getPlayerData(client).ped = client.player; getPlayerData(client).ped = getPlayerPed(client);
} }
logToConsole(LOG_DEBUG, `[VRR.Event] Sending ${getPlayerDisplayForConsole(client)} the 'now playing as' message`); logToConsole(LOG_DEBUG, `[VRR.Event] Sending ${getPlayerDisplayForConsole(client)} the 'now playing as' message`);
messagePlayerAlert(client, `You are now playing as: {businessBlue}${getCharacterFullName(client)}`, getColourByName("white")); messagePlayerAlert(client, `You are now playing as: {businessBlue}${getCharacterFullName(client)}`, getColourByName("white"));
messagePlayerNormal(client, "This server is in early development and may restart at any time for updates.", getColourByName("orange")); //messagePlayerNormal(client, "This server is in early development and may restart at any time for updates.", getColourByName("orange"));
messagePlayerNormal(client, "Please report any bugs using /bug and suggestions using /idea", getColourByName("yellow")); //messagePlayerNormal(client, "Please report any bugs using /bug and suggestions using /idea", getColourByName("yellow"));
logToConsole(LOG_DEBUG, `[VRR.Event] Updating spawned state for ${getPlayerDisplayForConsole(client)} to true`); logToConsole(LOG_DEBUG, `[VRR.Event] Updating spawned state for ${getPlayerDisplayForConsole(client)} to true`);
updatePlayerSpawnedState(client, true); updatePlayerSpawnedState(client, true);
logToConsole(LOG_DEBUG, `[VRR.Event] Setting player interior for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).interior}`); logToConsole(LOG_DEBUG, `[VRR.Event] Setting player interior for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).interior}`);
setPlayerInterior(client, getPlayerCurrentSubAccount(client).interior); setPlayerInterior(client, getPlayerCurrentSubAccount(client).interior);
logToConsole(LOG_DEBUG, `[VRR.Event] Setting player dimension for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).dimension}`); logToConsole(LOG_DEBUG, `[VRR.Event] Setting player dimension for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).dimension}`);
setPlayerDimension(client, getPlayerCurrentSubAccount(client).dimension); setPlayerDimension(client, getPlayerCurrentSubAccount(client).dimension);
//if(getPlayerCurrentSubAccount(client).interior != 0 || getPlayerCurrentSubAccount(client).dimension != 0) { //if(getPlayerCurrentSubAccount(client).interior != 0 || getPlayerCurrentSubAccount(client).dimension != 0) {
// updateAllInteriorVehiclesForPlayer(client, getPlayerCurrentSubAccount(client).interior, getPlayerCurrentSubAccount(client).dimension); // updateAllInteriorVehiclesForPlayer(client, getPlayerCurrentSubAccount(client).interior, getPlayerCurrentSubAccount(client).dimension);
//} //}
logToConsole(LOG_DEBUG, `[VRR.Event] Setting player health for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).health}`); logToConsole(LOG_DEBUG, `[VRR.Event] Setting player health for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).health}`);
setPlayerHealth(client, getPlayerCurrentSubAccount(client).health); setPlayerHealth(client, getPlayerCurrentSubAccount(client).health);
logToConsole(LOG_DEBUG, `[VRR.Event] Setting player armour for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).armour}`); logToConsole(LOG_DEBUG, `[VRR.Event] Setting player armour for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).armour}`);
setPlayerArmour(client, getPlayerCurrentSubAccount(client).armour); setPlayerArmour(client, getPlayerCurrentSubAccount(client).armour);
logToConsole(LOG_DEBUG, `[VRR.Event] Sending ${getPlayerDisplayForConsole(client)}'s job type to their client (${getJobIndexFromDatabaseId(getPlayerCurrentSubAccount(client))})`); logToConsole(LOG_DEBUG, `[VRR.Event] Sending ${getPlayerDisplayForConsole(client)}'s job type to their client (${getJobIndexFromDatabaseId(getPlayerCurrentSubAccount(client))})`);
sendPlayerJobType(client, getPlayerCurrentSubAccount(client).job); sendPlayerJobType(client, getPlayerCurrentSubAccount(client).job);
logToConsole(LOG_DEBUG, `[VRR.Event] Enabling all rendering states for ${getPlayerDisplayForConsole(client)}`); logToConsole(LOG_DEBUG, `[VRR.Event] Enabling all rendering states for ${getPlayerDisplayForConsole(client)}`);
setPlayer2DRendering(client, true, true, true, true, true, true); setPlayer2DRendering(client, true, true, true, true, true, true);
logToConsole(LOG_DEBUG, `[VRR.Event] Sending snow states to ${getPlayerDisplayForConsole(client)}`); logToConsole(LOG_DEBUG, `[VRR.Event] Sending snow states to ${getPlayerDisplayForConsole(client)}`);
if(isSnowSupported()) { if(isSnowSupported()) {
updatePlayerSnowState(client); updatePlayerSnowState(client);
} }
if(areServerElementsSupported() && getServerGame() == VRR_GAME_GTA_SA) { if(areServerElementsSupported() && getServerGame() == VRR_GAME_GTA_SA) {
logToConsole(LOG_DEBUG, `[VRR.Event] Setting player walk and fightstyle for ${getPlayerDisplayForConsole(client)}`); logToConsole(LOG_DEBUG, `[VRR.Event] Setting player walk and fightstyle for ${getPlayerDisplayForConsole(client)}`);
setEntityData(client.player, "vrr.walkStyle", getPlayerCurrentSubAccount(client).walkStyle, true); setEntityData(getPlayerPed(client), "vrr.walkStyle", getPlayerCurrentSubAccount(client).walkStyle, true);
setPlayerFightStyle(client, getPlayerCurrentSubAccount(client).fightStyle); setPlayerFightStyle(client, getPlayerCurrentSubAccount(client).fightStyle);
} }
logToConsole(LOG_DEBUG, `[VRR.Event] Updating logo state for ${getPlayerDisplayForConsole(client)}`); logToConsole(LOG_DEBUG, `[VRR.Event] Updating logo state for ${getPlayerDisplayForConsole(client)}`);
if(getServerConfig().showLogo && doesPlayerHaveLogoEnabled(client)) { if(getServerConfig().showLogo && doesPlayerHaveLogoEnabled(client)) {
updatePlayerShowLogoState(client, true); updatePlayerShowLogoState(client, true);
} }
logToConsole(LOG_DEBUG, `[VRR.Event] Caching ${getPlayerDisplayForConsole(client)}'s hotbar items`); logToConsole(LOG_DEBUG, `[VRR.Event] Caching ${getPlayerDisplayForConsole(client)}'s hotbar items`);
cachePlayerHotBarItems(client); cachePlayerHotBarItems(client);
logToConsole(LOG_DEBUG, `[VRR.Event] Syncing ${getPlayerDisplayForConsole(client)}'s hotbar`); logToConsole(LOG_DEBUG, `[VRR.Event] Syncing ${getPlayerDisplayForConsole(client)}'s hotbar`);
updatePlayerHotBar(client); updatePlayerHotBar(client);
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s switchchar state to false`); logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s switchchar state to false`);
getPlayerData(client).switchingCharacter = false; getPlayerData(client).switchingCharacter = false;
if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) { if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) {
let keyId = getPlayerKeyBindForCommand(client, "enter"); let keyId = getPlayerKeyBindForCommand(client, "enter");
logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`); logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`);
sendPlayerEnterPropertyKey(client, keyId.key); sendPlayerEnterPropertyKey(client, keyId.key);
} }
//if(isGTAIV()) { sendPlayerLocaleStrings(client);
// setEntityData(client.player, "vrr.bodyPartHair", getPlayerCurrentSubAccount(client).bodyParts.hair, true);
// setEntityData(client.player, "vrr.bodyPartHead", getPlayerCurrentSubAccount(client).bodyParts.head, true);
// setEntityData(client.player, "vrr.bodyPartUpper", getPlayerCurrentSubAccount(client).bodyParts.upper, true);
// setEntityData(client.player, "vrr.bodyPartLower", getPlayerCurrentSubAccount(client).bodyParts.lower, true);
// setEntityData(client.player, "vrr.bodyPropHair", getPlayerCurrentSubAccount(client).bodyProps.hair, true);
// setEntityData(client.player, "vrr.bodyPropEyes", getPlayerCurrentSubAccount(client).bodyProps.eyes, true);
// setEntityData(client.player, "vrr.bodyPartHead", getPlayerCurrentSubAccount(client).bodyProps.head, true);
// setEntityData(client.player, "vrr.bodyPartLeftHand", getPlayerCurrentSubAccount(client).bodyProps.leftHand, true);
// setEntityData(client.player, "vrr.bodyPartRightHand", getPlayerCurrentSubAccount(client).bodyProps.rightHand, true);
// setEntityData(client.player, "vrr.bodyPartLeftWrist", getPlayerCurrentSubAccount(client).bodyProps.leftWrist, true);
// setEntityData(client.player, "vrr.bodyPartRightWrist", getPlayerCurrentSubAccount(client).bodyProps.rightWrist, true);
// setEntityData(client.player, "vrr.bodyPartHip", getPlayerCurrentSubAccount(client).bodyProps.hip, true);
// setEntityData(client.player, "vrr.bodyPartLeftFoot", getPlayerCurrentSubAccount(client).bodyProps.leftFoot, true);
// setEntityData(client.player, "vrr.bodyPartRightFoot", getPlayerCurrentSubAccount(client).bodyProps.rightFoot, true);
//}
if(isGTAIV()) { //if(isGTAIV()) {
//sendPlayerPedPartsAndProps(client); // setEntityData(getPlayerPed(client), "vrr.bodyPartHair", getPlayerCurrentSubAccount(client).bodyParts.hair, true);
} // setEntityData(getPlayerPed(client), "vrr.bodyPartHead", getPlayerCurrentSubAccount(client).bodyParts.head, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartUpper", getPlayerCurrentSubAccount(client).bodyParts.upper, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartLower", getPlayerCurrentSubAccount(client).bodyParts.lower, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPropHair", getPlayerCurrentSubAccount(client).bodyProps.hair, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPropEyes", getPlayerCurrentSubAccount(client).bodyProps.eyes, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartHead", getPlayerCurrentSubAccount(client).bodyProps.head, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartLeftHand", getPlayerCurrentSubAccount(client).bodyProps.leftHand, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartRightHand", getPlayerCurrentSubAccount(client).bodyProps.rightHand, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartLeftWrist", getPlayerCurrentSubAccount(client).bodyProps.leftWrist, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartRightWrist", getPlayerCurrentSubAccount(client).bodyProps.rightWrist, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartHip", getPlayerCurrentSubAccount(client).bodyProps.hip, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartLeftFoot", getPlayerCurrentSubAccount(client).bodyProps.leftFoot, true);
// setEntityData(getPlayerPed(client), "vrr.bodyPartRightFoot", getPlayerCurrentSubAccount(client).bodyProps.rightFoot, true);
//}
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped state to ready`); if(isGTAIV()) {
getPlayerData(client).pedState = VRR_PEDSTATE_READY; //sendPlayerPedPartsAndProps(client);
}
if(areServerElementsSupported()) { logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped state to ready`);
syncPlayerProperties(client); getPlayerData(client).pedState = VRR_PEDSTATE_READY;
//setTimeout(function() {
// syncPlayerProperties(client);
//}, 1000);
}
logToConsole(LOG_DEBUG, `[VRR.Event] Syncing ${getPlayerDisplayForConsole(client)}'s cash ${getPlayerCurrentSubAccount(client).cash}`); if(areServerElementsSupported()) {
updatePlayerCash(client); syncPlayerProperties(client);
//setTimeout(function() {
// syncPlayerProperties(client);
//}, 1000);
}
logToConsole(LOG_DEBUG, `[VRR.Event] Updating all player name tags`); logToConsole(LOG_DEBUG, `[VRR.Event] Syncing ${getPlayerDisplayForConsole(client)}'s cash ${getPlayerCurrentSubAccount(client).cash}`);
updateAllPlayerNameTags(); updatePlayerCash(client);
if(!areServerElementsSupported()) { logToConsole(LOG_DEBUG, `[VRR.Event] Updating all player name tags`);
sendAllBusinessesToPlayer(client); updateAllPlayerNameTags();
//sendAllHousesToPlayer(client);
//sendAllJobLocationsToPlayer(client);
//sendAllVehiclesToPlayer(client);
requestPlayerPedNetworkId(client); if(!areServerElementsSupported()) {
} sendAllBusinessesToPlayer(client);
sendAllHousesToPlayer(client);
sendAllJobsToPlayer(client);
//sendAllVehiclesToPlayer(client);
getPlayerData(client).payDayTickStart = sdl.ticks; requestPlayerPedNetworkId(client);
}
getPlayerData(client).payDayTickStart = sdl.ticks;
messageDiscordEventChannel(`🧍 ${client.name} spawned as ${getCharacterFullName(client)}`);
}
// ===========================================================================
function onPlayerCommand(event, client, command, params) {
if(!doesCommandExist(command)) {
processPlayerCommand(command, params, client);
}
} }
// =========================================================================== // ===========================================================================

View File

@@ -54,7 +54,7 @@ function doesPlayerHaveGateKeys(client, vehicle) {
} }
} }
if(gateData.ownerType == VRR_GATEOWNER_BUSINESS) { if(gateData.ownerType == VRR_GATEOWNER_BUSINESS) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageBusinesses"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageBusinesses"))) {
return true; return true;
} }
@@ -64,7 +64,7 @@ function doesPlayerHaveGateKeys(client, vehicle) {
} }
} }
if(gateData.ownerType == VRR_GATEOWNER_HOUSE) { if(gateData.ownerType == VRR_GATEOWNER_HOUSE) {
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) { if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
return true; return true;
} }
@@ -80,11 +80,11 @@ function doesPlayerHaveGateKeys(client, vehicle) {
// =========================================================================== // ===========================================================================
function getGateData(gateId) { function getGateData(gateId) {
if(typeof getServerData().gates[gateId] != "undefined") { if(typeof getServerData().gates[gateId] != "undefined") {
return getServerData().gates[gateId]; return getServerData().gates[gateId];
} }
return false; return false;
} }
// =========================================================================== // ===========================================================================

View File

@@ -15,121 +15,148 @@ function initGUIScript() {
// =========================================================================== // ===========================================================================
function playerPromptAnswerNo(client) { function playerPromptAnswerNo(client) {
if(getPlayerData(client).promptType == VRR_PROMPT_NONE) { if(getPlayerData(client).promptType == VRR_PROMPT_NONE) {
return false; return false;
} }
logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} answered NO to their prompt (${getPlayerData(client).promptType})`); logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} answered NO to their prompt (${getPlayerData(client).promptType})`);
switch(getPlayerData(client).promptType) { switch(getPlayerData(client).promptType) {
case VRR_PROMPT_CREATEFIRSTCHAR: case VRR_PROMPT_CREATEFIRSTCHAR:
logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)} chose not to create a first character. Kicking them from the server ...`); logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)} chose not to create a first character. Kicking them from the server ...`);
showPlayerErrorGUI(client, "You don't have a character to play. Goodbye!", "No Characters"); showPlayerErrorGUI(client, "You don't have a character to play. Goodbye!", "No Characters");
setTimeout(function() { client.disconnect(); }, 5000); setTimeout(function() { client.disconnect(); }, 5000);
break; break;
case VRR_PROMPT_BIZORDER: case VRR_PROMPT_BIZORDER:
if(getPlayerData(client).businessOrderAmount > 0) { if(getPlayerData(client).businessOrderAmount > 0) {
if(canPlayerUseGUI(client)) { if(canPlayerUseGUI(client)) {
showPlayerErrorGUI(client, "You canceled the order.", "Business Order Canceled"); showPlayerErrorGUI(client, "You canceled the order.", "Business Order Canceled");
} else { } else {
logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)} canceled the order of ${getPlayerData(client).businessOrderAmount} ${getPlayerData(client).businessOrderItem} at ${getPlayerData(client).businessOrderCost/getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness)}`); logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)} canceled the order of ${getPlayerData(client).businessOrderAmount} ${getPlayerData(client).businessOrderItem} at ${getPlayerData(client).businessOrderCost/getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness)}`);
messagePlayerError(client, "You canceled the order!"); messagePlayerError(client, "You canceled the order!");
} }
} else { } else {
showPlayerErrorGUI(client, "You aren't ordering anything for a business!", "Business Order Canceled"); showPlayerErrorGUI(client, "You aren't ordering anything for a business!", "Business Order Canceled");
} }
break; break;
default: default:
break; break;
} }
getPlayerData(client).promptType = VRR_PROMPT_NONE; getPlayerData(client).promptType = VRR_PROMPT_NONE;
} }
// =========================================================================== // ===========================================================================
function playerPromptAnswerYes(client) { function playerPromptAnswerYes(client) {
if(getPlayerData(client).promptType == VRR_PROMPT_NONE) { if(getPlayerData(client).promptType == VRR_PROMPT_NONE) {
return false; return false;
} }
logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} answered YES to their prompt (${getPlayerData(client).promptType})`); logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} answered YES to their prompt (${getPlayerData(client).promptType})`);
switch(getPlayerData(client).promptType) { switch(getPlayerData(client).promptType) {
case VRR_PROMPT_CREATEFIRSTCHAR: case VRR_PROMPT_CREATEFIRSTCHAR:
showPlayerNewCharacterGUI(client); showPlayerNewCharacterGUI(client);
break; break;
case VRR_PROMPT_BIZORDER: case VRR_PROMPT_BIZORDER:
if(getPlayerData(client).businessOrderAmount > 0) { if(getPlayerData(client).businessOrderAmount > 0) {
if(getBusinessData(getPlayerData(client).businessOrderBusiness).till < getPlayerData(client).businessOrderCost) { if(getBusinessData(getPlayerData(client).businessOrderBusiness).till < getPlayerData(client).businessOrderCost) {
logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} failed to order ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} at ${getPlayerData(client).businessOrderCost/getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness).name} (Reason: Not enough money in business till)`); logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} failed to order ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} at ${getPlayerData(client).businessOrderCost/getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness).name} (Reason: Not enough money in business till)`);
showPlayerErrorGUI(client, "This business doesn't have enough money! Deposit some using /bizdeposit", "Business Order Canceled"); showPlayerErrorGUI(client, "This business doesn't have enough money! Deposit some using /bizdeposit", "Business Order Canceled");
getPlayerData(client).businessOrderAmount = 0; getPlayerData(client).businessOrderAmount = 0;
getPlayerData(client).businessOrderBusiness = false; getPlayerData(client).businessOrderBusiness = false;
getPlayerData(client).businessOrderItem = -1; getPlayerData(client).businessOrderItem = -1;
getPlayerData(client).businessOrderValue = -1; getPlayerData(client).businessOrderValue = -1;
} else { } else {
logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} successfully ordered ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} at ${getPlayerData(client).businessOrderCost/getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness).name}`); logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} successfully ordered ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} at ${getPlayerData(client).businessOrderCost/getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness).name}`);
showPlayerInfoGUI(client, `You ordered ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} (${getItemValueDisplay(getPlayerData(client).businessOrderItem, getPlayerData(client).businessOrderValue)}) for ${getPlayerData(client).businessOrderCost}!`, "Business Order Successful"); showPlayerInfoGUI(client, `You ordered ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} (${getItemValueDisplay(getPlayerData(client).businessOrderItem, getPlayerData(client).businessOrderValue)}) for ${getPlayerData(client).businessOrderCost}!`, "Business Order Successful");
createItem(getPlayerData(client).businessOrderItem, getPlayerData(client).businessOrderValue, VRR_ITEM_OWNER_BIZFLOOR, getBusinessData(getPlayerData(client).businessOrderBusiness).databaseId, getPlayerData(client).businessOrderAmount); createItem(getPlayerData(client).businessOrderItem, getPlayerData(client).businessOrderValue, VRR_ITEM_OWNER_BIZFLOOR, getBusinessData(getPlayerData(client).businessOrderBusiness).databaseId, getPlayerData(client).businessOrderAmount);
cacheBusinessItems(getPlayerData(client).businessOrderBusiness); cacheBusinessItems(getPlayerData(client).businessOrderBusiness);
getBusinessData(getPlayerData(client).businessOrderBusiness).till -= getPlayerData(client).businessOrderCost; getBusinessData(getPlayerData(client).businessOrderBusiness).till -= getPlayerData(client).businessOrderCost;
updateBusinessPickupLabelData(getPlayerData(client).businessOrderBusiness); updateBusinessPickupLabelData(getPlayerData(client).businessOrderBusiness);
getPlayerData(client).businessOrderAmount = 0; getPlayerData(client).businessOrderAmount = 0;
getPlayerData(client).businessOrderBusiness = false; getPlayerData(client).businessOrderBusiness = false;
getPlayerData(client).businessOrderItem = -1; getPlayerData(client).businessOrderItem = -1;
getPlayerData(client).businessOrderValue = -1; getPlayerData(client).businessOrderValue = -1;
} }
} else { } else {
showPlayerErrorGUI(client, `You aren't ordering anything for a business!`, `Business Order Canceled`); showPlayerErrorGUI(client, ``, `Business Order Canceled`);
} }
break; break;
default: case VRR_PROMPT_GIVEVEHTOCLAN:
break; if(!isPlayerInAnyVehicle(client)) {
} messagePlayerError(client, getLocaleString(client, "MustBeInVehicle"));
return false;
}
getPlayerData(client).promptType = VRR_PROMPT_NONE; if(!getVehicleData(getPlayerVehicle(client))) {
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
return false;
}
if(getVehicleData(getPlayerVehicle(client)).ownerType != VRR_VEHOWNER_PLAYER) {
messagePlayerError(client, getLocaleString(client, "MustOwnVehicle"));
return false;
}
if(getVehicleData(getPlayerVehicle(client)).ownerId != getPlayerCurrentSubAccount(client).databaseId) {
messagePlayerError(client, getLocaleString(client, "MustOwnVehicle"));
return false;
}
getVehicleData(getPlayerVehicle(client)).ownerType = VRR_VEHOWNER_CLAN;
getVehicleData(getPlayerVehicle(client)).ownerId = getPlayerCurrentSubAccount(client).clan;
messagePlayerSuccess(client, getLocaleString(client, "GaveVehicleToClan"));
//messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to the {clanOrange}${getClanData(clanId).name} {MAINCOLOUR}clan`);
break;
default:
break;
}
getPlayerData(client).promptType = VRR_PROMPT_NONE;
} }
// =========================================================================== // ===========================================================================
function canPlayerUseGUI(client) { function canPlayerUseGUI(client) {
return (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)); return (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client));
} }
// =========================================================================== // ===========================================================================
function playerPromptAnswerYesCommand(command, params, client) { function playerPromptAnswerYesCommand(command, params, client) {
playerPromptAnswerYes(client); playerPromptAnswerYes(client);
} }
// =========================================================================== // ===========================================================================
function playerPromptAnswerNoCommand(command, params, client) { function playerPromptAnswerNoCommand(command, params, client) {
playerPromptAnswerNo(client); playerPromptAnswerNo(client);
} }
// =========================================================================== // ===========================================================================
function playerToggledGUI(client) { function playerToggledGUI(client) {
toggleAccountGUICommand("gui", "", client); toggleAccountGUICommand("gui", "", client);
} }
// =========================================================================== // ===========================================================================
function showPlayerChangePasswordGUI(client) { function showPlayerChangePasswordGUI(client) {
sendNetworkEventToPlayer("vrr.changePassword", client); sendNetworkEventToPlayer("vrr.changePassword", client);
} }
// =========================================================================== // ===========================================================================
function showPlayerTwoFactorAuthenticationGUI(client) { function showPlayerTwoFactorAuthenticationGUI(client) {
sendNetworkEventToPlayer("vrr.2fa", client); sendNetworkEventToPlayer("vrr.2fa", client);
} }
// =========================================================================== // ===========================================================================

View File

@@ -15,144 +15,144 @@ function initHelpScript() {
// =========================================================================== // ===========================================================================
let randomTips = [ let randomTips = [
`{MAINCOLOUR}Look for yellow dots on your map for job locations.`, `{MAINCOLOUR}Look for yellow dots on your map for job locations.`,
`{MAINCOLOUR}You can set custom key binds. Use {ALTCOLOUR}/help keys {MAINCOLOUR} for details.`, `{MAINCOLOUR}You can set custom key binds. Use {ALTCOLOUR}/help keys {MAINCOLOUR} for details.`,
`{MAINCOLOUR}Use /notips if you don't want to see tips and extra information`, `{MAINCOLOUR}Use /notips if you don't want to see tips and extra information`,
`{MAINCOLOUR}You can edit your keybinds using {ALTCOLOUR}/bindkey and /unbindkey`, `{MAINCOLOUR}You can edit your keybinds using {ALTCOLOUR}/bindkey and /unbindkey`,
`{MAINCOLOUR}Press to see your inventory, and use number keys to select an item`, `{MAINCOLOUR}Press to see your inventory, and use number keys to select an item`,
`{MAINCOLOUR}Use /buy at a business to purchase items.`, `{MAINCOLOUR}Use /buy at a business to purchase items.`,
`{MAINCOLOUR}Found a bug? Report it with {ALTCOLOUR}/bug`, `{MAINCOLOUR}Found a bug? Report it with {ALTCOLOUR}/bug`,
`{MAINCOLOUR}Have an idea or suggestion for the server? Let the devs know using {ALTCOLOUR}/idea`, `{MAINCOLOUR}Have an idea or suggestion for the server? Let the devs know using {ALTCOLOUR}/idea`,
`{MAINCOLOUR}Want to buy a business? Use /bizbuy at one for sale`, `{MAINCOLOUR}Want to buy a business? Use /bizbuy at one for sale`,
`{MAINCOLOUR}Want to buy a house? Use /housebuy at one for sale`, `{MAINCOLOUR}Want to buy a house? Use /housebuy at one for sale`,
`{MAINCOLOUR}Want to buy a vehicle? Visit a dealership and enter one for info on how to buy it!`, `{MAINCOLOUR}Want to buy a vehicle? Visit a dealership and enter one for info on how to buy it!`,
`{MAINCOLOUR}Switch to any of your characters with {ALTCOLOUR}/switchchar`, `{MAINCOLOUR}Switch to any of your characters with {ALTCOLOUR}/switchchar`,
`{MAINCOLOUR}Use {ALTCOLOUR}/iplogin {MAINCOLOUR}to automatically login when connecting with the same IP`, `{MAINCOLOUR}Use {ALTCOLOUR}/iplogin {MAINCOLOUR}to automatically login when connecting with the same IP`,
`{MAINCOLOUR}Use {ALTCOLOUR}/houselights or /bizlights {MAINCOLOUR}to turn on/off the lights in your house or business`, `{MAINCOLOUR}Use {ALTCOLOUR}/houselights or /bizlights {MAINCOLOUR}to turn on/off the lights in your house or business`,
`{MAINCOLOUR}Use {ALTCOLOUR}/radiostation {MAINCOLOUR}to play an internet radio station in your car, house, or business`, `{MAINCOLOUR}Use {ALTCOLOUR}/radiostation {MAINCOLOUR}to play an internet radio station in your car, house, or business`,
//`{MAINCOLOUR}Lower your car windows with /windows {ALTCOLOUR} to play the vehicle's internet radio station {ALTCOLOUR}(/radiostation) {MAINCOLOUR}to nearby players`, //`{MAINCOLOUR}Lower your car windows with /windows {ALTCOLOUR} to play the vehicle's internet radio station {ALTCOLOUR}(/radiostation) {MAINCOLOUR}to nearby players`,
//`{MAINCOLOUR}Lower your car windows with /windows {ALTCOLOUR} to play the vehicle's internet radio station {ALTCOLOUR}(/radiostation) {MAINCOLOUR}to nearby players`, //`{MAINCOLOUR}Lower your car windows with /windows {ALTCOLOUR} to play the vehicle's internet radio station {ALTCOLOUR}(/radiostation) {MAINCOLOUR}to nearby players`,
//`{MAINCOLOUR}Tax is based on your total wealth. This includes money, vehicles, businesses and more.`, //`{MAINCOLOUR}Tax is based on your total wealth. This includes money, vehicles, businesses and more.`,
//`{MAINCOLOUR}Don't go broke because of a hospital bill! Get insured today by visiting an insurance agency!`, //`{MAINCOLOUR}Don't go broke because of a hospital bill! Get insured today by visiting an insurance agency!`,
//`{MAINCOLOUR}Don't go broke because your car was destroyed. Visit an insurance agency today!`, //`{MAINCOLOUR}Don't go broke because your car was destroyed. Visit an insurance agency today!`,
//`{MAINCOLOUR}You can find most locations by using {ALTCOLOUR}/gps`, //`{MAINCOLOUR}You can find most locations by using {ALTCOLOUR}/gps`,
//`{MAINCOLOUR}Want to advertise your business? Visit the news station and place an /ad today!`, //`{MAINCOLOUR}Want to advertise your business? Visit the news station and place an /ad today!`,
//`{MAINCOLOUR}You can change your quick item display. Choices are GTAV-style pie menu or Minecraft-style hotbar`, //`{MAINCOLOUR}You can change your quick item display. Choices are GTAV-style pie menu or Minecraft-style hotbar`,
//`{MAINCOLOUR}Hold [#0066FF]E {MAINCOLOUR}to hail a nearby taxi if you need a ride.`, //`{MAINCOLOUR}Hold [#0066FF]E {MAINCOLOUR}to hail a nearby taxi if you need a ride.`,
//`{MAINCOLOUR}Press [#0066FF]G {MAINCOLOUR}to enter a vehicle as passenger.`, //`{MAINCOLOUR}Press [#0066FF]G {MAINCOLOUR}to enter a vehicle as passenger.`,
//`{MAINCOLOUR}Banks can provide loans. Use {ALTCOLOUR}/help loans {MAINCOLOUR} for more details.`, //`{MAINCOLOUR}Banks can provide loans. Use {ALTCOLOUR}/help loans {MAINCOLOUR} for more details.`,
`{MAINCOLOUR}Want to make a clan? Use {ALTCOLOUR}/help clans {MAINCOLOUR} for details.`, `{MAINCOLOUR}Want to make a clan? Use {ALTCOLOUR}/help clans {MAINCOLOUR} for details.`,
`{MAINCOLOUR}Legal weapons can be purchased at any ammunation.`, `{MAINCOLOUR}Legal weapons can be purchased at any ammunation.`,
]; ];
// =========================================================================== // ===========================================================================
function helpCommand(command, params, client) { function helpCommand(command, params, client) {
if(areParamsEmpty(params)) { if(areParamsEmpty(params)) {
showMainHelpMessage(client); showMainHelpMessage(client);
return false; return false;
} }
let splitParams = params.split(" "); let splitParams = params.split(" ");
switch(toLowerCase(getParam(params, " ", 1))) { switch(toLowerCase(getParam(params, " ", 1))) {
case "account": case "account":
showAccountHelpMessage(client); showAccountHelpMessage(client);
break; break;
case "vehicle": case "vehicle":
case "veh": case "veh":
case "vehs": case "vehs":
case "vehicles": case "vehicles":
case "car": case "car":
case "cars": case "cars":
showVehicleHelpMessage(client); showVehicleHelpMessage(client);
break; break;
case "dealership": case "dealership":
showVehicleDealershipHelpMessage(client); showVehicleDealershipHelpMessage(client);
break; break;
case "business": case "business":
showBusinessHelpMessage(client); showBusinessHelpMessage(client);
break; break;
case "job": case "job":
showJobHelpMessage(client); showJobHelpMessage(client);
break; break;
case "chat": case "chat":
showChatHelpMessage(client); showChatHelpMessage(client);
break; break;
case "rules": case "rules":
showRulesHelpMessage(client); showRulesHelpMessage(client);
break; break;
case "website": case "website":
showWebsiteHelpMessage(client); showWebsiteHelpMessage(client);
break; break;
case "discord": case "discord":
showDiscordHelpMessage(client); showDiscordHelpMessage(client);
break; break;
case "anim": case "anim":
case "anims": case "anims":
case "animation": case "animation":
case "animations": case "animations":
showAnimationHelpMessage(client); showAnimationHelpMessage(client);
break; break;
case "skin": case "skin":
case "skins": case "skins":
case "clothes": case "clothes":
showClothesHelpMessage(client); showClothesHelpMessage(client);
break; break;
case "key": case "key":
case "keys": case "keys":
case "keybinds": case "keybinds":
case "keybind": case "keybind":
case "bindkey": case "bindkey":
case "bindkeys": case "bindkeys":
showBindKeysHelpMessage(client); showBindKeysHelpMessage(client);
break; break;
case "command": case "command":
case "cmd": case "cmd":
showCommandHelpMessage(client, getParam(params, " ", 2)); showCommandHelpMessage(client, getParam(params, " ", 2));
break; break;
case "clan": case "clan":
case "clans": case "clans":
case "group": case "group":
case "groups": case "groups":
case "faction": case "faction":
case "factions": case "factions":
case "family": case "family":
case "families": case "families":
showClanHelpMessage(client); showClanHelpMessage(client);
break; break;
case "radio": case "radio":
case "radiostations": case "radiostations":
case "music": case "music":
showRadioHelpMessage(client); showRadioHelpMessage(client);
break; break;
case "economy": case "economy":
case "wealth": case "wealth":
case "tax": case "tax":
case "taxes": case "taxes":
case "payday": case "payday":
showWealthAndTaxHelpMessage(client); showWealthAndTaxHelpMessage(client);
break; break;
default: default:
showMainHelpMessage(client); showMainHelpMessage(client);
break; break;
} }
} }
// == Account Help ============================= // == Account Help =============================
@@ -184,188 +184,188 @@ function helpCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function showMainHelpMessage(client) { function showMainHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderHelpMainList"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderHelpMainList")));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Use /help <category> for commands and info. Example: {ALTCOLOUR}/help vehicle`); messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Use /help <category> for commands and info. Example: {ALTCOLOUR}/help vehicle`);
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Help Categories: [#A9A9A9]account, command, vehicle, job, chat, rules, website, animation`); messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Help Categories: [#A9A9A9]account, command, vehicle, job, chat, rules, website, animation`);
messagePlayerNormal(client, `{clanOrange}• [#A9A9A9]skin, mechanic, dealership, discord, colour, keybind`); messagePlayerNormal(client, `{clanOrange}• [#A9A9A9]skin, mechanic, dealership, discord, colour, keybind`);
} }
// =========================================================================== // ===========================================================================
function showAccountHelpMessage(client) { function showAccountHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderAccountHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderAccountHelp")));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Do not share your password with anybody else.`);
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Use {ALTCOLOUR}/changepass{MAINCOLOUR} to change your password.`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "AccountHelp", 0));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Some settings you can use: {ALTCOLOUR}/gui, /logo, /iplogin, /autolastchar, /2fa, /loginalert`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "AccountHelp", 1, `{ALTCOLOUR}/changepass{MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "AccountHelp", 2, `{ALTCOLOUR}/gui, /logo, /iplogin, /autolastchar, /2fa, /loginalert{MAINCOLOUR}`));
} }
// =========================================================================== // ===========================================================================
function showVehicleHelpMessage(client) { function showVehicleHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderVehicleHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderVehicleHelp")));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Visit dealerships to buy new vehicles (Use {ALTCOLOUR}/help dealership {MAINCOLOUR}for more info.)`);
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Some commands: {ALTCOLOUR}/lock, /engine, /lights, /trunk, /rentveh, /buyveh, /rentprice, /buyprice`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 0, `{ALTCOLOUR}/help dealership{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Your personal vehicles will save wherever you or somebody else leaves them!`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 1, `{ALTCOLOUR}/lock, /engine, /lights, /trunk, /rentveh, /buyveh, /rentprice, /buyprice{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Visit a mechanic garage to repair, colour, and tune up your car! {ALTCOLOUR}/help mechanic {MAINCOLOUR} for info`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 2));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Don't forget to register and insure your vehicle! Use {ALTCOLOUR}/gps {MAINCOLOUR}to find a DMV for this.`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 3, `{ALTCOLOUR}/help mechanic{MAINCOLOUR}`));
} }
// =========================================================================== // ===========================================================================
function showVehicleDealershipHelpMessage(client) { function showVehicleDealershipHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderVehicleDealershipHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderVehicleDealershipHelp")));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Visit a vehicle dealer to buy new vehicles. Use {ALTCOLOUR}/gps {MAINCOLOUR}to find one.`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleDealershipHelp", 0, `{ALTCOLOUR}/gps{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}At the dealer, simply enter a car you want to buy, and the price will be shown to you`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleDealershipHelp", 1));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}If you want to buy the vehicle and have enough money, use {ALTCOLOUR}/buyveh {MAINCOLOUR}and you will be given keys`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleDealershipHelp", 1, `{ALTCOLOUR}/buyveh{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}A new car for sale will appear when you drive away from the dealer.`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleDealershipHelp", 2));
} }
// =========================================================================== // ===========================================================================
function showJobHelpMessage(client) { function showJobHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderJobHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderJobHelp")));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Visit job locations get a job and earn money. Look for yellow spots on the map`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "JobHelp", 0));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}At a job location, use {ALTCOLOUR}/takejob {MAINCOLOUR}to get the job. Use {ALTCOLOUR}/quitjob {MAINCOLOUR}to quit your job`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "JobHelp", 1, `{ALTCOLOUR}/takejob{MAINCOLOUR}`, `{ALTCOLOUR}/quitjob{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Use {ALTCOLOUR}/startwork {MAINCOLOUR}to begin working. You can also get a job {ALTCOLOUR}/uniform and {ALTCOLOUR}/equipment`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "JobHelp", 2, `{ALTCOLOUR}/lock{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Most job vehicles are locked. Use {ALTCOLOUR}/lock {MAINCOLOUR}near one to enter it.`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "JobHelp", 3));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}When entering a job vehicle, information on how to do the job will be shown to you.`);
} }
// =========================================================================== // ===========================================================================
function showChatHelpMessage(client) { function showChatHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderChatHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderChatHelp")));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}There are two main types of chat: out-of-character (OOC) and in-character (IC)`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "ChatHelp", 0, `{ALTCOLOUR}/buy {MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Mixing these two types is not proper roleplay. See {ALTCOLOUR}/rules {MAINCOLOUR}for info.`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "ChatHelp", 1, `{ALTCOLOUR}/rules{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Some chat commands: {ALTCOLOUR}/dm /whisper /talk /shout /me.`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "ChatHelp", 2, `{ALTCOLOUR}/dm /whisper /talk /shout /me{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Some have shorter names available ({ALTCOLOUR}/t {MAINCOLOUR}for talk, {ALTCOLOUR}/s {MAINCOLOUR}for shout, etc)`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "ChatHelp", 3, `{ALTCOLOUR}/t{MAINCOLOUR}`, `{ALTCOLOUR}/s{MAINCOLOUR}`));
} }
// =========================================================================== // ===========================================================================
function showRulesHelpMessage(client) { function showRulesHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderServerRulesList"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderServerRulesList")));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 0)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 0));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 1)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 1));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 2)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 2));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 3)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 3));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 4), `{ALTCOLOUR}/help language {MAINCOLOUR}`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 4), `{ALTCOLOUR}/help language {MAINCOLOUR}`);
} }
// =========================================================================== // ===========================================================================
function showWebsiteHelpMessage(client) { function showWebsiteHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderWebsiteInfo"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderWebsiteInfo")));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}${server.getRule("Website")}`); messagePlayerHelpContent(client, `{MAINCOLOUR}${server.getRule("Website")}`);
} }
// =========================================================================== // ===========================================================================
function showDiscordHelpMessage(client) { function showDiscordHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderDiscordInfo"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderDiscordInfo")));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}${server.getRule("Website")}`); messagePlayerHelpContent(client, `{MAINCOLOUR}${server.getRule("Discord")}`);
} }
// =========================================================================== // ===========================================================================
function showAnimationHelpMessage(client) { function showAnimationHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderAnimationHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderAnimationHelp")));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "AnimationHelp", 0, `{ALTCOLOUR}/buy {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "AnimationHelp", 0, `{ALTCOLOUR}/buy {MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "AnimationHelp", 1, `{ALTCOLOUR}/an {MAINCOLOUR}`, `{ALTCOLOUR}/anim {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "AnimationHelp", 1, `{ALTCOLOUR}/an {MAINCOLOUR}`, `{ALTCOLOUR}/anim {MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "AnimationHelp", 2, `{ALTCOLOUR}/animlist {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "AnimationHelp", 2, `{ALTCOLOUR}/animlist {MAINCOLOUR}`));
} }
// =========================================================================== // ===========================================================================
function showClothesHelpMessage(client) { function showClothesHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderSkinHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderSkinHelp")));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 0, `{ALTCOLOUR}/buy {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 0, `{ALTCOLOUR}/buy {MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 1, `{ALTCOLOUR}/help items {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 1, `{ALTCOLOUR}/help items {MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 2)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 2));
} }
// =========================================================================== // ===========================================================================
function showBindKeysHelpMessage(client) { function showBindKeysHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderBindableKeysHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderBindableKeysHelp")));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 0, `{ALTCOLOUR}/keybinds {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 0, `{ALTCOLOUR}/keybinds {MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 1, `{ALTCOLOUR}/bindkey {MAINCOLOUR}`, `{ALTCOLOUR}/unbindkey {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 1, `{ALTCOLOUR}/bindkey {MAINCOLOUR}`, `{ALTCOLOUR}/unbindkey {MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 2, `{ALTCOLOUR}K {MAINCOLOUR}`, `{ALTCOLOUR}L {MAINCOLOUR}`, `{ALTCOLOUR}J {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 2, `{ALTCOLOUR}K{MAINCOLOUR}`, `{ALTCOLOUR}L{MAINCOLOUR}`, `{ALTCOLOUR}J{MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 3, `{ALTCOLOUR}I {MAINCOLOUR}`, `{ALTCOLOUR}1-9 {MAINCOLOUR}`, `{ALTCOLOUR}0 {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 3, `{ALTCOLOUR}I{MAINCOLOUR}`, `{ALTCOLOUR}1-9{MAINCOLOUR}`, `{ALTCOLOUR}0{MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 4, `{ALTCOLOUR}U {MAINCOLOUR}`, `{ALTCOLOUR}O {MAINCOLOUR}`, `{ALTCOLOUR}P {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "KeyBindHelp", 4, `{ALTCOLOUR}U{MAINCOLOUR}`, `{ALTCOLOUR}O{MAINCOLOUR}`, `{ALTCOLOUR}P{MAINCOLOUR}`));
} }
// =========================================================================== // ===========================================================================
function showBusinessHelpMessage(client) { function showBusinessHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderBusinessHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderBusinessHelp")));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "BusinessHelp", 0)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "BusinessHelp", 0));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "BusinessHelp", 1)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "BusinessHelp", 1));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "BusinessHelp", 2, `{ALTCOLOUR}/bizorder, /bizlock, /bizlights, /radiostation, /bizitemprice, /bizbuyprice, /bizfee, /biztill, /bizwithdraw, /bizdeposit`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "BusinessHelp", 2, `{ALTCOLOUR}/bizorder, /bizlock, /bizlights, /radiostation, /bizitemprice, /bizbuyprice, /bizfee, /biztill, /bizwithdraw, /bizdeposit`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "BusinessHelp", 3)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "BusinessHelp", 3));
} }
// =========================================================================== // ===========================================================================
function showClanHelpMessage(client) { function showClanHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderClanHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderClanHelp")));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "ClanHelp", 0)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "ClanHelp", 0));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "ClanHelp", 1)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "ClanHelp", 1));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "ClanHelp", 2, `{ALTCOLOUR}/clan, /clanmotd, /clanname, /clanowner, /clanhouse, /clanbiz, /claninvite, /clanuninvite, /clansetrank`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "ClanHelp", 2, `{ALTCOLOUR}/clan, /clanmotd, /clanname, /clanowner, /clanhouse, /clanbiz, /claninvite, /clanuninvite, /clansetrank`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "ClanHelp", 3, `{ALTCOLOUR}/clanranks, /clanflags, /clanaddrank, /clandelrank, /clanaddrankflag, /clandelrankflag, /clanaddmemberflag, /clandelmemberflag`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "ClanHelp", 3, `{ALTCOLOUR}/clanranks, /clanflags, /clanaddrank, /clandelrank, /clanaddrankflag, /clandelrankflag, /clanaddmemberflag, /clandelmemberflag`));
} }
// =========================================================================== // ===========================================================================
function showRadioHelpMessage(client) { function showRadioHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderRadioHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderRadioHelp")));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RadioHelp", 0, `{ALTCOLOUR}/radiostation {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "RadioHelp", 0, `{ALTCOLOUR}/radiostation {MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RadioHelp", 1, `{ALTCOLOUR}/radiostations {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "RadioHelp", 1, `{ALTCOLOUR}/radiostations {MAINCOLOUR}`));
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RadioHelp", 2, `{ALTCOLOUR}/radiovolume {MAINCOLOUR}`)); messagePlayerHelpContent(client, getGroupedLocaleString(client, "RadioHelp", 2, `{ALTCOLOUR}/radiovolume {MAINCOLOUR}`));
} }
// =========================================================================== // ===========================================================================
function showWealthAndTaxHelpMessage(client) { function showWealthAndTaxHelpMessage(client) {
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderWealthandTaxHelp"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderWealthandTaxHelp")));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Your taxes on payday are ${100*getGlobalConfig().economy.incomeTaxRate}% of your calculated wealth.`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "WealthAndTaxHelp", 0, `{ALTCOLOUR}${100*getGlobalConfig().economy.incomeTaxRate}%{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Your calculated wealth is a total sum based on how many vehicles, houses, and businesses you have.`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "WealthAndTaxHelp", 1));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Each vehicle is {ALTCOLOUR}${getGlobalConfig().economy.upKeepCosts.upKeepPerVehicle}, {MAINCOLOUR}each house is {ALTCOLOUR}${getGlobalConfig().economy.upKeepCosts.upKeepPerHouse}, {MAINCOLOUR}and each business is {ALTCOLOUR}${getGlobalConfig().economy.upKeepCosts.upKeepPerBusiness}`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "WealthAndTaxHelp", 2, `{ALTCOLOUR}${getGlobalConfig().economy.upKeepCosts.upKeepPerVehicle}{MAINCOLOUR}`, `{ALTCOLOUR}${getGlobalConfig().economy.upKeepCosts.upKeepPerHouse}{MAINCOLOUR}`, `{ALTCOLOUR}${getGlobalConfig().economy.upKeepCosts.upKeepPerBusiness}{MAINCOLOUR}`));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Use {ALTCOLOUR}/wealth {MAINCOLOUR}to see your current wealth, and {ALTCOLOUR}/tax {MAINCOLOUR}to see how much you'll pay in tax each payday`); messagePlayerHelpContent(client, getGroupedLocaleString(client, "WealthAndTaxHelp", 3, `{ALTCOLOUR}/wealth{MAINCOLOUR}`, `{ALTCOLOUR}/tax{MAINCOLOUR}`));
} }
// =========================================================================== // ===========================================================================
function showCommandHelpMessage(client, commandName) { function showCommandHelpMessage(client, commandName) {
if(!commandName) { if(!commandName) {
messagePlayerSyntax(client, `${getCommandSyntaxText("help")}command <command name>`); messagePlayerSyntax(client, `${getCommandSyntaxText("help")}command <command name>`);
return false; return false;
} }
commandName = toLowerCase(commandName); commandName = toLowerCase(commandName);
commandName = commandName.trim(); commandName = commandName.trim();
if(commandName.slice(0, 1) == "/") { if(commandName.slice(0, 1) == "/") {
commandName = commandName.slice(1); commandName = commandName.slice(1);
} }
let command = getCommandData(commandName); let command = getCommandData(commandName);
let aliases = getCommandAliasesNames(command); let aliases = getCommandAliasesNames(command);
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderCommandInfo", commandName))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderCommandInfo", commandName)));
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Description: ${command.description}`); messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Description: ${command.helpDescription}`);
if(aliases.length > 0) { if(aliases.length > 0) {
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Aliases: ${aliases.join(", ")}`); messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Aliases: ${aliases.join(", ")}`);
} else { } else {
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Aliases: (None)`); messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Aliases: (None)`);
} }
//messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`); //messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`);
//if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("BasicModeration"))) { //if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("BasicModeration"))) {
// messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`); // messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Usable on Discord: ${getYesNoFromBool(command.allowOnDiscord)}`);
//} //}
} }
// =========================================================================== // ===========================================================================
@@ -380,7 +380,7 @@ function showCommandHelpMessage(client, commandName) {
* *
*/ */
function helpGetCarCommand(command, params, client) { function helpGetCarCommand(command, params, client) {
messagePlayerAlert(client, `You can buy a car by visiting a vehicle dealership. Use {ALTCOLOUR}/help vehicle {MAINCOLOUR}for more info.`); messagePlayerAlert(client, getLocaleString(client, "CarCommandHelp", `{ALTCOLOUR}/help vehicle{MAINCOLOUR}`));
} }
// =========================================================================== // ===========================================================================
@@ -395,7 +395,8 @@ function helpGetCarCommand(command, params, client) {
* *
*/ */
function helpGetSkinCommand(command, params, client) { function helpGetSkinCommand(command, params, client) {
messagePlayerAlert(client, `You can change your skin by visiting a clothes store. Use {ALTCOLOUR}/help skin {MAINCOLOUR}for more info.`); messagePlayerAlert(client, getLocaleString(client, "SkinCommandHelp", `{ALTCOLOUR}/help skin{MAINCOLOUR}`));
messagePlayerAlert(client, ``);
} }
// =========================================================================== // ===========================================================================

Some files were not shown because too many files have changed in this diff Show More