Jump to content

IIYAMA

Moderators
  • Posts

    6,063
  • Joined

  • Last visited

  • Days Won

    209

Everything posted by IIYAMA

  1. Hi, Is the function getPlayerCommunityID able to use? and yes it does exist, only it isn't on the wiki.
  2. I am telling you, that it isn't going to work what ever you do. Unless you try to understand the meaning of what I just said. If you do not understand (my)English, then find somebody who can translate it for you.
  3. You have to scroll more down: (client part) setWeaponProperty Syntax (weapon creation) bool setWeaponProperty ( weapon theWeapon, string strProperty, value theValue ) Required Arguments theWeapon: the weapon to change the property of. strProperty: the property to edit such as damage per hit ( "damage" ): "weapon_range" - float "target_range" - float "accuracy" - float "damage" - int FROM VERSION 1.4 r6693 ONWARDS "fire_rotation" - vector - For aligning fire direction with model theValue: The value to set the property to. Returns Returns true if the property was set. Requirements Minimum supported server n/a Minimum supported client 1.3.0-9.04555
  4. (most) weapon property's don't work custom weapons. I already found out that problem when I tried them on their release. They haven't fixed them...... yet....... I also reported a related bug on 2013-07-13. https://bugs.multitheftauto.com/view.php?id=7706 Those weapons where suppose to be serverside too........ But it seems they lost their interest in custom weapons. It is shame.
  5. Especially line 5, will totally destroy the network traffic. Always check if elementdata must be overwritten or not. Overwrite elementdata with the same value is stupid, unless you are editing the same elementdata key on the other side too.
  6. Every resource is using it's own showCursor management. They all can enable it, but they all must disabled it in order to hide it. Short saying: They have no influences at each other.
  7. IIYAMA

    Return values

    It can't be done, because of the network. Code can't wait for network traffic. You can pause the code if you want, but you still need to return the value back with another trigger and resume the code. The only trouble with that is, when a packet failed/serverside code failed, your code stays frozen and is still in the memory. The best thing you can do is using two functions.
  8. Use a lua table, to manage the data. Save the dat(to xml) a ones in the 30 min and when you shut it down.
  9. By reducing requests of your database. ( make updates after a while )
  10. You are a funny guy. Showing me a few lines and telling me the code I posted doesn't work, your other code doesn't work what about that? and you are defining source as argument, source isn't meant as argument.
  11. function ( source ) if getElementData(localPlayer,"state") == "alive"or getElementData(localPlayer,"state") == "Training" then local playerVehicle = getPedOccupiedVehicle(localPlayer) if playerVehicle then local vehicleHealth = getElementHealth ( playerVehicle ) local vehicleSpeed = getElementVelocity ( playerVehicle )
  12. function ( source ) for index,player in ipairs(getElementsByType("player")) do if getElementData(player,"state") == "alive"or getElementData(player,"state") == "Training" then local playerVehicle = getPedOccupiedVehicle(player) local vehicleHealth = getElementHealth ( playerVehicle ) local vehicleSpeed = getElementVelocity ( playerVehicle )
  13. IIYAMA

    "Or" function

    debug it manually then. I can't help you if you aren't debugging your variables and elementdata.
  14. I would suggest. (how I created it) When you hit somebody, you trigger a server event. You put a delay between them, like 200 ms per update. -- to save a lot of data transfer. If you use elementdata, you will be using more depending on the player count in the server and you will be constantly using the network. The next step, which you are asking for in this post. - Start exporting your data from resource to resource. (which I do recommend, because of the clean way of doing) - You can also use triggerEvent, like MrBrutus said. But that one uses a lot of memory even it isn't a bad idea. - Also you use setElementData without synchronisation, which will not use and bandwidth. (but it also creates trash, you have to delete it when you stop the resource) That are your options.
  15. IIYAMA

    "Or" function

    if itemName == "Box of Matches" -- if itemName is Box of Matches and ( -- start a new priority ( ( -- tonumber converts it to a number, tonumber(getElementData(localPlayer, "Wood Pile") ) or 0) > 0 or -- if not a number then it is 0 and check if it is higher then 0. ( -- same here tonumber(getElementData(localPlayer, "Wooden Sticks") ) or 0) > 0 ) -- end priority then
  16. IIYAMA

    "Or" function

    then something is wrong with your elementdata. This should work: (your code, not changed at all) if itemName == "Box of Matches" and (getElementData(getLocalPlayer(), "Wood Pile") == 0 or getElementData(getLocalPlayer(), "Wooden Sticks") == 0) then
  17. If you want real 3D, use these functions. https://wiki.multitheftauto.com/wiki/Dx ... rialLine3D https://wiki.multitheftauto.com/wiki/Dx ... tionLine3D
  18. IIYAMA

    help database

    1 thing is confusing me and that is the sql database from the drift folder and the accountdata. What are you saving in the drift folder and what are you saving at the local mta database? Because the sql database can save exactly the same as the local mta database, but better with more functionality. AFAIK the annoying thing about sql is that you have to start it up with a resource, but in this case it is only for this resource.
  19. IIYAMA

    help database

    https://wiki.multitheftauto.com/wiki/GetAccounts https://wiki.multitheftauto.com/wiki/GetRealTime https://wiki.multitheftauto.com/wiki/SetAccountData http://lua-users.org/wiki/TableLibraryTutorial > table.sort(table [, comp])
  20. IIYAMA

    dxDrawText help

    (getElementData(localPlayer, "driftrank") or "DRIFT\n\nGood Drifter for Beginner!") ( ) if getElementData(localPlayer, "driftrank") is set true, you still will have this error.
  21. yes there is one. ProssLineOfSight can detect tires. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight But it also require enough lua knowledge to make a check system to find out your answer. I hope you have that else you can forget it.
  22. Well it may not change the speed of the working of the code. Scripts will be loaded into the ram and will be executed. Afaik the code will be read and filtered by useful code. If you want to know if it uses less ram, check the performance browser. If you want to change the speed of the code, you need to speed up the accessing your variables and reduce the amount of functions that will be called.
  23. Have fun using google translate.
  24. Just copy the html. <tr> <td style="background: #000000; width:42px; height:42px; border:1px solid black;">0</td> <td style="background: #F5F5F5; width:42px; height:42px; border:1px solid black; color:black;">1</td> <td style="background: #2A77A1; width:42px; height:42px; border:1px solid black;">2</td> <td style="background: #840410; width:42px; height:42px; border:1px solid black;">3</td> <td style="background: #263739; width:42px; height:42px; border:1px solid black;">4</td> <td style="background: #86446E; width:42px; height:42px; border:1px solid black;">5</td> <td style="background: #D78E10; width:42px; height:42px; border:1px solid black;">6</td> <td style="background: #4C75B7; width:42px; height:42px; border:1px solid black;">7</td> <td style="background: #BDBEC6; width:42px; height:42px; border:1px solid black;">8</td> <td style="background: #5E7072; width:42px; height:42px; border:1px solid black;">9</td> <td style="background: #46597A; width:42px; height:42px; border:1px solid black;">10</td> <td style="background: #656A79; width:42px; height:42px; border:1px solid black;">11</td> <td style="background: #5D7E8D; width:42px; height:42px; border:1px solid black;">12</td> <td style="background: #58595A; width:42px; height:42px; border:1px solid black;">13</td> <td style="background: #D6DAD6; width:42px; height:42px; border:1px solid black;">14</td> <td style="background: #9CA1A3; width:42px; height:42px; border:1px solid black;">15</td> <td style="background: #335F3F; width:42px; height:42px; border:1px solid black;">16</td> <td style="background: #730E1A; width:42px; height:42px; border:1px solid black;">17</td> <td style="background: #7B0A2A; width:42px; height:42px; border:1px solid black;">18</td> <td style="background: #9F9D94; width:42px; height:42px; border:1px solid black;">19</td> </tr> <tr> <td style="background: #3B4E78; width:42px; height:42px; border:1px solid black;">20</td> <td style="background: #732E3E; width:42px; height:42px; border:1px solid black;">21</td> <td style="background: #691E3B; width:42px; height:42px; border:1px solid black;">22</td> <td style="background: #96918C; width:42px; height:42px; border:1px solid black;">23</td> <td style="background: #515459; width:42px; height:42px; border:1px solid black;">24</td> <td style="background: #3F3E45; width:42px; height:42px; border:1px solid black;">25</td> <td style="background: #A5A9A7; width:42px; height:42px; border:1px solid black;">26</td> <td style="background: #635C5A; width:42px; height:42px; border:1px solid black;">27</td> <td style="background: #3D4A68; width:42px; height:42px; border:1px solid black;">28</td> <td style="background: #979592; width:42px; height:42px; border:1px solid black;">29</td> <td style="background: #421F21; width:42px; height:42px; border:1px solid black;">30</td> <td style="background: #5F272B; width:42px; height:42px; border:1px solid black;">31</td> <td style="background: #8494AB; width:42px; height:42px; border:1px solid black;">32</td> <td style="background: #767B7C; width:42px; height:42px; border:1px solid black;">33</td> <td style="background: #646464; width:42px; height:42px; border:1px solid black;">34</td> <td style="background: #5A5752; width:42px; height:42px; border:1px solid black;">35</td> <td style="background: #252527; width:42px; height:42px; border:1px solid black;">36</td> <td style="background: #2D3A35; width:42px; height:42px; border:1px solid black;">37</td> <td style="background: #93A396; width:42px; height:42px; border:1px solid black;">38</td> <td style="background: #6D7A88; width:42px; height:42px; border:1px solid black;">39</td> </tr> <tr> <td style="background: #221918; width:42px; height:42px; border:1px solid black;">40</td> <td style="background: #6F675F; width:42px; height:42px; border:1px solid black;">41</td> <td style="background: #7C1C2A; width:42px; height:42px; border:1px solid black;">42</td> <td style="background: #5F0A15; width:42px; height:42px; border:1px solid black;">43</td> <td style="background: #193826; width:42px; height:42px; border:1px solid black;">44</td> <td style="background: #5D1B20; width:42px; height:42px; border:1px solid black;">45</td> <td style="background: #9D9872; width:42px; height:42px; border:1px solid black;">46</td> <td style="background: #7A7560; width:42px; height:42px; border:1px solid black;">47</td> <td style="background: #989586; width:42px; height:42px; border:1px solid black;">48</td> <td style="background: #ADB0B0; width:42px; height:42px; border:1px solid black;">49</td> <td style="background: #848988; width:42px; height:42px; border:1px solid black;">50</td> <td style="background: #304F45; width:42px; height:42px; border:1px solid black;">51</td> <td style="background: #4D6268; width:42px; height:42px; border:1px solid black;">52</td> <td style="background: #162248; width:42px; height:42px; border:1px solid black;">53</td> <td style="background: #272F4B; width:42px; height:42px; border:1px solid black;">54</td> <td style="background: #7D6256; width:42px; height:42px; border:1px solid black;">55</td> <td style="background: #9EA4AB; width:42px; height:42px; border:1px solid black;">56</td> <td style="background: #9C8D71; width:42px; height:42px; border:1px solid black;">57</td> <td style="background: #6D1822; width:42px; height:42px; border:1px solid black;">58</td> <td style="background: #4E6881; width:42px; height:42px; border:1px solid black;">59</td> </tr> <tr> <td style="background: #9C9C98; width:42px; height:42px; border:1px solid black;">60</td> <td style="background: #917347; width:42px; height:42px; border:1px solid black;">61</td> <td style="background: #661C26; width:42px; height:42px; border:1px solid black;">62</td> <td style="background: #949D9F; width:42px; height:42px; border:1px solid black;">63</td> <td style="background: #A4A7A5; width:42px; height:42px; border:1px solid black;">64</td> <td style="background: #8E8C46; width:42px; height:42px; border:1px solid black;">65</td> <td style="background: #341A1E; width:42px; height:42px; border:1px solid black;">66</td> <td style="background: #6A7A8C; width:42px; height:42px; border:1px solid black;">67</td> <td style="background: #AAAD8E; width:42px; height:42px; border:1px solid black;">68</td> <td style="background: #AB988F; width:42px; height:42px; border:1px solid black;">69</td> <td style="background: #851F2E; width:42px; height:42px; border:1px solid black;">70</td> <td style="background: #6F8297; width:42px; height:42px; border:1px solid black;">71</td> <td style="background: #585853; width:42px; height:42px; border:1px solid black;">72</td> <td style="background: #9AA790; width:42px; height:42px; border:1px solid black;">73</td> <td style="background: #601A23; width:42px; height:42px; border:1px solid black;">74</td> <td style="background: #20202C; width:42px; height:42px; border:1px solid black;">75</td> <td style="background: #A4A096; width:42px; height:42px; border:1px solid black;">76</td> <td style="background: #AA9D84; width:42px; height:42px; border:1px solid black;">77</td> <td style="background: #78222B; width:42px; height:42px; border:1px solid black;">78</td> <td style="background: #0E316D; width:42px; height:42px; border:1px solid black;">79</td> </tr> <tr> <td style="background: #722A3F; width:42px; height:42px; border:1px solid black;">80</td> <td style="background: #7B715E; width:42px; height:42px; border:1px solid black;">81</td> <td style="background: #741D28; width:42px; height:42px; border:1px solid black;">82</td> <td style="background: #1E2E32; width:42px; height:42px; border:1px solid black;">83</td> <td style="background: #4D322F; width:42px; height:42px; border:1px solid black;">84</td> <td style="background: #7C1B44; width:42px; height:42px; border:1px solid black;">85</td> <td style="background: #2E5B20; width:42px; height:42px; border:1px solid black;">86</td> <td style="background: #395A83; width:42px; height:42px; border:1px solid black;">87</td> <td style="background: #6D2837; width:42px; height:42px; border:1px solid black;">88</td> <td style="background: #A7A28F; width:42px; height:42px; border:1px solid black;">89</td> <td style="background: #AFB1B1; width:42px; height:42px; border:1px solid black;">90</td> <td style="background: #364155; width:42px; height:42px; border:1px solid black;">91</td> <td style="background: #6D6C6E; width:42px; height:42px; border:1px solid black;">92</td> <td style="background: #0F6A89; width:42px; height:42px; border:1px solid black;">93</td> <td style="background: #204B6B; width:42px; height:42px; border:1px solid black;">94</td> <td style="background: #2B3E57; width:42px; height:42px; border:1px solid black;">95</td> <td style="background: #9B9F9D; width:42px; height:42px; border:1px solid black;">96</td> <td style="background: #6C8495; width:42px; height:42px; border:1px solid black;">97</td> <td style="background: #4D5D60; width:42px; height:42px; border:1px solid black;">98</td> <td style="background: #AE9B7F; width:42px; height:42px; border:1px solid black;">99</td> </tr> <tr> <td style="background: #406C8F; width:42px; height:42px; border:1px solid black;">100</td> <td style="background: #1F253B; width:42px; height:42px; border:1px solid black;">101</td> <td style="background: #AB9276; width:42px; height:42px; border:1px solid black;">102</td> <td style="background: #134573; width:42px; height:42px; border:1px solid black;">103</td> <td style="background: #96816C; width:42px; height:42px; border:1px solid black;">104</td> <td style="background: #64686A; width:42px; height:42px; border:1px solid black;">105</td> <td style="background: #105082; width:42px; height:42px; border:1px solid black;">106</td> <td style="background: #A19983; width:42px; height:42px; border:1px solid black;">107</td> <td style="background: #385694; width:42px; height:42px; border:1px solid black;">108</td> <td style="background: #525661; width:42px; height:42px; border:1px solid black;">109</td> <td style="background: #7F6956; width:42px; height:42px; border:1px solid black;">110</td> <td style="background: #8C929A; width:42px; height:42px; border:1px solid black;">111</td> <td style="background: #596E87; width:42px; height:42px; border:1px solid black;">112</td> <td style="background: #473532; width:42px; height:42px; border:1px solid black;">113</td> <td style="background: #44624F; width:42px; height:42px; border:1px solid black;">114</td> <td style="background: #730A27; width:42px; height:42px; border:1px solid black;">115</td> <td style="background: #223457; width:42px; height:42px; border:1px solid black;">116</td> <td style="background: #640D1B; width:42px; height:42px; border:1px solid black;">117</td> <td style="background: #A3ADC6; width:42px; height:42px; border:1px solid black;">118</td> <td style="background: #695853; width:42px; height:42px; border:1px solid black;">119</td> </tr> <tr> <td style="background: #9B8B80; width:42px; height:42px; border:1px solid black;">120</td> <td style="background: #620B1C; width:42px; height:42px; border:1px solid black;">121</td> <td style="background: #5B5D5E; width:42px; height:42px; border:1px solid black;">122</td> <td style="background: #624428; width:42px; height:42px; border:1px solid black;">123</td> <td style="background: #731827; width:42px; height:42px; border:1px solid black;">124</td> <td style="background: #1B376D; width:42px; height:42px; border:1px solid black;">125</td> <td style="background: #EC6AAE; width:42px; height:42px; border:1px solid black;">126</td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> <td style="background: #FFFFFF; width:42px; height:42px; border:0px solid black;"></td> </tr> and use this site to convert the hex colors to rgb. http://www.javascripter.net/faq/rgbtohex.htm
  25. Will not work and can't be prevented.
×
×
  • Create New...