Guest User

Mira

a guest
May 21st, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 107.31 KB | None | 0 0
  1. taxis = {{"VRock Hotel","50",2623.02,2294.83,10.5},{"Wang Cars","100",-1996.9,305.363,34.588},{"Otto's Autos","150",-1639.718,1202.934,6.917},{"Los Santos ATM","100",2170.597,-1165.22,24.388},{"Binco Clothes Shop","150",-2379.37,912.9,45.028},{"SUPER TUBE!","50",2725.58,-1833.82,717},{"Ammu Nation Las Venturas","100",2571.6875,2058.44,10.53},{"Anchor Boat Missions","150",-1607.51,161.76,3.55},{"Hippy Bikes - Bike shop","150",-1527.76,509.23,7.17},{"Nametagshop","200",-1905.97,713.60,45.29},{"Taxi Station SF","50",-1991.08,103.03,27.53}}
  2. animations = {{"Wank","PAULNMAC","wank_loop"},{"Piss","PAULNMAC","Piss_loop"},{"Sunbathing","SUNBATHE","ParkSit_M_IdleB"},{"Sit","Ped","SEAT_idle"},{"Bitch Slap","misc","bitchslap"}}
  3. ammunation = {{"Brass Knuckle","1","15",1},{"Golf Club","1","20",2},{"Chainsaw","1","500",9},{"Pistol","51","100",22},{"Silenced","51","125",23},{"Deagle","77","300",24},{"Shotgun","10","100",25},{"Sawn-Off","20","100",26},{"SPAZ-12","70","500",27},{"UZI","100","125",28},{"MP5","120","300",29},{"Tec-9","100","100",32},{"AK-47","60","200",30},{"M4","50","200",31},{"Sniper","10","150",34},{"Country Sniper","10","100",33},{"Rocket","1","1000",35},{"Apple x1","1","15",16},{"Apple","10","125",16},{"Gas x1","1","25",17},{"Gas","10","200",17},{"Flowers","1","1",14},{"Knife","1","3000",4}}
  4. addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),
  5. function()
  6. -- login window
  7. theGameMenuTabPanelVHTabHouseNumberInfoLabel = guiCreateLabel (0,0,0,0," -- HOUSE NUMBER -- ",false,nil)
  8.  
  9. jasmodLoginWindow = guiCreateWindow(0.35875,0.285,0.28375,0.4167,"JasperNL=D Roleplay",false)
  10. --toggleControl ("chatbox",false)
  11. guiWindowSetMovable(jasmodLoginWindow,false)
  12. guiWindowSetSizable(jasmodLoginWindow,false)
  13. jasmodLoginWindowUsernameLabel = guiCreateLabel(0.0352,0.108,0.859,0.112,"Username",true,jasmodLoginWindow)
  14. guiLabelSetColor(jasmodLoginWindowUsernameLabel,255,255,255)
  15. guiLabelSetVerticalAlign(jasmodLoginWindowUsernameLabel,"center")
  16. guiLabelSetHorizontalAlign(jasmodLoginWindowUsernameLabel,"left",false)
  17. jasmodLoginWindowUsernameEdit = guiCreateEdit(0.0749,0.248,0.8238,0.124,"",true,jasmodLoginWindow)
  18. guiEditSetMaxLength(jasmodLoginWindowUsernameEdit,20)
  19. jasmodLoginWindowPasswordEdit = guiCreateEdit(0.0749,0.54,0.8238,0.124,"",true,jasmodLoginWindow)
  20. guiEditSetMasked(jasmodLoginWindowPasswordEdit,true)
  21. guiEditSetMaxLength(jasmodLoginWindowPasswordEdit,20)
  22. jasmodLoginWindowPasswordLabel = guiCreateLabel(0.0352,0.396,0.8062,0.12,"Password",true,jasmodLoginWindow)
  23. guiLabelSetColor(jasmodLoginWindowPasswordLabel,255,255,255)
  24. guiLabelSetVerticalAlign(jasmodLoginWindowPasswordLabel,"center")
  25. guiLabelSetHorizontalAlign(jasmodLoginWindowPasswordLabel,"left",false)
  26. jasmodLoginWindowLoginButton = guiCreateButton(0.0441,0.704,0.9031,0.108,"Log in",true,jasmodLoginWindow)
  27. jasmodLoginWindowRegisterButton = guiCreateButton(0.0441,0.836,0.9031,0.108,"Register",true,jasmodLoginWindow)
  28. guiSetVisible (jasmodLoginWindow, false )
  29.  
  30. --showCursor (true,true)
  31. --showChat (false)
  32. --setCameraMatrix (-2770.24,-1133.92,38.14,-2881.06,-907.75,9.301) Oude cam in SF
  33. --setCameraMatrix (966.36157226563,2589.4494628906,10.156999588013,966.626953125,2588.5498046875,10.503839492798,0,70)
  34. --showPlayerHudComponent ("radar",false)
  35. fadeCamera (true,2.5)
  36.  
  37. -- Nametag Shop
  38. theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true)
  39. guiWindowSetSizable(theNametagShopWindow,false)
  40. theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow)
  41. guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255)
  42. guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top")
  43. guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false)
  44. theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow)
  45. guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255)
  46. guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top")
  47. guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false)
  48. theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow)
  49. guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255)
  50. guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top")
  51. guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false)
  52. theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow)
  53. theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow)
  54. theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow)
  55. guiEditSetMaxLength (theNametagShopWindowRedEdit,3)
  56. guiEditSetMaxLength (theNametagShopWindowGreenEdit,3)
  57. guiEditSetMaxLength (theNametagShopWindowBlueEdit,3)
  58. theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow)
  59. guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255)
  60. guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center")
  61. guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false)
  62. theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow)
  63. theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow)
  64. guiSetVisible(theNametagShopWindow,false)
  65.  
  66. -- informatie window
  67. jasmodInfoWindow = guiCreateWindow(0.285,0.0267,0.4563,0.29,"Roleplay Info Window",true)
  68. guiSetVisible (jasmodInfoWindow,false)
  69. jasmodInfoWindowExitButton = guiCreateButton(0.0247,0.8333,0.9507,0.1149,"Ok",true,jasmodInfoWindow)
  70. jasmodInfoWindowMemo = guiCreateMemo(0.0247,0.1149,0.9507,0.6954,"BlahBlah",true,jasmodInfoWindow)
  71. guiMemoSetReadOnly(jasmodInfoWindowMemo,true)
  72.  
  73. -- character select window
  74. jasmodCharSelectWindow = guiCreateWindow(0.75,0,0.25,1,"Select your character!",true)
  75. guiSetVisible (jasmodCharSelectWindow,false)
  76. guiWindowSetMovable(jasmodCharSelectWindow,false)
  77. guiWindowSetSizable(jasmodCharSelectWindow,false)
  78. jasmodCharSelectNewCharacterButton = guiCreateButton(0.045,0.04,0.89,0.05,"New Character",true,jasmodCharSelectWindow)
  79. jasmodCharSelectGridlist = guiCreateGridList(0.045,0.0967,0.905,0.5417,true,jasmodCharSelectWindow)
  80. guiGridListSetSelectionMode(jasmodCharSelectGridlist,2)
  81. characternameColumn = guiGridListAddColumn(jasmodCharSelectGridlist,"Character Name",0.8)
  82. jasmodCharSelectGameEnterButton = guiCreateButton(0.045,0.645,0.91,0.0517,"Enter the game!",true,jasmodCharSelectWindow)
  83. -- jasmodCharSelectGameDeleteButton = guiCreateButton(0.045,0.645,0.91,0.0517,"Delete this character!\nBE SURE!",true,jasmodCharSelectWindow)
  84.  
  85. -- character create window
  86. jasmodCharCreateWindow = guiCreateWindow(0.0137,0.03,0.2262,0.4683,"Create your character!",true)
  87. guiSetVisible (jasmodCharCreateWindow,false)
  88. guiWindowSetSizable(jasmodCharCreateWindow,false)
  89. jasmodCharCreateSkinLeftButton = guiCreateButton(0.0497,0.1957,0.2652,0.1566,"<",true,jasmodCharCreateWindow)
  90. jasmodCharCreateSkinLabel = guiCreateLabel(0.0663,0.089,0.8343,0.0925,"Select the skin",true,jasmodCharCreateWindow)
  91. guiLabelSetColor(jasmodCharCreateSkinLabel,255,255,255)
  92. guiLabelSetVerticalAlign(jasmodCharCreateSkinLabel,"center")
  93. guiLabelSetHorizontalAlign(jasmodCharCreateSkinLabel,"center",false)
  94. jasmodCharCreateSkinRightButton = guiCreateButton(0.6685,0.1957,0.2652,0.1566,">",true,jasmodCharCreateWindow)
  95. jasmodCharCreateNameTagLabel = guiCreateLabel(0.0497,0.3772,0.895,0.0712,"Name Tag Color (0-255)",true,jasmodCharCreateWindow)
  96. guiLabelSetColor(jasmodCharCreateNameTagLabel,255,255,255)
  97. guiLabelSetVerticalAlign(jasmodCharCreateNameTagLabel,"top")
  98. guiLabelSetHorizontalAlign(jasmodCharCreateNameTagLabel,"left",false)
  99. jasmodCharCreateNameTagRedLabel = guiCreateLabel(0.0497,0.4555,0.2818,0.0712,"Red",true,jasmodCharCreateWindow)
  100. guiLabelSetColor(jasmodCharCreateNameTagRedLabel,255,255,255)
  101. guiLabelSetVerticalAlign(jasmodCharCreateNameTagRedLabel,"top")
  102. guiLabelSetHorizontalAlign(jasmodCharCreateNameTagRedLabel,"left",false)
  103. jasmodCharCreateNameTagGreenLabel = guiCreateLabel(0.0497,0.5338,0.2818,0.0797,"Green",true,jasmodCharCreateWindow)
  104. guiLabelSetColor(jasmodCharCreateNameTagGreenLabel,255,255,255)
  105. guiLabelSetVerticalAlign(jasmodCharCreateNameTagGreenLabel,"top")
  106. guiLabelSetHorizontalAlign(jasmodCharCreateNameTagGreenLabel,"left",false)
  107. jasmodCharCreateNameTagBlueLabel = guiCreateLabel(0.0497,0.6121,0.2818,0.0797,"Blue",true,jasmodCharCreateWindow)
  108. guiLabelSetColor(jasmodCharCreateNameTagBlueLabel,255,255,255)
  109. guiLabelSetVerticalAlign(jasmodCharCreateNameTagBlueLabel,"top")
  110. guiLabelSetHorizontalAlign(jasmodCharCreateNameTagBlueLabel,"left",false)
  111. jasmodCharCreateNameTagRedEdit = guiCreateEdit(0.3646,0.4484,0.3702,0.0747,"",true,jasmodCharCreateWindow)
  112. guiEditSetMaxLength(jasmodCharCreateNameTagRedEdit,3)
  113. jasmodCharCreateNameTagGreenEdit = guiCreateEdit(0.3646,0.5231,0.3702,0.0747,"",true,jasmodCharCreateWindow)
  114. guiEditSetMaxLength(jasmodCharCreateNameTagGreenEdit,3)
  115. jasmodCharCreateNameTagBlueEdit = guiCreateEdit(0.3646,0.5979,0.3702,0.0747,"",true,jasmodCharCreateWindow)
  116. guiEditSetMaxLength(jasmodCharCreateNameTagBlueEdit,3)
  117. jasmodCharCreateCharacterNameLabel = guiCreateLabel(0.0497,0.6904,0.9171,0.0854,"Character Name",true,jasmodCharCreateWindow)
  118. guiLabelSetColor(jasmodCharCreateCharacterNameLabel,255,255,255)
  119. guiLabelSetVerticalAlign(jasmodCharCreateCharacterNameLabel,"top")
  120. guiLabelSetHorizontalAlign(jasmodCharCreateCharacterNameLabel,"left",false)
  121. jasmodCharCreateNameEdit = guiCreateEdit(0.1768,0.7616,0.7735,0.089,"",true,jasmodCharCreateWindow)
  122. guiEditSetMaxLength(jasmodCharCreateNameEdit,20)
  123. jasmodCharCreateAccountCreateButton = guiCreateButton(0.0497,0.8719,0.9006,0.0961,"Create Account!",true,jasmodCharCreateWindow)
  124.  
  125. -- Game Menu
  126. local scr2 = {guiGetScreenSize() };
  127. local w2, h2 = 551,470;
  128. local x2, y2 = (scr2[1]/2)-(w2/2), (scr2[2]/2)-(h2/2);
  129. theGameMenuWindow = guiCreateWindow(x2,y2,w2,h2,"Roleplay - Game Menu - Press M to show/hide!",false)
  130. guiWindowSetSizable(theGameMenuWindow,false)
  131. gameHelp = guiCreateButton(0.001,0.93,0.24,0.08,"Game Help",true,theGameMenuWindow)
  132. theGameMenuTabPanel = guiCreateTabPanel(10,27,529,405,false,theGameMenuWindow)
  133. theGameMenuTabPanelGeneralTab = guiCreateTab("General",theGameMenuTabPanel)
  134. theGameMenuTabPanelGeneralTabCharacterNameInfoLabel = guiCreateLabel(17,17,502,45,"Character Name:",false,theGameMenuTabPanelGeneralTab)
  135. guiLabelSetColor(theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,255,255,255)
  136. guiLabelSetVerticalAlign(theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,"top")
  137. guiLabelSetHorizontalAlign(theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,"left",false)
  138. guiSetFont(theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,"default-bold-small")
  139. theGameMenuTabPanelGeneralTabBankInfoLabel = guiCreateLabel(17,74,502,45,"Bank:",false,theGameMenuTabPanelGeneralTab)
  140. guiLabelSetColor(theGameMenuTabPanelGeneralTabBankInfoLabel,255,255,255)
  141. guiLabelSetVerticalAlign(theGameMenuTabPanelGeneralTabBankInfoLabel,"top")
  142. guiLabelSetHorizontalAlign(theGameMenuTabPanelGeneralTabBankInfoLabel,"left",false)
  143. guiSetFont(theGameMenuTabPanelGeneralTabBankInfoLabel,"default-bold-small")
  144. cashlbl = guiCreateLabel(16,129,502,45,"Cash:",false,theGameMenuTabPanelGeneralTab)
  145. guiLabelSetColor(cashlbl,255,255,255)
  146. guiLabelSetVerticalAlign(cashlbl,"top")
  147. guiLabelSetHorizontalAlign(cashlbl,"left",false)
  148. guiSetFont(cashlbl,"default-bold-small")
  149. guiSetFont(infolbl,"default-bold-small")
  150. theGameMenuTabPanelGeneralTabLogoutButton = guiCreateButton(11,328,507,45,"Logout!",false,theGameMenuTabPanelGeneralTab)
  151.  
  152. HUDLBL = guiCreateButton(361,281,154,41,"Show/Hide HUD",false,theGameMenuTabPanelGeneralTab)
  153.  
  154. CHATLBL = guiCreateButton(362,234,154,41,"Show/Hide Chat",false,theGameMenuTabPanelGeneralTab)
  155.  
  156. NEWSLBL = guiCreateButton(200,282,154,41,"Show/Hide News",false,theGameMenuTabPanelGeneralTab)
  157.  
  158. YESGOTO = guiCreateButton(199,234,154,41,"Yesgoto/Nogoto",false,theGameMenuTabPanelGeneralTab)
  159.  
  160. somethinglbl = guiCreateLabel(202,207,310,23,"Show/Hide functions:",false,theGameMenuTabPanelGeneralTab)
  161.  
  162. setTimer(getCash,1000,0)
  163.  
  164. guiLabelSetColor(somethinglbl,255,255,255)
  165. guiLabelSetVerticalAlign(somethinglbl,"top")
  166. guiLabelSetHorizontalAlign(somethinglbl,"left",false)
  167. guiSetFont(somethinglbl,"clear-normal")
  168. funtionslbl = guiCreateLabel(14,208,142,21,"Vehicle functions:",false,theGameMenuTabPanelGeneralTab)
  169. guiLabelSetColor(funtionslbl,255,255,255)
  170. guiLabelSetVerticalAlign(funtionslbl,"top")
  171. guiLabelSetHorizontalAlign(funtionslbl,"left",false)
  172. guiSetFont(funtionslbl,"clear-normal")
  173. theGameMenuTabPanelGeneralTabFixCarButton = guiCreateButton(13,234,172,40,"Fix Car (50$)",false,theGameMenuTabPanelGeneralTab)
  174. theGameMenuTabPanelGeneralTabFlipCarButton = guiCreateButton(13,280,172,40,"Flip Car",false,theGameMenuTabPanelGeneralTab)
  175. theGameMenuTabPanelPlayersTab = guiCreateTab("Players",theGameMenuTabPanel)
  176. theGameMenuTabPanelPlayersTabPlayerGridlist = guiCreateGridList(3,3,327,374,false,theGameMenuTabPanelPlayersTab)
  177. guiGridListSetSelectionMode(theGameMenuTabPanelPlayersTabPlayerGridlist,2)
  178. theGameMenuTabPanelPlayersTabPlayerColumn = guiGridListAddColumn(theGameMenuTabPanelPlayersTabPlayerGridlist,"Player Name",0.9)
  179. theGameMenuTabPanelPlayersTabPlayerGetInfoButton = guiCreateButton(337,9,183,60,"Get Info",false,theGameMenuTabPanelPlayersTab)
  180. guiSetFont(theGameMenuTabPanelPlayersTabPlayerGetInfoButton,"default-bold-small")
  181. theGameMenuTabPanelPlayersTabPlayerGotoButton = guiCreateButton(337,74,183,60,"Goto",false,theGameMenuTabPanelPlayersTab)
  182. guiSetFont(theGameMenuTabPanelPlayersTabPlayerGotoButton,"default-bold-small")
  183. theGameMenuTabPanelPlayersTabPlayerCarGotoButton = guiCreateButton(338,141,183,60,"Cargoto",false,theGameMenuTabPanelPlayersTab)
  184. guiSetFont(theGameMenuTabPanelPlayersTabPlayerCarGotoButton,"default-bold-small")
  185. theGameMenuTabPanelPlayersTabPlayerRefreshListButton = guiCreateButton(339,208,183,60,"Refresh List",false,theGameMenuTabPanelPlayersTab)
  186. guiSetFont(theGameMenuTabPanelPlayersTabPlayerRefreshListButton,"default-bold-small")
  187. theGameMenuTabPanelTaxiTab = guiCreateTab("Taxi",theGameMenuTabPanel)
  188. theGameMenuTabPanelTaxiTabGridlist = guiCreateGridList(6,40,516,286,false,theGameMenuTabPanelTaxiTab)
  189. guiGridListSetSelectionMode(theGameMenuTabPanelTaxiTabGridlist,0)
  190. locationlbl = guiCreateLabel(138,9,234,27,"Select the location you want to go:",false,theGameMenuTabPanelTaxiTab)
  191. guiLabelSetColor(locationlbl,255,255,255)
  192. guiLabelSetVerticalAlign(locationlbl,"top")
  193. guiLabelSetHorizontalAlign(locationlbl,"left",false)
  194. guiSetFont(locationlbl,"clear-normal")
  195. theGameMenuTabPanelTaxiTabGridlistIDColumn = guiGridListAddColumn(theGameMenuTabPanelTaxiTabGridlist,"ID",0.1)
  196. theGameMenuTabPanelTaxiTabGridlistDestColumn = guiGridListAddColumn(theGameMenuTabPanelTaxiTabGridlist,"Taxi Destination",0.7)
  197. theGameMenuTabPanelTaxiTabGridlistCashColumn = guiGridListAddColumn(theGameMenuTabPanelTaxiTabGridlist,"$",0.1)
  198. theGameMenuTabPanelTaxiTabTaxiButton = guiCreateButton(10,333,511,40,"Order the taxi now!",false,theGameMenuTabPanelTaxiTab)
  199. guiSetFont(theGameMenuTabPanelTaxiTabTaxiButton,"default-bold-small")
  200. theGameMenuTabPanelVehicleHouseTab = guiCreateTab("Vehicle&House",theGameMenuTabPanel)
  201. justlbl = guiCreateLabel(7,11,169,33,"Your vehicle properties:",false,theGameMenuTabPanelVehicleHouseTab)
  202. guiLabelSetColor(justlbl,255,255,255)
  203. guiLabelSetVerticalAlign(justlbl,"top")
  204. guiLabelSetHorizontalAlign(justlbl,"left",false)
  205. guiSetFont(justlbl,"default-bold-small")
  206. slot1lbl = guiCreateLabel(7,51,39,19,"Slot1:",false,theGameMenuTabPanelVehicleHouseTab)
  207. guiLabelSetColor(slot1lbl,255,255,255)
  208. guiLabelSetVerticalAlign(slot1lbl,"top")
  209. guiLabelSetHorizontalAlign(slot1lbl,"left",false)
  210. guiSetFont(slot1lbl,"clear-normal")
  211. theGameMenuTabPanelVHTabVehicleSpawnCarOne = guiCreateButton(66,47,127,23,"Spawn",false,theGameMenuTabPanelVehicleHouseTab)
  212. theGameMenuTabPanelVHTabVehicleDestroyCarOne = guiCreateButton(206,47,127,23,"Destroy",false,theGameMenuTabPanelVehicleHouseTab)
  213. theGameMenuTabPanelVHTabVehicleSellCarOne = guiCreateButton(347,46,127,23,"Sell",false,theGameMenuTabPanelVehicleHouseTab)
  214. slot2lbl = guiCreateLabel(7,106,39,19,"Slot2:",false,theGameMenuTabPanelVehicleHouseTab)
  215. guiLabelSetColor(slot2lbl,255,255,255)
  216. guiLabelSetVerticalAlign(slot2lbl,"top")
  217. guiLabelSetHorizontalAlign(slot2lbl,"left",false)
  218. guiSetFont(slot2lbl,"clear-normal")
  219. theGameMenuTabPanelVHTabVehicleSpawnCarTwo = guiCreateButton(65,102,127,23,"Spawn",false,theGameMenuTabPanelVehicleHouseTab)
  220. theGameMenuTabPanelVHTabVehicleDestroyCarTwo = guiCreateButton(207,102,127,23,"Destroy",false,theGameMenuTabPanelVehicleHouseTab)
  221. theGameMenuTabPanelVHTabVehicleSellCarTwo = guiCreateButton(348,102,127,23,"Sell",false,theGameMenuTabPanelVehicleHouseTab)
  222. justomethingzo = guiCreateLabel(8,165,169,33,"Your house properties:",false,theGameMenuTabPanelVehicleHouseTab)
  223. guiLabelSetColor(justomethingzo,255,255,255)
  224. guiLabelSetVerticalAlign(justomethingzo,"top")
  225. guiLabelSetHorizontalAlign(justomethingzo,"left",false)
  226. guiSetFont(justomethingzo,"default-bold-small")
  227. theGameMenuTabPanelVHTabHouseTeleportButton = guiCreateButton(9,202,510,36,"House Teleport - 250$",false,theGameMenuTabPanelVehicleHouseTab)
  228. theGameMenuTabPanelVHTabHouseGetFreeButton = guiCreateButton(9,256,510,36,"Get free houses (on F11 map)",false,theGameMenuTabPanelVehicleHouseTab)
  229. theGameMenuTabPanelVHTabHouseLockButton = guiCreateButton(8,315,510,36,"Lock/Unlock my house",false,theGameMenuTabPanelVehicleHouseTab)
  230. wowa = guiCreateLabel(181,442,223,23,"Game Menu - Press M to show/hide!",false,theGameMenuWindow)
  231. guiLabelSetColor(wowa,255,255,255)
  232. guiLabelSetVerticalAlign(wowa,"top")
  233. guiLabelSetHorizontalAlign(wowa,"left",false)
  234. guiSetFont(wowa,"default-bold-small")
  235. guiSetVisible(theGameMenuWindow,false)
  236.  
  237. theGameMenuTabPanelAnimationTab = guiCreateTab("Anim",theGameMenuTabPanel)
  238. theAnimGrid = guiCreateGridList(2,2,524,310,false,theGameMenuTabPanelAnimationTab)
  239. guiGridListSetSelectionMode(theAnimGrid,2)
  240. guiGridListSetSelectionMode(theAnimGrid,0)
  241. ID = guiGridListAddColumn(theAnimGrid,"ID:",0.1);
  242. NAME = guiGridListAddColumn(theAnimGrid,"Animation Name:",0.7);
  243. animPlay = guiCreateButton(3,315,523,32,"Play The Animation!",false,theGameMenuTabPanelAnimationTab)
  244. animStop = guiCreateButton(4,348,523,32,"Stop The Animation!",false,theGameMenuTabPanelAnimationTab)
  245.  
  246. local scr3 = {guiGetScreenSize() };
  247. local w3, h3 = 258,307;
  248. local x3, y3 = (scr3[1]/2)-(w3/2), (scr3[2]/2)-(h3/2);
  249.  
  250. theGameMenuTabPanelPlayersTabGetInfoWindow = guiCreateWindow(x3,y3,w3,h3,"Player Info",false)
  251. guiSetVisible (theGameMenuTabPanelPlayersTabGetInfoWindow,false)
  252. guiWindowSetSizable(theGameMenuTabPanelPlayersTabGetInfoWindow,false)
  253.  
  254. infolbl1 = guiCreateLabel(9,28,242,44,"Account Name:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
  255. guiLabelSetColor(infolbl1,255,255,255)
  256. guiLabelSetVerticalAlign(infolbl1,"top")
  257. guiLabelSetHorizontalAlign(infolbl1,"left",false)
  258.  
  259. infolbl2 = guiCreateLabel(9,76,236,21,"Character Name:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
  260. guiLabelSetColor(infolbl2,255,255,255)
  261. guiLabelSetVerticalAlign(infolbl2,"top")
  262. guiLabelSetHorizontalAlign(infolbl2,"left",false)
  263.  
  264. infolbl3 = guiCreateLabel(10,126,236,21,"Bank Balance:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
  265. guiLabelSetColor(infolbl3,255,255,255)
  266. guiLabelSetVerticalAlign(infolbl3,"top")
  267. guiLabelSetHorizontalAlign(infolbl3,"left",false)
  268.  
  269. infolbl4 = guiCreateLabel(9,183,236,21,"Cash In Pocket:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
  270. guiLabelSetColor(infolbl4,255,255,255)
  271. guiLabelSetVerticalAlign(infolbl4,"top")
  272. guiLabelSetHorizontalAlign(infolbl4,"left",false)
  273.  
  274. infolbl5 = guiCreateLabel(8,236,236,21,"Goto State:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
  275. guiLabelSetColor(infolbl5,255,255,255)
  276. guiLabelSetVerticalAlign(infolbl5,"top")
  277. guiLabelSetHorizontalAlign(infolbl5,"left",false)
  278.  
  279. theGameMenuTabPanelPlayersTabGetInfoWindowInfoCloseButton = guiCreateButton(9,271,240,27,"Close This Menu",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
  280.  
  281.  
  282.  
  283.  
  284.  
  285. -- bank
  286. bankWindow = guiCreateWindow(201,104,290,287,"-- BANK NAME --",false)
  287. guiSetVisible (bankWindow,false)
  288. bankWindowDisplay = guiCreateEdit(0.0483,0.115,0.8897,0.108,"",true,bankWindow)
  289. guiEditSetReadOnly(bankWindowDisplay,true)
  290. bankWindow1 = guiCreateButton(0.0793,0.2404,0.1759,0.1638,"1",true,bankWindow)
  291. bankWindow2 = guiCreateButton(0.3,0.2404,0.1759,0.1638,"2",true,bankWindow)
  292. bankWindow3 = guiCreateButton(0.5241,0.2404,0.1759,0.1638,"3",true,bankWindow)
  293. bankWindow4 = guiCreateButton(0.0793,0.4425,0.1759,0.1638,"4",true,bankWindow)
  294. bankWindow5 = guiCreateButton(0.3,0.4425,0.1759,0.1638,"5",true,bankWindow)
  295. bankWindow6 = guiCreateButton(0.5241,0.4425,0.1759,0.1638,"6",true,bankWindow)
  296. bankWindow7 = guiCreateButton(0.0793,0.6481,0.1759,0.1638,"7",true,bankWindow)
  297. bankWindow8 = guiCreateButton(0.3034,0.6481,0.1759,0.1638,"8",true,bankWindow)
  298. bankWindow9 = guiCreateButton(0.5241,0.6481,0.1759,0.1638,"9",true,bankWindow)
  299. bankWindowClose = guiCreateButton(0.0793,0.8328,0.8448,0.0906,"Close",true,bankWindow)
  300. bankWindowStore = guiCreateButton(0.7448,0.2404,0.1759,0.1638,"Store",true,bankWindow)
  301. bankWindowWithdraw = guiCreateButton(0.7448,0.4425,0.1759,0.1638,"Withdraw",true,bankWindow)
  302. bankWindow0 = guiCreateButton(0.7448,0.6481,0.1759,0.1638,"0",true,bankWindow)
  303.  
  304. -- Restaurants
  305. -- screen sizer .. --
  306. local scr = {guiGetScreenSize() };
  307. local w, h = 709,221;
  308. local x, y = (scr[1]/2)-(w/2), (scr[2]/2)-(h/2);
  309. restaurant = guiCreateWindow(x,y,w,h,"Restaurant",false)
  310. reslbl = guiCreateLabel(9,28,237,17,"Choose a food you want to buy:",false,restaurant)
  311. guiLabelSetColor(reslbl,255,255,255)
  312. guiLabelSetVerticalAlign(reslbl,"top")
  313. guiLabelSetHorizontalAlign(reslbl,"left",false)
  314. guiSetFont(reslbl,"default-bold-small")
  315. resimg1 = guiCreateStaticImage(12,66,137,83,"images/BURHIG.png",false,restaurant)
  316. resbtn1 = guiCreateButton(12,157,136,29,"Mega Burger 50$",false,restaurant)
  317. resimg2 = guiCreateStaticImage(187,63,141,87,"images/BURMED.png",false,restaurant)
  318. resbtn2 = guiCreateButton(191,158,136,29,"Medium Burger 30$",false,restaurant)
  319. resimg3 = guiCreateStaticImage(361,56,151,94,"images/BURLOW.png",false,restaurant)
  320. resbtn3 = guiCreateButton(369,158,136,29,"Small Burger 20$",false,restaurant)
  321. resimg4 = guiCreateStaticImage(538,61,156,86,"images/CLULOW.png",false,restaurant)
  322. resbtn4 = guiCreateButton(551,157,136,29,"Mega XXL Burger 75$",false,restaurant)
  323. reslbl2 = guiCreateLabel(556,197,148,14,"Restaurant System by A FCKING NOOB WHICH LEFT US ALONE AND THREATS US.",false,restaurant)
  324. guiLabelSetColor(reslbl2,255,255,255)
  325. guiLabelSetVerticalAlign(reslbl2,"top")
  326. guiLabelSetHorizontalAlign(reslbl2,"left",false)
  327. guiSetFont(reslbl2,"default-small")
  328. resexit = guiCreateButton(666,24,34,41,"X",false,restaurant)
  329. guiSetVisible(restaurant,false);
  330.  
  331. -- Ammu Nation
  332. theAmmuNationWindow = guiCreateWindow(0.0012,0.5633,0.2738,0.435,"Ammu Nation",true)
  333. guiSetVisible (theAmmuNationWindow,false)
  334. guiWindowSetMovable(theAmmuNationWindow,false)
  335. guiWindowSetSizable(theAmmuNationWindow,false)
  336. theAmmuNationGridlist = guiCreateGridList(9,28,197,128,false,theAmmuNationWindow)
  337. guiGridListSetSelectionMode(theAmmuNationGridlist,0)
  338. theAmmuNationGridlistCol1 = guiGridListAddColumn(theAmmuNationGridlist,"Weapon Name",0.45)
  339. theAmmuNationGridlistCol2 = guiGridListAddColumn(theAmmuNationGridlist,"Ammo",0.15)
  340. theAmmuNationGridlistCol3 = guiGridListAddColumn(theAmmuNationGridlist,"$",0.2)
  341. theAmmuNationBuyButton = guiCreateButton(9,162,198,40,"Buy!",false,theAmmuNationWindow)
  342. theAmmuNationCloseButton = guiCreateButton(9,208,198,40,"Close",false,theAmmuNationWindow)
  343. for i,v in ipairs (ammunation) do
  344. local row = guiGridListAddRow (theAmmuNationGridlist)
  345. guiGridListSetItemText (theAmmuNationGridlist,row,theAmmuNationGridlistCol1,v[1],false,false)
  346. guiGridListSetItemText (theAmmuNationGridlist,row,theAmmuNationGridlistCol2,v[2],false,false)
  347. guiGridListSetItemText (theAmmuNationGridlist,row,theAmmuNationGridlistCol3,v[3] .. "$",false,true)
  348. end
  349. ammuNationMarker = createMarker (295.91,-38.09,1000.51,"cylinder",1,0,255,255,127)
  350. setElementInterior (ammuNationMarker,1)
  351. setElementDimension (ammuNationMarker,1)
  352.  
  353. -- refreshing player gridlist
  354. refreshPlayerGridlist()
  355.  
  356. -- Grenade Apple
  357. local grenade = engineLoadTXD ("files/grenade.txd")
  358. engineImportTXD (grenade,342)
  359.  
  360. -- Widescreen
  361. wideScreenGUI = guiCreateStaticImage(0,0,1,1,"images/widescreen.png",true,getRootElement())
  362. guiMoveToBack (wideScreenGUI)
  363.  
  364. -- taxi
  365. for i,v in ipairs (taxis) do
  366. local row = guiGridListAddRow (theGameMenuTabPanelTaxiTabGridlist)
  367. guiGridListSetItemText (theGameMenuTabPanelTaxiTabGridlist,row,theGameMenuTabPanelTaxiTabGridlistDestColumn,v[1],false,false)
  368. guiGridListSetItemText (theGameMenuTabPanelTaxiTabGridlist,row,theGameMenuTabPanelTaxiTabGridlistIDColumn,tostring(i),false,true)
  369. guiGridListSetItemText (theGameMenuTabPanelTaxiTabGridlist,row,theGameMenuTabPanelTaxiTabGridlistCashColumn,v[2] .. "$",false,false)
  370. end
  371.  
  372. for i,v in ipairs (animations) do
  373. local row2 = guiGridListAddRow (theAnimGrid)
  374. guiGridListSetItemText (theAnimGrid,row2,NAME,v[1],false,false)
  375. guiGridListSetItemText (theAnimGrid,row2,ID,tostring(i),false,true)
  376. end
  377.  
  378. theHouseGUIWindow = guiCreateWindow(0.3088,0.275,0.3925,0.3433,"Home system by JasperNL=D",true)
  379. guiWindowSetMovable(theHouseGUIWindow,false)
  380. guiWindowSetSizable(theHouseGUIWindow,false)
  381. guiSetVisible (theHouseGUIWindow,false)
  382. theHouseGUIEnterButton = guiCreateButton(0.0446,0.7816,0.2771,0.1748,"Enter house",true,theHouseGUIWindow)
  383. theHouseGUIBuyButton = guiCreateButton(0.3567,0.7816,0.2771,0.1748,"Buy house",true,theHouseGUIWindow)
  384. theHouseGUISellButton = guiCreateButton(0.6688,0.7816,0.2771,0.1748,"Sell house",true,theHouseGUIWindow)
  385. theHouseGUICloseButton = guiCreateButton(0.9172,0.1165,0.0541,0.0777,"x",true,theHouseGUIWindow)
  386. theHouseGUIOwnerLabel = guiCreateLabel(0.0255,0.165,0.3854,0.1214,"Owner",true,theHouseGUIWindow)
  387. guiLabelSetColor(theHouseGUIOwnerLabel,255,255,255)
  388. guiLabelSetVerticalAlign(theHouseGUIOwnerLabel,"center")
  389. guiLabelSetHorizontalAlign(theHouseGUIOwnerLabel,"left",false)
  390. theHouseGUINumberLabel = guiCreateLabel(0.0255,0.5194,0.3854,0.1214,"House Number",true,theHouseGUIWindow)
  391. guiLabelSetColor(theHouseGUINumberLabel,255,255,255)
  392. guiLabelSetVerticalAlign(theHouseGUINumberLabel,"center")
  393. guiLabelSetHorizontalAlign(theHouseGUINumberLabel,"left",false)
  394. theHouseGUIPriceLabel = guiCreateLabel(0.0255,0.3447,0.3854,0.1214,"House Price",true,theHouseGUIWindow)
  395. guiLabelSetColor(theHouseGUIPriceLabel,255,255,255)
  396. guiLabelSetVerticalAlign(theHouseGUIPriceLabel,"center")
  397. guiLabelSetHorizontalAlign(theHouseGUIPriceLabel,"left",false)
  398. theHouseGUIOwnerInfoLabel = guiCreateLabel(0.5,0.165,0.3854,0.1214,"-- Owner --",true,theHouseGUIWindow)
  399. guiLabelSetColor(theHouseGUIOwnerInfoLabel,255,255,255)
  400. guiLabelSetVerticalAlign(theHouseGUIOwnerInfoLabel,"center")
  401. guiLabelSetHorizontalAlign(theHouseGUIOwnerInfoLabel,"left",false)
  402. theHouseGUIPriceInfoLabel = guiCreateLabel(0.5478,0.3447,0.3854,0.1214,"-- House Price --",true,theHouseGUIWindow)
  403. guiLabelSetColor(theHouseGUIPriceInfoLabel,255,255,255)
  404. guiLabelSetVerticalAlign(theHouseGUIPriceInfoLabel,"center")
  405. guiLabelSetHorizontalAlign(theHouseGUIPriceInfoLabel,"left",false)
  406. theHouseGUINumberInfoLabel = guiCreateLabel(0.5032,0.5194,0.3854,0.1214,"-- Adress -- ",true,theHouseGUIWindow)
  407. guiLabelSetColor(theHouseGUINumberInfoLabel,255,255,255)
  408. guiLabelSetVerticalAlign(theHouseGUINumberInfoLabel,"center")
  409. guiLabelSetHorizontalAlign(theHouseGUINumberInfoLabel,"left",false)
  410. theHouseGUIDollarLabel = guiCreateLabel(0.5,0.3447,0.0446,0.1214,"$",true,theHouseGUIWindow)
  411. guiLabelSetColor(theHouseGUIDollarLabel,255,255,255)
  412. guiLabelSetVerticalAlign(theHouseGUIDollarLabel,"center")
  413. guiLabelSetHorizontalAlign(theHouseGUIDollarLabel,"left",false)
  414. theInsideHouseGUIWindow = guiCreateWindow(0.25,-0.025,0.5,0.1,"",true)
  415. guiSetVisible (theInsideHouseGUIWindow,false)
  416. guiWindowSetMovable(theInsideHouseGUIWindow,false)
  417. guiWindowSetSizable(theInsideHouseGUIWindow,false)
  418. theInsideHouseGUIWindowLockBut = guiCreateButton(10,21,153,30," -- LOCK/UNLOCK --",false,theInsideHouseGUIWindow)
  419. theInsideHouseGUIWindowLeaveBut = guiCreateButton(236,21,153,30,"Leave House",false,theInsideHouseGUIWindow)
  420.  
  421.  
  422. theCarMissionGUIWindow = guiCreateWindow(0.2537,0.2067,0.5013,0.5167,"Wang Cars Missions",true)
  423. guiWindowSetMovable(theCarMissionGUIWindow,false)
  424. guiWindowSetSizable(theCarMissionGUIWindow,false)
  425. guiSetVisible (theCarMissionGUIWindow,false)
  426. theCarMissionGUITitle = guiCreateLabel(0.0274,0.071,0.9377,0.1226,"Mission -1: Test?",true,theCarMissionGUIWindow)
  427. guiLabelSetColor(theCarMissionGUITitle,255,255,255)
  428. guiLabelSetVerticalAlign(theCarMissionGUITitle,"center")
  429. guiLabelSetHorizontalAlign(theCarMissionGUITitle,"left",false)
  430. guiSetFont(theCarMissionGUITitle,"sa-header")
  431. theCarMissionGUIDescription = guiCreateMemo(0.0574,0.229,0.8628,0.3452,"-- DESCRIPTION --",true,theCarMissionGUIWindow)
  432. theCarMissionGUIInfoLabel = guiCreateLabel(0.0499,0.6065,0.2519,0.1935,"Car\nMoney to win\nTime",true,theCarMissionGUIWindow)
  433. guiLabelSetColor(theCarMissionGUIInfoLabel,255,255,255)
  434. guiLabelSetVerticalAlign(theCarMissionGUIInfoLabel,"top")
  435. guiLabelSetHorizontalAlign(theCarMissionGUIInfoLabel,"left",false)
  436. guiSetFont(theCarMissionGUIInfoLabel,"default-bold-small")
  437. theCarMissionGUIInfoInformationLabel = guiCreateLabel(0.3192,0.6065,0.6459,0.1935,"-- NAME -- \n\n-- TIME -- ",true,theCarMissionGUIWindow)
  438. guiLabelSetColor(theCarMissionGUIInfoInformationLabel,255,255,255)
  439. guiLabelSetVerticalAlign(theCarMissionGUIInfoInformationLabel,"top")
  440. guiLabelSetHorizontalAlign(theCarMissionGUIInfoInformationLabel,"left",false)
  441. guiSetFont(theCarMissionGUIInfoInformationLabel,"default-bold-small")
  442. theCarMissionGUIAcceptButton = guiCreateButton(0.0299,0.8161,0.5387,0.1419,"Let's go!",true,theCarMissionGUIWindow)
  443. theCarMissionGUICloseButton = guiCreateButton(0.6035,0.8161,0.3641,0.1419,"No thanks",true,theCarMissionGUIWindow)
  444.  
  445.  
  446. -- BOATING
  447.  
  448. theBoatMissionGUIWindow = guiCreateWindow(0.2537,0.2067,0.5013,0.5167,"Anchor Boat Missions",true)
  449. guiWindowSetMovable(theBoatMissionGUIWindow,false)
  450. guiWindowSetSizable(theBoatMissionGUIWindow,false)
  451. guiSetVisible (theBoatMissionGUIWindow,false)
  452. theBoatMissionGUITitle = guiCreateLabel(0.0274,0.071,0.9377,0.1226,"Mission -1: Test?",true,theBoatMissionGUIWindow)
  453. guiLabelSetColor(theBoatMissionGUITitle,255,255,255)
  454. guiLabelSetVerticalAlign(theBoatMissionGUITitle,"center")
  455. guiLabelSetHorizontalAlign(theBoatMissionGUITitle,"left",false)
  456. guiSetFont(theBoatMissionGUITitle,"sa-header")
  457. theBoatMissionGUIDescription = guiCreateMemo(0.0574,0.229,0.8628,0.3452,"-- DESCRIPTION --",true,theBoatMissionGUIWindow)
  458. theBoatMissionGUIInfoLabel = guiCreateLabel(0.0499,0.6065,0.2519,0.1935,"Car\nMoney to win\nTime",true,theBoatMissionGUIWindow)
  459. guiLabelSetColor(theBoatMissionGUIInfoLabel,255,255,255)
  460. guiLabelSetVerticalAlign(theBoatMissionGUIInfoLabel,"top")
  461. guiLabelSetHorizontalAlign(theBoatMissionGUIInfoLabel,"left",false)
  462. guiSetFont(theBoatMissionGUIInfoLabel,"default-bold-small")
  463. theBoatMissionGUIInfoInformationLabel = guiCreateLabel(0.3192,0.6065,0.6459,0.1935,"-- NAME -- \n\n-- TIME -- ",true,theBoatMissionGUIWindow)
  464. guiLabelSetColor(theBoatMissionGUIInfoInformationLabel,255,255,255)
  465. guiLabelSetVerticalAlign(theBoatMissionGUIInfoInformationLabel,"top")
  466. guiLabelSetHorizontalAlign(theBoatMissionGUIInfoInformationLabel,"left",false)
  467. guiSetFont(theBoatMissionGUIInfoInformationLabel,"default-bold-small")
  468. theBoatMissionGUIAcceptButton = guiCreateButton(0.0299,0.8161,0.5387,0.1419,"Let's go!",true,theBoatMissionGUIWindow)
  469. theBoatMissionGUICloseButton = guiCreateButton(0.6035,0.8161,0.3641,0.1419,"No thanks",true,theBoatMissionGUIWindow)
  470.  
  471. theTradeCenterWindow = guiCreateWindow(0.2876,0.2666,0.475,0.4667,"Trade Center",true)
  472. guiSetVisible (theTradeCenterWindow,false)
  473. guiWindowSetSizable(theTradeCenterWindow,false)
  474. theTradeCenterTabPanel = guiCreateTabPanel(0.0237,0.0786,0.9526,0.8893,true,theTradeCenterWindow)
  475. theTradeCenterBuyTab = guiCreateTab("Buy a car",theTradeCenterTabPanel)
  476. theTradeCenterBuyTabGridlist = guiCreateGridList(0.0083,0.0133,0.9834,0.8267,true,theTradeCenterBuyTab)
  477. guiGridListSetSelectionMode(theTradeCenterBuyTabGridlist,0)
  478. guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Nr.",0.1)
  479. guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Car Name",0.2)
  480. guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Price",0.2)
  481. guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Old Owner",0.2)
  482. guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Date added",0.25)
  483. theTradeCenterBuyTabBuySl1 = guiCreateButton(0.011,0.8489,0.4586,0.1333,"Buy Slot 1",true,theTradeCenterBuyTab)
  484. theTradeCenterBuyTabBuySl2 = guiCreateButton(0.5276,0.8489,0.4586,0.1333,"Buy Slot 2",true,theTradeCenterBuyTab)
  485. theTradeCenterSellTab = guiCreateTab("Sell your car",theTradeCenterTabPanel)
  486. theTradeCenterSellTabRadioSl1 = guiCreateRadioButton(0.0138,0.0267,0.4558,0.1289,"Sell slot 1",true,theTradeCenterSellTab)
  487. guiRadioButtonSetSelected(theTradeCenterSellTabRadioSl1,true)
  488. theTradeCenterSellTabRadioSl2 = guiCreateRadioButton(0.5304,0.0267,0.4558,0.1289,"Sell slot 2",true,theTradeCenterSellTab)
  489. theTradeCenterSellTabPriceEdit = guiCreateEdit(0.0249,0.2756,0.442,0.1156,"",true,theTradeCenterSellTab)
  490. guiEditSetMaxLength(theTradeCenterSellTabPriceEdit,6)
  491. theTradeCenterSellTabPriceLabel = guiCreateLabel(0.0193,0.1644,0.5,0.1022,"Enter the price",true,theTradeCenterSellTab)
  492. guiLabelSetColor(theTradeCenterSellTabPriceLabel,255,255,255)
  493. guiLabelSetVerticalAlign(theTradeCenterSellTabPriceLabel,"top")
  494. guiLabelSetHorizontalAlign(theTradeCenterSellTabPriceLabel,"left",false)
  495. theTradeCenterSellTabWarningLabel = guiCreateLabel(0.0166,0.4178,0.9669,0.3422,"Warning! Before you sell your car,\nMake sure you sell the good one\nYou are on the good character\nAnd the price is all right\nYou won't be warned, so be quiet!",true,theTradeCenterSellTab)
  496. guiLabelSetColor(theTradeCenterSellTabWarningLabel,255,255,255)
  497. guiLabelSetVerticalAlign(theTradeCenterSellTabWarningLabel,"top")
  498. guiLabelSetHorizontalAlign(theTradeCenterSellTabWarningLabel,"left",false)
  499. theTradeCenterSellTabSellButton = guiCreateButton(0.0304,0.8089,0.4558,0.1244,"Sell the car!",true,theTradeCenterSellTab)
  500. theTradeCenterInformationTab = guiCreateTab("Information",theTradeCenterTabPanel)
  501. theTradeCenterInfoTabMemo = guiCreateMemo(0.011,0.0178,0.9751,0.96,"Welcome to the trade center!\nIn this trade center you can become very rich :D\nSo what can you do?\nWell, you can sell your car, which other people can buy!\nYou say a price, and when anybody agrees with it, he buys your car, and you earn the money on your bank!\n\nYou can buy other peoples cars too!\nAt the first tab you can click on a car, when you agree with it, you buy it!\nThat can be much more cheaper as in Wang Cars, but the seller can ask more as Wang too! so be quiet :D\n\nGood luck with trading :D",true,theTradeCenterInformationTab)
  502. guiMemoSetReadOnly(theTradeCenterInfoTabMemo,true)
  503. theTradeCenterCloseButton = guiCreateButton(0.9105,0.0714,0.0505,0.0686,"x",true,theTradeCenterWindow)
  504.  
  505.  
  506. --[[ --- Drug Shop --
  507. drugInventoryWnd = guiCreateWindow(308,169,400,459,".::Drug Inventory::. Press F5 to show/hide::.",false)
  508. drugInventoryGrid = guiCreateGridList(9,25,382,363,false,drugInventoryWnd)
  509. guiGridListSetSelectionMode(drugInventoryGrid,0)
  510. guiGridListAddColumn(drugInventoryGrid,"Drug Name:",0.2)
  511. guiGridListAddColumn(drugInventoryGrid,"Amount:",0.2)
  512. useItemBtn = guiCreateButton(13,412,87,38,"Use Item",false,drugInventoryWnd)
  513. dropItemBtn = guiCreateButton(119,414,88,35,"Drop Item",false,drugInventoryWnd)
  514. drugInventoryExit = guiCreateButton(355,411,36,39,"X",false,drugInventoryWnd)
  515.  
  516. setTimer(getDrugs,1000,0)
  517. guiSetVisible(drugInventoryWnd,false)
  518. ]]--
  519. --
  520.  
  521.  
  522. -- Car Shop
  523.  
  524. theCarShopGUIWindow = guiCreateWindow(0.2725,0.2133,0.45,0.3333,"Car Shop",true)
  525. guiWindowSetSizable (theCarShopGUIWindow,false)
  526. guiSetVisible (theCarShopGUIWindow,false)
  527. theCarShopGUIWindowBuySlot1But = guiCreateButton(0.6611,0.135,0.3,0.24,"Buy!\nSlot 1",true,theCarShopGUIWindow)
  528. theCarShopGUIWindowBuySlot2But = guiCreateButton(0.6611,0.415,0.3,0.24,"Buy!\nSlot 2",true,theCarShopGUIWindow)
  529. theCarShopGUIWindowCloseBut = guiCreateButton(0.6611,0.7,0.3,0.24,"Close Window",true,theCarShopGUIWindow)
  530. theCarShopGUIWindowGridList = guiCreateGridList(0.025,0.115,0.6194,0.84,true,theCarShopGUIWindow)
  531. guiGridListSetSelectionMode(theCarShopGUIWindowGridList,2)
  532. guiGridListAddColumn(theCarShopGUIWindowGridList,"Car Name",0.6)
  533. guiGridListAddColumn(theCarShopGUIWindowGridList,"$",0.2)
  534.  
  535. theBikeShopGUIWindow = guiCreateWindow(0.2725,0.2133,0.45,0.3333,"Bike Shop",true)
  536. guiWindowSetSizable (theBikeShopGUIWindow,false)
  537. guiSetVisible (theBikeShopGUIWindow,false)
  538. theBikeShopGUIWindowBuySlot1But = guiCreateButton(0.6611,0.135,0.3,0.24,"Buy!\nSlot 1",true,theBikeShopGUIWindow)
  539. theBikeShopGUIWindowBuySlot2But = guiCreateButton(0.6611,0.415,0.3,0.24,"Buy!\nSlot 2",true,theBikeShopGUIWindow)
  540. theBikeShopGUIWindowCloseBut = guiCreateButton(0.6611,0.7,0.3,0.24,"Close Window",true,theBikeShopGUIWindow)
  541. theBikeShopGUIWindowGridList = guiCreateGridList(0.025,0.115,0.6194,0.84,true,theBikeShopGUIWindow)
  542. guiGridListSetSelectionMode(theBikeShopGUIWindowGridList,2)
  543. guiGridListAddColumn(theBikeShopGUIWindowGridList,"Bike Name",0.6)
  544. guiGridListAddColumn(theBikeShopGUIWindowGridList,"$",0.2)
  545.  
  546. for i,v in ipairs ({{400,75000},{401,60000},{402,500000},{403,100000},{404,55000},{405,65000},{406,750000},{407,150000},{408,65000},{409,100000},{410,60000},{411,500000},{412,75000},{413,65000},{414,62500},{415,350000},{416,75000},{418,65000},{419,75000},{420,70000},{421,65000},{422,67500},{423,250000},{424,75000},{426,65000},{427,125000},{428,95000},{429,300000},{431,90000},{433,150000},{434,350000},{436,65000},{437,90000},{438,75000},{439,75000},{440,65000},{442,65000},{443,100000},{444,750000},{445,65000},{451,500000},{455,150000},{456,150000},{457,45000},{458,75000},{466,70000},{467,60000},{470,125000},{474,65000},{475,175000},{477,175000},{478,50000},{479,65000},{480,250000},{482,100000},{483,75000},{485,50000},{486,125000},{489,80000},{490,85000},{491,65000},{492,65000},{494,400000},{495,250000},{496,65000},{498,75000},{499,55000},{500,70000},{502,400000},{503,400000},{504,100000},{505,80000},{506,250000},{507,65000},{508,70000},{514,100000},{515,102500},{517,65000},{518,75000},{524,90000},{525,85000},{526,65000},{527,65000},{528,250000},{529,65000},{530,12500},{531,25000},{532,75000},{533,75000},{534,75000},{535,75000},{536,75000},{539,125000},{540,65000},{541,400000},{542,100000},{543,45000},{544,150000},{545,70000},{546,65000},{547,65000},{549,75000},{550,65000},{551,65000},{552,80000},{554,100000},{555,200000},{556,750000},{557,750000},{558,350000},{559,350000},{560,400000},{561,75000},{562,400000},{565,350000},{566,65000},{567,75000},{568,100000},{571,10000},{572,10500},{573,500000},{574,11000},{575,75000},{576,75000},{578,100000},{579,80000},{580,95000},{582,75000},{583,11000},{585,65000},{587,350000},{588,65000},{589,150000},{598,75000},{599,100000},{600,65000},{602,350000},{603,350000},{604,50000},{605,50000}}) do
  547. local row = guiGridListAddRow (theCarShopGUIWindowGridList)
  548. guiGridListSetItemText (theCarShopGUIWindowGridList,row,1,getVehicleNameFromModel(v[1]),false,false)
  549. guiGridListSetItemText (theCarShopGUIWindowGridList,row,2,tostring(v[2]),false,true)
  550. end
  551.  
  552. for i,v in ipairs ({{581,80000},{448,35000},{461,80000},{462,35000},{463,100000},{468,80000},{471,80000},{481,2500},{509,2000},{510,10000},{521,90000},{522,125000},{523,80000},{586,80000}}) do
  553. local row = guiGridListAddRow (theBikeShopGUIWindowGridList)
  554. guiGridListSetItemText (theBikeShopGUIWindowGridList,row,1,getVehicleNameFromModel(v[1]),false,false)
  555. guiGridListSetItemText (theBikeShopGUIWindowGridList,row,2,tostring(v[2]),false,true)
  556. end
  557.  
  558. wangCarsCarshopMarker = createMarker (-1952.82,299.93,34.47,"cylinder",1,0,255,255,127)
  559. nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127)
  560. restaurantMarker = createMarker (377.51,-67.94,1000.55,"cylinder",1.5,0,255,255,127)
  561. bikesCarshopMarker = createMarker (2192.5729980469,2764.2033691406,9.8203125,"cylinder",1,0,255,255,127)
  562. setElementInterior(restaurantMarker,10)
  563. setElementDimension(restaurantMarker,666)
  564. createBlip (-1951.66,642.98,45.5625,63)
  565. createBlip (2192.5729980469,2764.2033691406,9.8203125,8)
  566.  
  567.  
  568.  
  569.  
  570. stripper1 = createPed( 63, -2673.74, 1410.36, 907.57 )
  571. stripper2 = createPed( 237, -2677.55, 1402.78, 907.57 )
  572. stripper3 = createPed( 237, -2677.33, 1414.43, 907.57 )
  573.  
  574. clubowner = createPed( 59, -2672.10, 1400.40, 912.40 )
  575.  
  576. setElementDimension ( stripper1, 203 )
  577. setElementDimension ( stripper2, 203 )
  578. setElementDimension ( stripper3, 203 )
  579. setElementDimension ( clubowner, 203 )
  580.  
  581. setElementInterior ( stripper1, 3 )
  582. setElementInterior ( stripper2, 3 )
  583. setElementInterior ( stripper3, 3 )
  584. setElementInterior ( clubowner, 3 )
  585.  
  586. setPedRotation ( stripper1, 270 )
  587. setPedRotation ( stripper2, 270 )
  588. setPedRotation ( stripper3, 270 )
  589. setPedRotation ( clubowner, 38 )
  590.  
  591.  
  592.  
  593. -- dj
  594.  
  595. dj = createPed ( 217, -2661.21,1410.02,910.17)
  596. setElementInterior ( dj, 3 )
  597. setElementDimension ( dj, 203 )
  598. setPedRotation ( dj, 90 )
  599.  
  600. -- bargirl
  601.  
  602. bg = createPed ( 194, -2662.83, 1407.87, 906.27 )
  603. setElementInterior ( bg, 3 )
  604. setElementDimension ( bg, 203 )
  605. setPedRotation ( bg, 90 )
  606.  
  607. -- guard.
  608.  
  609. joe = createPed ( 163, -2639.90, 1407.51, 906.46 )
  610. setElementInterior ( joe, 3 )
  611. setElementDimension ( joe, 203 )
  612.  
  613. setTimer(
  614. function ()
  615. setPedAnimation( stripper1, "STRIP", "STR_C1")
  616. setPedAnimation( stripper2, "STRIP", "STR_Loop_A" )
  617. setPedAnimation( stripper3, "STRIP", "STR_Loop_A" )
  618. setPedAnimation( dj, "DANCING", "dnce_M_c" )
  619. end
  620. , 200, 1 )
  621.  
  622. -- guiSetVisible( gtag, false )
  623.  
  624. -- Cow window :>
  625. theCowStatsWindow = guiCreateWindow(0.2288,0.8183,0.2512,0.1683,"Your Cow Stats",true)
  626. guiSetVisible (theCowStatsWindow,false)
  627. guiWindowSetMovable(theCowStatsWindow,false)
  628. guiWindowSetSizable(theCowStatsWindow,false)
  629. theCowStatsWindowMilkLabel = guiCreateLabel(0.0398,0.2574,0.5721,0.2178,"Milk holding",true,theCowStatsWindow)
  630. guiLabelSetColor(theCowStatsWindowMilkLabel,255,255,255)
  631. guiLabelSetVerticalAlign(theCowStatsWindowMilkLabel,"center")
  632. guiLabelSetHorizontalAlign(theCowStatsWindowMilkLabel,"left",false)
  633. theCowStatsWindowMilkValueLabel = guiCreateLabel(0.6766,0.2574,0.2736,0.2178,"0/10L",true,theCowStatsWindow)
  634. guiLabelSetColor(theCowStatsWindowMilkValueLabel,255,255,255)
  635. guiLabelSetVerticalAlign(theCowStatsWindowMilkValueLabel,"center")
  636. guiLabelSetHorizontalAlign(theCowStatsWindowMilkValueLabel,"right",false)
  637. theCowStatsWindowDropMilkLabel = guiCreateButton(0.0647,0.6535,0.4478,0.2277,"Drop milk",true,theCowStatsWindow)
  638. theCowStatsWindowCloseButton = guiCreateButton(0.6368,0.6535,0.2886,0.2277,"Close",true,theCowStatsWindow)
  639.  
  640. end)
  641.  
  642.  
  643. addEvent ("lolmodOpenInfoWindow",true)
  644. addEventHandler ("lolmodOpenInfoWindow",getRootElement(),
  645. function(text)
  646. if (source == getLocalPlayer()) then
  647. guiSetText (jasmodInfoWindowMemo,text)
  648. guiSetVisible (jasmodInfoWindow,true)
  649. guiBringToFront (jasmodInfoWindow)
  650. if (isCursorShowing (getLocalPlayer())) then
  651. setElementData (getLocalPlayer(),"cursorshowing",true)
  652. else
  653. setElementData (getLocalPlayer(),"cursorshowing",false)
  654. showCursor (true,true)
  655. end
  656. end
  657. end)
  658.  
  659. hudShowing = true;
  660. chatShowing = true;
  661. newsShow = true;
  662. addEventHandler ("onClientGUIClick",getRootElement(),
  663. function(button,state,absx,absy)
  664. if (source == jasmodInfoWindowExitButton) then
  665. guiSetVisible (jasmodInfoWindow,false)
  666. if (getElementData (getLocalPlayer(),"cursorshowing") == false) then
  667. showCursor (false,false)
  668. end
  669. elseif (source == gangsystemgrid) then
  670. local gangName = guiGridListGetItemText ( gangsystemgrid, guiGridListGetSelectedItem ( gangsystemgrid ) )
  671. if (gangName) then
  672. triggerServerEvent("gangSystemWantsPlayers",getLocalPlayer(),gangName)
  673. end
  674.  
  675. elseif (source == createformexit) then
  676. guiSetVisible(createformwnd,false)
  677. guiSetInputEnabled(false)
  678.  
  679. elseif (source == invitebtn) then
  680. guiSetVisible(gangsysteminput,true)
  681. guiSetInputEnabled(true)
  682.  
  683. elseif (source == rankbtn) then
  684. guiSetVisible(ranknamewnd,true)
  685. guiSetInputEnabled(true)
  686.  
  687. elseif (source == gangsystemokbtn4) then
  688. if not(guiGetText(thenameedit5) == "") and not (guiGetText(thenameedit6) == "") then
  689. triggerServerEvent("setPlayerGangRank",getLocalPlayer(),guiGetText(thenameedit5),guiGetText(thenameedit6))
  690. guiSetVisible(ranknamewnd,false)
  691. guiSetInputEnabled(false)
  692. else
  693. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You must fill the name and rank!")
  694. end
  695.  
  696. elseif (source == kickbtn) then
  697. guiSetVisible(kicknamewnd,true)
  698. guiSetInputEnabled(true)
  699.  
  700. elseif (source == gangsystemokbtn2) then
  701. if not(guiGetText(thenameedit2) == "") then
  702. triggerServerEvent("gangSystemKickGang",getLocalPlayer(),guiGetText(thenameedit2))
  703. guiSetVisible(kicknamewnd,false)
  704. guiSetInputEnabled(false)
  705. else
  706. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You must fill the name!")
  707. end
  708.  
  709. elseif (source == gangsystemokbtn) then
  710. if not(guiGetText(thenameedit) == "") then
  711. triggerServerEvent("gangSystemInviteGang",getLocalPlayer(),guiGetText(thenameedit))
  712. guiSetVisible(gangsysteminput,false)
  713. guiSetInputEnabled(false)
  714. else
  715. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You must fill the name!")
  716. end
  717.  
  718. elseif (source == skinbtn) then
  719. triggerServerEvent("setPlayerGangSkin",getLocalPlayer(),getLocalPlayer())
  720.  
  721. elseif (source == deletegangbtn) then
  722. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"This feature is not in use in current version..")
  723.  
  724. elseif (source == creategangbtn2) then
  725. if not (guiGetText(gangnameedit) == "") and not (guiGetText(gangskinedit) == "") and not (guiGetText(gangowneredit) == "") then
  726. -- we send datas to server--
  727. triggerServerEvent("gangSystemCreateGang",getLocalPlayer(),guiGetText(gangnameedit),guiGetText(gangskinedit),guiGetText(gangowneredit))
  728. guiSetVisible(createformwnd,false)
  729. guiSetInputEnabled(false)
  730. else
  731. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You must fill all edit's before you can create a gang!")
  732. end
  733.  
  734. elseif (source == creategangbtn) then
  735. guiSetVisible(createformwnd,true)
  736. guiBringToFront(createformwnd)
  737. guiSetInputEnabled(true)
  738.  
  739. elseif (source == jasmodLoginWindowLoginButton) then
  740. local username = guiGetText (jasmodLoginWindowUsernameEdit)
  741. local password = guiGetText (jasmodLoginWindowPasswordEdit)
  742. if (username ~= "") and (password ~= "") then
  743. triggerServerEvent ("lolmodLoginPlayer",getLocalPlayer(),username,password)
  744. else
  745. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Sorry, your username or password is not filled in!\nPlease give up a valid username ans password.")
  746. end
  747. elseif (source == jasmodLoginWindowRegisterButton) then
  748. local username = guiGetText (jasmodLoginWindowUsernameEdit)
  749. local password = guiGetText (jasmodLoginWindowPasswordEdit)
  750. if (username ~= "") and (password ~= "") then
  751. triggerServerEvent ("lolmodRegisterPlayer",getLocalPlayer(),username,password)
  752. else
  753. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Sorry, your username or password is not filled in!\nPlease give up a valid username ans password before registering.")
  754. end
  755. elseif (source == jasmodCharSelectGameEnterButton) then
  756. if (guiGridListGetSelectedItem (jasmodCharSelectGridlist)) then
  757. if (guiGetText (jasmodCharSelectGameEnterButton) == "Enter the game!") then
  758. r,c = guiGridListGetSelectedItem (jasmodCharSelectGridlist)
  759. if (r) then
  760. local name = guiGridListGetItemText (jasmodCharSelectGridlist,r,c,false,false)
  761. guiSetText (theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,"Character Name: " .. name)
  762. triggerServerEvent ("lolmodSpawnCharacter",getLocalPlayer(),name)
  763. toggleControl ("chatbox",true)
  764. guiSetText (jasmodCharSelectGameEnterButton,"Working ...")
  765. setTimer (guiSetAlpha,20000,1,jasmodCharSelectGameEnterButton,1)
  766. setTimer (guiSetText,20000,1,jasmodCharSelectGameEnterButton,"Enter the game!")
  767. end
  768. else
  769. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You're being spawned already!")
  770. end
  771. else
  772. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Make sure you select a character!\nYou can make one by clicking New Character!")
  773. end
  774. elseif (source == jasmodCharSelectNewCharacterButton) then
  775. guiSetVisible (jasmodCharCreateWindow,true)
  776. setCameraMatrix (-1505.55,1377.75,3,-1508.71,1372.91,4)
  777. if not (skinped) then
  778. skinped = createPed (math.random(0,288),-1508.71,1372.91,3.5)
  779. if not (skinped) then
  780. skinped = createPed (math.random(0,288),-1508.71,1372.91,3.5)
  781. end
  782. end
  783. elseif (source == jasmodCharCreateSkinLeftButton) then
  784. local skin = getElementModel (skinped)
  785. if (skin == 0) then setElementModel (skinped,288)
  786. elseif (skin == 7) then setElementModel (skinped,0)
  787. elseif (skin == 9) then setElementModel (skinped,7)
  788. elseif (skin == 43) then setElementModel (skinped,41)
  789. elseif (skin == 66) then setElementModel (skinped,64)
  790. elseif (skin == 75) then setElementModel (skinped,73)
  791. elseif (skin == 87) then setElementModel (skinped,85)
  792. elseif (skin == 120) then setElementModel (skinped,118)
  793. elseif (skin == 150) then setElementModel (skinped,148)
  794. elseif (skin == 209) then setElementModel (skinped,207)
  795. elseif (skin == 274) then setElementModel (skinped,164)
  796. else setElementModel (skinped,skin -1)
  797. end
  798. elseif (source == jasmodCharCreateSkinRightButton) then
  799. local skin = getElementModel (skinped)
  800. if (skin == 288) then setElementModel (skinped,0)
  801. elseif (skin == 0) then setElementModel (skinped,7)
  802. elseif (skin == 7) then setElementModel (skinped,9)
  803. elseif (skin == 41) then setElementModel (skinped,43)
  804. elseif (skin == 64) then setElementModel (skinped,66)
  805. elseif (skin == 73) then setElementModel (skinped,75)
  806. elseif (skin == 85) then setElementModel (skinped,87)
  807. elseif (skin == 118) then setElementModel (skinped,150)
  808. elseif (skin == 148) then setElementModel (skinped,148)
  809. elseif (skin == 207) then setElementModel (skinped,209)
  810. elseif (skin == 264) then setElementModel (skinped,274)
  811. else setElementModel (skinped,skin +1)
  812. end
  813. elseif (source == HUDLBL) then
  814. if (hudShowing == true) then
  815. showPlayerHudComponent ( "ammo", false)
  816. showPlayerHudComponent ( "weapon", false)
  817. showPlayerHudComponent ( "radar", false)
  818. showPlayerHudComponent ( "clock", false)
  819. showPlayerHudComponent ( "money", false)
  820. showPlayerHudComponent ( "health", false)
  821. showPlayerHudComponent ( "armour", false)
  822. hudShowing = false;
  823. outputChatBox("Your HUD is disabled now!",0,255,0)
  824. else
  825. showPlayerHudComponent ( "ammo", true)
  826. showPlayerHudComponent ( "weapon", true)
  827. showPlayerHudComponent ( "radar", true)
  828. showPlayerHudComponent ( "clock", true)
  829. showPlayerHudComponent ( "money", true)
  830. showPlayerHudComponent ( "health", true)
  831. showPlayerHudComponent ( "armour", true)
  832. hudShowing = true;
  833. outputChatBox("Your HUD is enabled now!",0,255,0)
  834. end
  835. elseif (source == CHATLBL) then
  836. if (chatShowing == true) then
  837. showChat(false)
  838. chatShowing = false;
  839. else
  840. showChat(true)
  841. chatShowing = true;
  842. outputChatBox("Your CHAT is showing now",0,255,0)
  843. end
  844. elseif (source == gameHelp) then
  845. toggle()
  846. elseif (source == YESGOTO) then
  847. if (getElementData(getLocalPlayer(),"gotostate") == true) then
  848. outputChatBox("People can't warp to you now",0,255,0)
  849. setElementData (getLocalPlayer(),"gotostate",false)
  850. else
  851. setElementData (getLocalPlayer(),"gotostate",true)
  852. outputChatBox("People can warp to you now",0,255,0)
  853. end
  854. elseif (source == NEWSLBL) then
  855. if (newsShow == true) then
  856. hideNews()
  857. newsShow = false;
  858. else
  859. showNews()
  860. newsShow = true;
  861. end
  862. elseif (source == jasmodCharCreateAccountCreateButton) then
  863. local skin = getElementModel (skinped)
  864. local colorred = guiGetText (jasmodCharCreateNameTagRedEdit)
  865. local colorgreen = guiGetText (jasmodCharCreateNameTagGreenEdit)
  866. local colorblue = guiGetText (jasmodCharCreateNameTagBlueEdit)
  867. local charactername = guiGetText (jasmodCharCreateNameEdit)
  868. if (colorred ~= "") and (colorgreen ~= "") and (colobrlue ~= "") and (charactername ~= "") then
  869. guiSetVisible (jasmodCharCreateWindow,false)
  870. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Your new character has been created!\nPlease, login again.")
  871. guiSetVisible (jasmodLoginWindow,true)
  872. guiSetVisible (jasmodCharSelectWindow,false)
  873. guiSetVisible (jasmodCharCreateWindow,false)
  874. triggerServerEvent ("createNewCharacter",getLocalPlayer(),skin,colorred,colorgreen,colorblue,charactername)
  875. else
  876. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You've forget something!")
  877. end
  878. elseif (source == theGameMenuTabPanelGeneralTabLogoutButton) then
  879. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You are logged out succesfully")
  880. guiSetVisible (jasmodCharCreateWindow,false)
  881. guiSetVisible (jasmodLoginWindow,true)
  882. guiSetVisible (jasmodCharSelectWindow,false)
  883. guiSetVisible (jasmodCharCreateWindow,false)
  884. guiSetVisible (theGameMenuWindow,false)
  885. triggerServerEvent ("logoutPlayer",getLocalPlayer())
  886. showCursor (true,true)
  887. showChat (false)
  888. showPlayerHudComponent ("radar",false)
  889. setCameraMatrix (-2770.24,-1133.92,38.14,-2881.06,-907.75,9.301)
  890. enableWideScreen (getLocalPlayer())
  891. elseif (source == bankWindow1) then
  892. addIntoBankEditDisplay ("1")
  893. elseif (source == bankWindow2) then
  894. addIntoBankEditDisplay ("2")
  895. elseif (source == bankWindow3) then
  896. addIntoBankEditDisplay ("3")
  897. elseif (source == bankWindow4) then
  898. addIntoBankEditDisplay ("4")
  899. elseif (source == bankWindow5) then
  900. addIntoBankEditDisplay ("5")
  901. elseif (source == bankWindow6) then
  902. addIntoBankEditDisplay ("6")
  903. elseif (source == bankWindow7) then
  904. addIntoBankEditDisplay ("7")
  905. elseif (source == bankWindow8) then
  906. addIntoBankEditDisplay ("8")
  907. elseif (source == bankWindow9) then
  908. addIntoBankEditDisplay ("9")
  909. elseif (source == bankWindow0) then
  910. addIntoBankEditDisplay ("0")
  911. elseif (source == bankWindowClose) then
  912. guiSetVisible (bankWindow,false)
  913. guiSetText (bankWindowDisplay,"")
  914. showCursor (false,false)
  915. elseif (source == bankWindowStore) then
  916. triggerServerEvent ("bankStoreMoney",getLocalPlayer(),tonumber(guiGetText(bankWindowDisplay)))
  917. elseif (source == bankWindowWithdraw) then
  918. triggerServerEvent ("bankWithdrawMoney",getLocalPlayer(),tonumber(guiGetText(bankWindowDisplay)))
  919. elseif (source == theGameMenuTabPanelGeneralTabFixCarButton) then
  920. triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"fix")
  921. elseif (source == theGameMenuTabPanelGeneralTabFlipCarButton) then
  922. triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"flip")
  923. elseif (source == theGameMenuTabPanelPlayersTabPlayerRefreshListButton) then
  924. refreshPlayerGridlist ()
  925. elseif (source == wideScreenGUI) then
  926. guiMoveToBack (wideScreenGUI)
  927. elseif (source == theGameMenuTabPanelTaxiTabTaxiButton) then
  928. local row,col = guiGridListGetSelectedItem (theGameMenuTabPanelTaxiTabGridlist)
  929. taxiPlayer (getLocalPlayer(),tonumber(guiGridListGetItemText(theGameMenuTabPanelTaxiTabGridlist,row,col)))
  930. elseif (source == animPlay) then
  931. local row,col = guiGridListGetSelectedItem (theAnimGrid)
  932. playAnimation (getLocalPlayer(),tonumber(guiGridListGetItemText(theAnimGrid,row,col)))
  933. elseif (source == animStop) then
  934. local row,col = guiGridListGetSelectedItem (theAnimGrid)
  935. stopAnimation ()
  936. elseif (source == theGameMenuTabPanelPlayersTabPlayerGetInfoButton) then
  937. local r,c = guiGridListGetSelectedItem (theGameMenuTabPanelPlayersTabPlayerGridlist)
  938. if r and c and (guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)) then
  939. local playernametext = guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)
  940. triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"getPlayerInfo",playernametext)
  941. end
  942. elseif (source == theGameMenuTabPanelPlayersTabGetInfoWindowInfoCloseButton) then
  943. guiSetVisible (theGameMenuTabPanelPlayersTabGetInfoWindow,false)
  944. elseif (source == theGameMenuTabPanelPlayersTabPlayerCarGotoButton) then
  945. if (isPedInVehicle (getLocalPlayer())) then
  946. local r,c = guiGridListGetSelectedItem (theGameMenuTabPanelPlayersTabPlayerGridlist)
  947. if r and c and (guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)) then
  948. local playernametext = guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)
  949. triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"carGotoPlayer",playernametext)
  950. end
  951. else
  952. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"For this you need to be in a vehicle!")
  953. end
  954. elseif (source == theGameMenuTabPanelPlayersTabPlayerGotoButton) then
  955. if not (isPedInVehicle (getLocalPlayer())) then
  956. local r,c = guiGridListGetSelectedItem (theGameMenuTabPanelPlayersTabPlayerGridlist)
  957. if r and c and (guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)) then
  958. local playernametext = guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)
  959. triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"gotoPlayer",playernametext)
  960. end
  961. else
  962. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"For this you don't need to be in a vehicle!\nYou can use car goto")
  963. end
  964. elseif (source == theAmmuNationBuyButton) then
  965. local r,c = guiGridListGetSelectedItem (theAmmuNationGridlist)
  966. if r then
  967. local weaponName = guiGridListGetItemText (theAmmuNationGridlist,r,1)
  968. local weaponTable = findWeaponbyAmmuNationName (weaponName)
  969. if (weaponTable) then
  970. triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"ammunationbuy",weaponTable[1],weaponTable[2],weaponTable[3],weaponTable[4])
  971. else
  972. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"ERROR!")
  973. end
  974. else
  975. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Please select a weapon first!")
  976. end
  977. elseif (source == theAmmuNationCloseButton) then
  978. guiSetVisible (theAmmuNationWindow,false)
  979. showCursor (false,false)
  980. elseif (source == theGameMenuTabPanelVHTabHouseTeleportButton) then
  981. local housenumber = guiGetText (theGameMenuTabPanelVHTabHouseNumberInfoLabel)
  982. triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"warpToHouse",housenumber)
  983. elseif (source == theCarMissionGUIAcceptButton) then
  984. triggerServerEvent ("startSSCarMission",getLocalPlayer())
  985. guiSetVisible (theCarMissionGUIWindow,false)
  986. showCursor (false,false)
  987. elseif (source == theCarMissionGUICloseButton) then
  988. guiSetVisible (theCarMissionGUIWindow,false)
  989. showCursor (false,false)
  990. --
  991. elseif (source == theBoatMissionGUIAcceptButton) then
  992. triggerServerEvent ("startSSBoatMission",getLocalPlayer())
  993. guiSetVisible (theBoatMissionGUIWindow,false)
  994. showCursor (false,false)
  995. elseif (source == theBoatMissionGUICloseButton) then
  996. guiSetVisible (theBoatMissionGUIWindow,false)
  997. showCursor (false,false)
  998. --
  999. elseif (source == theCarShopGUIWindowCloseBut) then
  1000. guiSetVisible (theCarShopGUIWindow,false)
  1001. showCursor (false,false)
  1002. elseif (source == theBikeShopGUIWindowCloseBut) then
  1003. guiSetVisible (theBikeShopGUIWindow,false)
  1004. showCursor (false,false)
  1005. elseif (source == theCarShopGUIWindowBuySlot1But) then
  1006. if (guiGridListGetSelectedItem (theCarShopGUIWindowGridList)) then
  1007. local carName = guiGridListGetItemText (theCarShopGUIWindowGridList, guiGridListGetSelectedItem (theCarShopGUIWindowGridList), 1)
  1008. local carID = getVehicleModelFromName (carName)
  1009. local carCost = guiGridListGetItemText (theCarShopGUIWindowGridList, guiGridListGetSelectedItem (theCarShopGUIWindowGridList), 2)
  1010. triggerServerEvent ("carShopCarBuy", getLocalPlayer(), carID, carCost, carName)
  1011. else
  1012. triggerServerEvent ("falied",getLocalPlayer())
  1013. end
  1014. elseif (source == theCarShopGUIWindowBuySlot2But) then
  1015. if (guiGridListGetSelectedItem (theCarShopGUIWindowGridList)) then
  1016. local carName = guiGridListGetItemText (theCarShopGUIWindowGridList, guiGridListGetSelectedItem (theCarShopGUIWindowGridList), 1)
  1017. local carID = getVehicleModelFromName (carName)
  1018. local carCost = guiGridListGetItemText (theCarShopGUIWindowGridList, guiGridListGetSelectedItem (theCarShopGUIWindowGridList), 2)
  1019. triggerServerEvent ("carShopCarBuy2", getLocalPlayer(), carID, carCost, carName)
  1020. else
  1021. triggerServerEvent ("falied",getLocalPlayer())
  1022. end
  1023. elseif (source == theBikeShopGUIWindowBuySlot1But) then
  1024. if (guiGridListGetSelectedItem (theBikeShopGUIWindowGridList)) then
  1025. local bikeName = guiGridListGetItemText (theBikeShopGUIWindowGridList, guiGridListGetSelectedItem (theBikeShopGUIWindowGridList), 1)
  1026. local bikeID = getVehicleModelFromName (bikeName)
  1027. local bikeCost = guiGridListGetItemText (theBikeShopGUIWindowGridList, guiGridListGetSelectedItem (theBikeShopGUIWindowGridList), 2)
  1028. triggerServerEvent ("bikeShopBikeBuy", getLocalPlayer(), bikeID, bikeCost, bikeName)
  1029. else
  1030. triggerServerEvent ("falied2",getLocalPlayer())
  1031. end
  1032. elseif (source == theBikeShopGUIWindowBuySlot2But) then
  1033. if (guiGridListGetSelectedItem (theBikeShopGUIWindowGridList)) then
  1034. local bikeName = guiGridListGetItemText (theBikeShopGUIWindowGridList, guiGridListGetSelectedItem (theBikeShopGUIWindowGridList), 1)
  1035. local bikeID = getVehicleModelFromName (bikeName)
  1036. local bikeCost = guiGridListGetItemText (theBikeShopGUIWindowGridList, guiGridListGetSelectedItem (theBikeShopGUIWindowGridList), 2)
  1037. triggerServerEvent ("bikeShopBikeBuy2", getLocalPlayer(), bikeID, bikeCost, bikeName)
  1038. else
  1039. triggerServerEvent ("falied2",getLocalPlayer())
  1040. end
  1041. elseif (source == resbtn1) then
  1042. local money = getPlayerMoney(getLocalPlayer())
  1043. if (money > 50) then
  1044. local health = getElementHealth (getLocalPlayer())
  1045. triggerServerEvent("restaurantBuy",getLocalPlayer(),50);
  1046. setElementHealth(getLocalPlayer(),health+5);
  1047. outputChatBox("You have bought mega burger, have fun. Your health increased +5",0,255,0);
  1048. setPedAnimation( getLocalPlayer(), "FOOD", "EAT_Burger",5500,false,false,false)
  1049. setTimer(resetAnim,5500,1)
  1050. else
  1051. outputChatBox("You don't have enough money!",255,0,0);
  1052. end
  1053. elseif (source == resbtn2) then
  1054. local money = getPlayerMoney(getLocalPlayer())
  1055. if (money > 30) then
  1056. local health = getElementHealth (getLocalPlayer())
  1057. triggerServerEvent("restaurantBuy",getLocalPlayer(),30);
  1058. setElementHealth(getLocalPlayer(),health+3);
  1059. outputChatBox("You have bought medium burger, have fun. Your health increased +3",0,255,0);
  1060. setPedAnimation( getLocalPlayer(), "FOOD", "EAT_Burger",5500,false,false,false)
  1061. setTimer(resetAnim,5500,1)
  1062. else
  1063. outputChatBox("You don't have enough money!",255,0,0);
  1064. end
  1065. elseif (source == resbtn3) then
  1066. local money = getPlayerMoney(getLocalPlayer())
  1067. if (money > 20) then
  1068. local health = getElementHealth (getLocalPlayer())
  1069. triggerServerEvent("restaurantBuy",getLocalPlayer(),20);
  1070. setElementHealth(getLocalPlayer(),health+1);
  1071. outputChatBox("You have bought small burger, have fun. Your health increased +1",0,255,0);
  1072. setPedAnimation( getLocalPlayer(), "FOOD", "EAT_Burger",5500,false,false,false)
  1073. setTimer(resetAnim,5500,1)
  1074. else
  1075. outputChatBox("You don't have enough money!",255,0,0);
  1076. end
  1077. elseif (source == resbtn4) then
  1078. local money = getPlayerMoney(getLocalPlayer())
  1079. if (money > 75) then
  1080. local health = getElementHealth (getLocalPlayer())
  1081. triggerServerEvent("restaurantBuy",getLocalPlayer(),75);
  1082. setElementHealth(getLocalPlayer(),health+20);
  1083. outputChatBox("You have bought XXL burger, have fun. Your health increased +20",0,255,0);
  1084. setPedAnimation( getLocalPlayer(), "FOOD", "EAT_Burger",5500,false,false,false)
  1085. setTimer(resetAnim,5500,1)
  1086. else
  1087. outputChatBox("You don't have enough money!",255,0,0);
  1088. end
  1089. elseif (source == resexit) then
  1090. local money = getPlayerMoney(getLocalPlayer())
  1091. guiSetVisible(restaurant,false)
  1092. showCursor(false)
  1093. outputChatBox("Bye bye, come again!",255,255,0);
  1094. elseif (source == minigamebtn) then
  1095. minigam = guiGridListGetSelectedItem( theGameMenuTabPanelMinigameTabGridlist )
  1096. if ( minigam == 0 ) then
  1097. if not (RCWARSSTARTED == true) then
  1098. if not (getElementData(getLocalPlayer(),"RCWAR") == true) then
  1099. money = getPlayerMoney(getLocalPlayer())
  1100. if (money > 1000) then
  1101. name = getPlayerName(getLocalPlayer())
  1102. x,y,z = getElementPosition(getLocalPlayer())
  1103. triggerServerEvent("onRequestRCWars",getLocalPlayer(),name,x,y,z)
  1104. else
  1105. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You don't have enough money to enter RC wars..")
  1106. end
  1107. else
  1108. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You have already joined RC Wars minigame")
  1109. end
  1110. else
  1111. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Sorry, but RC Wars minigame has already started")
  1112. end
  1113. else
  1114. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You need to choose the minigame first.")
  1115. end
  1116. elseif (source == theCarShopGUIWindowBuySlot2But) then
  1117. triggerServerEvent ("falied",getLocalPlayer())
  1118. elseif (source == theGameMenuTabPanelVHTabVehicleSpawnCarOne) then
  1119. triggerServerEvent("carSpawn",getLocalPlayer())
  1120. elseif (source == theGameMenuTabPanelVHTabVehicleDestroyCarOne) then
  1121. triggerServerEvent("carDestroy",getLocalPlayer())
  1122. elseif (source == theGameMenuTabPanelVHTabVehicleDestroyCarTwo) then
  1123. triggerServerEvent("carDestroy2",getLocalPlayer())
  1124. elseif (source == theGameMenuTabPanelVHTabVehicleSpawnCarTwo) then
  1125. triggerServerEvent("carSpawn2",getLocalPlayer())
  1126. elseif (source == theTradeCenterCloseButton) then
  1127. guiSetVisible (theTradeCenterWindow,false)
  1128. showCursor (false,false)
  1129. elseif (source == theNametagShopWindowAcceptButton) then
  1130. if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then
  1131. guiSetVisible (theNametagShopWindow,false)
  1132. showCursor (false,false)
  1133. triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit)))
  1134. else
  1135. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Sorry, you need to fill in numbers!")
  1136. end
  1137. elseif (source == theNametagShopWindowCloseButton) then
  1138. guiSetVisible (theNametagShopWindow,false)
  1139. showCursor (false,false)
  1140. elseif (source == theTradeCenterSellTabSellButton) then
  1141. local sellCar1 = guiRadioButtonGetSelected (theTradeCenterSellTabRadioSl1)
  1142. local sellCar2 = guiRadioButtonGetSelected (theTradeCenterSellTabRadioSl2)
  1143. local priceStr = guiGetText (theTradeCenterSellTabPriceEdit)
  1144. local price = tonumber (priceStr)
  1145. if (price) and (price > 100) and (price < 800000) then
  1146. if (sellCar1 == true) then
  1147. triggerServerEvent ("tradeCenterSellCar",getLocalPlayer(),1,price)
  1148. elseif (sellCar2 == true) then
  1149. triggerServerEvent ("tradeCenterSellCar",getLocalPlayer(),2,price)
  1150. end
  1151. else
  1152. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Make sure your price is all right!\nYou can ask at most 800000$, at lease 100$")
  1153. end
  1154. elseif (source == theTradeCenterBuyTabBuySl1) then
  1155. local r,c = guiGridListGetSelectedItem(theTradeCenterBuyTabGridlist)
  1156. if (r) then
  1157. local listid = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,1)
  1158. local name = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,2)
  1159. local cost = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,3)
  1160. local id = getVehicleModelFromName (name)
  1161. local oldOwner = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,4)
  1162. triggerServerEvent ("tradeCenterBuyCar",getLocalPlayer(),id,cost,name,oldOwner,1,listid)
  1163. else
  1164. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You haven't selected a car you want to buy!")
  1165. end
  1166. elseif (source == theTradeCenterBuyTabBuySl2) then
  1167. local r,c = guiGridListGetSelectedItem(theTradeCenterBuyTabGridlist)
  1168. if (r) then
  1169. local listid = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,1)
  1170. local name = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,2)
  1171. local cost = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,3)
  1172. local id = getVehicleModelFromName (name)
  1173. local oldOwner = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,4)
  1174. triggerServerEvent ("tradeCenterBuyCar",getLocalPlayer(),id,cost,name,oldOwner,2,listid)
  1175. else
  1176. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You haven't selected a car you want to buy!")
  1177. end
  1178. elseif (source == theCowStatsWindowCloseButton) then
  1179. guiSetVisible (theCowStatsWindow,false)
  1180. end
  1181. end)
  1182.  
  1183. function resetAnim()
  1184. setPedAnimation(getLocalPlayer(),false)
  1185. end
  1186.  
  1187.  
  1188. addEvent ("lolmodOpenCharacterSelectWindow",true)
  1189. addEventHandler ("lolmodOpenCharacterSelectWindow",getRootElement(),
  1190. function(username,char1,char2,char3)
  1191. if (source == getLocalPlayer()) then
  1192. guiGridListClear (jasmodCharSelectGridlist)
  1193. guiSetVisible (jasmodLoginWindow,false)
  1194. guiSetVisible (jasmodCharSelectWindow,true)
  1195. if (char1) then
  1196. local row = guiGridListAddRow (jasmodCharSelectGridlist)
  1197. guiGridListSetItemText (jasmodCharSelectGridlist,row,characternameColumn,char1,false,false)
  1198. end
  1199. if (char2) then
  1200. local row = guiGridListAddRow (jasmodCharSelectGridlist)
  1201. guiGridListSetItemText (jasmodCharSelectGridlist,row,characternameColumn,char2,false,false)
  1202. end
  1203. if (char3) then
  1204. local row = guiGridListAddRow (jasmodCharSelectGridlist)
  1205. guiGridListSetItemText (jasmodCharSelectGridlist,row,characternameColumn,char3,false,false)
  1206. end
  1207. end
  1208. end)
  1209.  
  1210. addEvent ("lolmodHideCharacterSelectWindow",true)
  1211. addEventHandler ("lolmodHideCharacterSelectWindow",getRootElement(),
  1212. function()
  1213. guiSetVisible (jasmodCharSelectWindow,false)
  1214. showCursor (false,false)
  1215. showChat (true)
  1216. showPlayerHudComponent ("radar",true)
  1217. disableWideScreen (source)
  1218. end)
  1219.  
  1220. function refreshGameMenuBankAndCash (cash,bank,housenumber)
  1221. if (source == getLocalPlayer()) then
  1222. if (bank) then
  1223. guiSetText (theGameMenuTabPanelGeneralTabBankInfoLabel,"Bank: " .. tostring(bank) .. "$")
  1224. end
  1225. if (housenumber) then
  1226. guiSetText (theGameMenuTabPanelVHTabHouseNumberInfoLabel,tostring(housenumber))
  1227. end
  1228. end
  1229. end
  1230. addEvent ("lolmodRefreshBankInfoMenu",true)
  1231. addEventHandler ("lolmodRefreshBankInfoMenu",getRootElement(),refreshGameMenuBankAndCash)
  1232.  
  1233. function addIntoBankEditDisplay (number)
  1234. local text = guiGetText (bankWindowDisplay)
  1235. guiSetText (bankWindowDisplay, text .. "" .. number)
  1236. end
  1237.  
  1238. addEvent ("openBankWindow",true)
  1239. addEventHandler ("openBankWindow",getRootElement(),
  1240. function(bankname)
  1241. guiSetText (bankWindow,bankname)
  1242. guiSetVisible (bankWindow,true)
  1243. showCursor (true,true)
  1244. end)
  1245.  
  1246. function refreshPlayerGridlist ()
  1247. guiGridListClear (theGameMenuTabPanelPlayersTabPlayerGridlist)
  1248. for i,v in ipairs (getElementsByType ("player")) do
  1249. local row = guiGridListAddRow (theGameMenuTabPanelPlayersTabPlayerGridlist)
  1250. if (getPlayerNametagColor (v)) then
  1251. guiGridListSetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,row,theGameMenuTabPanelPlayersTabPlayerColumn,getPlayerNametagText (v),false,false)
  1252. end
  1253. end
  1254. end
  1255.  
  1256. addEventHandler ("onClientPlayerJoin",getRootElement(),function() refreshPlayerGridlist() end)
  1257.  
  1258. -- Widescreen Functions
  1259. function enableWideScreen (player)
  1260. if (getLocalPlayer() == player) then
  1261. guiSetVisible (wideScreenGUI,true)
  1262. guiMoveToBack (wideScreenGUI)
  1263. end
  1264. end
  1265.  
  1266. function disableWideScreen (player)
  1267. if (getLocalPlayer() == player) then
  1268. guiSetVisible (wideScreenGUI,false)
  1269. end
  1270. end
  1271.  
  1272. -- TAXI!
  1273. function taxiPlayer (player,id)
  1274. if (player == getLocalPlayer()) and (id) then
  1275. local destination = taxis[id]
  1276. if (destination) then
  1277. local name = destination[1]
  1278. local cost = destination[2]
  1279. local x = destination[3]
  1280. local y = destination[4]
  1281. local z = destination[5]
  1282. if name and cost and x and y and z then
  1283. triggerServerEvent ("bringPlayerToTaxiDestination",player,name,cost,x,y,z)
  1284. else
  1285. end
  1286. else
  1287. end
  1288. end
  1289. end
  1290.  
  1291. function stopAnimation()
  1292. triggerServerEvent ("playtheanim",getLocalPlayer(),"false")
  1293. end
  1294.  
  1295. --ANIM
  1296. function playAnimation (player,id)
  1297. if (player == getLocalPlayer()) and (id) then
  1298. local name = animations[id]
  1299. if (name) then
  1300. local group = name[2]
  1301. local ingroup = name[3]
  1302. if name and group and ingroup then
  1303. triggerServerEvent ("playtheanim",getLocalPlayer(),name,group,ingroup)
  1304. else
  1305. end
  1306. else
  1307. end
  1308. end
  1309. end
  1310.  
  1311.  
  1312.  
  1313. addEvent ("gameMenuShowPlayerInfo",true)
  1314. addEventHandler ("gameMenuShowPlayerInfo",getRootElement(),
  1315. function(accountname,charactername,cash,bank,goto)
  1316. guiSetText(infolbl1,"Account Name: " .. accountname)
  1317. guiSetText(infolbl2,"Character Name: " .. charactername)
  1318. guiSetText(infolbl3,"Bank Balance: " .. bank .. "$")
  1319. guiSetText(infolbl4,"Cash In Pocket: " .. cash .. "$")
  1320. guiSetText(infolbl5,"Goto State: " .. goto)
  1321. guiSetVisible (theGameMenuTabPanelPlayersTabGetInfoWindow,true)
  1322. end)
  1323.  
  1324. -- godmode stuff
  1325. addEvent("enableGodMode", true)
  1326. addEvent("disableGodMode", true)
  1327. addEventHandler ("enableGodMode", getRootElement(),
  1328. function()
  1329. removeEventHandler ("onClientPlayerDamage", getRootElement(), cancelEventEvent)
  1330. addEventHandler ("onClientPlayerDamage", getRootElement(), cancelEventEvent)
  1331. end)
  1332.  
  1333. addEventHandler ("disableGodMode", getRootElement(),
  1334. function()
  1335. removeEventHandler ("onClientPlayerDamage", getRootElement(), cancelEventEvent)
  1336. end)
  1337.  
  1338. function cancelEventEvent () cancelEvent() end
  1339.  
  1340. -- ammu nation
  1341. addEventHandler ("onClientMarkerHit",getRootElement(),
  1342. function(hitElement,matchingDimension)
  1343. if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then
  1344. if (source == ammuNationMarker) then
  1345. showCursor (true,true)
  1346. guiSetVisible (theAmmuNationWindow,true)
  1347. elseif (source == wangCarsCarshopMarker) then
  1348. showCursor (true,true)
  1349. guiSetVisible (theCarShopGUIWindow,true)
  1350. elseif (source == bikesCarshopMarker) then
  1351. showCursor (true,true)
  1352. guiSetVisible (theBikeShopGUIWindow,true)
  1353. elseif (source == restaurantMarker) then
  1354. showCursor (true,true)
  1355. guiSetVisible (restaurant,true)
  1356. elseif (source == nametagshopMarker) then
  1357. guiSetVisible (theNametagShopWindow,true)
  1358. showCursor (true,true)
  1359. end
  1360. end
  1361. end)
  1362.  
  1363. function findWeaponbyAmmuNationName (name)
  1364. for i,v in ipairs (ammunation) do
  1365. if (v[1] == name) then
  1366. return v
  1367. end
  1368. end
  1369. end
  1370.  
  1371. addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),
  1372. function()
  1373. x,y = guiGetScreenSize ()
  1374. if (x < 800) and (y < 600) then
  1375. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Hello! we see you are using a screen resolution this gamemode isn't made for!\nPlease change this to 800x600 or bigger.\n\nYou can still play the game. But things might work because we haven't tested this!\nWhen you want to play, and inogre our recommerends, we have no problems with that. But when you're stuck, We don't help you :D\nGood luck with dieing :D")
  1376. end
  1377. end)
  1378.  
  1379. -- Home System
  1380. addEvent ("viewHouseGUIwindow",true)
  1381. addEventHandler ("viewHouseGUIwindow",getRootElement(),
  1382. function(owner,price,housenumber)
  1383. if (source == getLocalPlayer()) then
  1384. guiSetText (theHouseGUIOwnerInfoLabel,owner)
  1385. guiSetText (theHouseGUIPriceInfoLabel,price)
  1386. guiSetText (theHouseGUINumberInfoLabel,housenumber)
  1387. guiSetVisible (theHouseGUIWindow,true)
  1388. showCursor (true,true)
  1389. end
  1390. end)
  1391.  
  1392. addEventHandler ("onClientGUIClick",getRootElement(),
  1393. function(button,state,absX,absY)
  1394. if (source == theHouseGUICloseButton) then
  1395. guiSetVisible (theHouseGUIWindow,false)
  1396. showCursor (false,false)
  1397. elseif (source == theHouseGUIEnterButton) then
  1398. local housenumber = guiGetText (theHouseGUINumberInfoLabel)
  1399. triggerServerEvent ("HouseSystemEnterHouse",getLocalPlayer(),housenumber)
  1400. elseif (source == theHouseGUIBuyButton) then
  1401. local housenumber = guiGetText (theHouseGUINumberInfoLabel)
  1402. triggerServerEvent ("HouseSystemBuyHouse",getLocalPlayer(),housenumber)
  1403. elseif (source == theHouseGUISellButton) then
  1404. local housenumber = guiGetText (theHouseGUINumberInfoLabel)
  1405. triggerServerEvent ("HouseSystemSellHouse",getLocalPlayer(),housenumber)
  1406. elseif (source == theInsideHouseGUIWindowLeaveBut) then
  1407. triggerServerEvent ("HouseSystemLeaveHouse",getLocalPlayer())
  1408. guiSetVisible (theInsideHouseGUIWindow,false)
  1409. elseif (source == theInsideHouseGUIWindowLockBut) then
  1410. if not (guiGetText (theInsideHouseGUIWindowLockBut) == "Owner-Only!") then
  1411. triggerServerEvent ("HouseSystemLockHouse",getLocalPlayer(),guiGetText(theInsideHouseGUIWindowLockBut))
  1412. end
  1413. if (guiGetText (theInsideHouseGUIWindowLockBut) == "lock") then
  1414. guiSetText (theInsideHouseGUIWindowLockBut,"unlock")
  1415. elseif (guiGetText (theInsideHouseGUIWindowLockBut) == "unlock") then
  1416. guiSetText (theInsideHouseGUIWindowLockBut,"lock")
  1417. else
  1418. outputChatBox ("This isn't your house, so you can't lock or unlock it!",255,0,0,false)
  1419. end
  1420. end
  1421. end)
  1422.  
  1423. addEvent ("hideHouseGuiWindow",true)
  1424. addEventHandler("hideHouseGuiWindow",getRootElement(),
  1425. function()
  1426. if (source == getLocalPlayer()) then
  1427. guiSetVisible (theHouseGUIWindow,false)
  1428. showCursor (false,false)
  1429. end
  1430. end)
  1431.  
  1432. addEvent ("enterHouseOpenGuiWindow",true)
  1433. addEventHandler("enterHouseOpenGuiWindow",getRootElement(),
  1434. function(lockstate)
  1435. if (source == getLocalPlayer()) then
  1436. guiSetVisible (theHouseGUIWindow,false)
  1437. showCursor (false,false)
  1438. guiSetVisible (theInsideHouseGUIWindow,true)
  1439. if (lockstate == "unsold") then
  1440. guiSetText (theInsideHouseGUIWindowLockBut,"Owner-Only!")
  1441. elseif (lockstate == "lock") then
  1442. guiSetText (theInsideHouseGUIWindowLockBut,"unlock")
  1443. elseif (lockstate == "unlock") then
  1444. guiSetText (theInsideHouseGUIWindowLockBut,"lock")
  1445. end
  1446. end
  1447. end)
  1448.  
  1449. -- CAR MISSIONS
  1450. addEvent ("startCSCarMission",true)
  1451. addEventHandler ("startCSCarMission",getRootElement(),
  1452. function(number,title,time,carname,description,winMoney)
  1453. if (getLocalPlayer() == source) then
  1454. guiSetText (theCarMissionGUITitle,"Mission ".. number ..": ".. title)
  1455. guiSetText (theCarMissionGUIDescription,description)
  1456. guiSetText (theCarMissionGUIInfoInformationLabel,carname .."\n" .. winMoney .."\n" .. time)
  1457. guiSetVisible (theCarMissionGUIWindow,true)
  1458. showCursor (true,true)
  1459. end
  1460. end)
  1461.  
  1462. -- BOAT MISSIONS
  1463. addEvent ("startCSBoatMission",true)
  1464. addEventHandler ("startCSBoatMission",getRootElement(),
  1465. function(number,title,time,carname,description,winMoney)
  1466. if (getLocalPlayer() == source) then
  1467. guiSetText (theBoatMissionGUITitle,"Mission ".. number ..": ".. title)
  1468. guiSetText (theBoatMissionGUIDescription,description)
  1469. guiSetText (theBoatMissionGUIInfoInformationLabel,carname .."\n" .. winMoney .."\n" .. time)
  1470. guiSetVisible (theBoatMissionGUIWindow,true)
  1471. showCursor (true,true)
  1472. end
  1473. end)
  1474.  
  1475.  
  1476.  
  1477. function parkSystem()
  1478. parkwnd = guiCreateWindow(-3,0,199,219,"Taalas Parking",false)
  1479. park = guiCreateButton(113,182,77,28,"Park (250$)",false,parkwnd)
  1480. lbl = guiCreateLabel(13,29,183,38,"Do you want to park your car?",false,parkwnd)
  1481. guiLabelSetColor(lbl,255,255,255)
  1482. guiLabelSetVerticalAlign(lbl,"top")
  1483. guiLabelSetHorizontalAlign(lbl,"left",false)
  1484.  
  1485. parkimg = guiCreateStaticImage(12,63,95,112,"images/park.jpg",false,parkwnd)
  1486. unpark = guiCreateButton(114,147,74,28,"Unpark (0$)",false,parkwnd)
  1487. exit = guiCreateButton(114,112,74,28,"Exit",false,parkwnd)
  1488. ffslbl = guiCreateLabel(11,197,99,20,"Parking System 0.2",false,parkwnd)
  1489. guiLabelSetColor(ffslbl,255,255,255)
  1490. guiLabelSetVerticalAlign(ffslbl,"top")
  1491. guiLabelSetHorizontalAlign(ffslbl,"left",false)
  1492. guiSetFont(ffslbl,"default-small")
  1493. guiSetVisible(parkwnd,false)
  1494. --]]
  1495. parkmarker = createMarker(-2927.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
  1496. parkmarker2 = createMarker(-2920.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
  1497. parkmarker3 = createMarker(-2913.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
  1498. parkmarker4 = createMarker(-2906.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
  1499. parkmarker5 = createMarker(-2899.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
  1500. parkmarker6 = createMarker(-2892.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
  1501. parkmarker7 = createMarker(-2885.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
  1502. parkmarker8 = createMarker(-2878.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
  1503. parkmarker9 = createMarker(-2871.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
  1504. addEventHandler("onClientGUIClick",park,onPlayerWantToPark);
  1505. addEventHandler("onClientGUIClick",unpark,onPlayerWantToUnpark);
  1506. addEventHandler("onClientGUIClick",exit,exitIt);
  1507. end
  1508. addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),parkSystem)
  1509.  
  1510.  
  1511. function onParkHit(hitPlayer)
  1512. if (source == parkmarker) or (source == parkmarker2) or (source == parkmarker3) or (source == parkmarker4) or (source == parkmarker5) or (source == parkmarker6) or (source == parkmarker7) or (source == parkmarker8) or (source == parkmarker9) then
  1513. if (hitPlayer == getLocalPlayer()) then
  1514. if not (getElementData(source,"park") == "yes") then
  1515. car = getPedOccupiedVehicle(getLocalPlayer())
  1516. if (car) then
  1517. outputChatBox("Welcome to SA park'n'service! Would you like to park your car?",255,0,0);
  1518. guiSetVisible(parkwnd,true);
  1519. showCursor(true);
  1520. setVehicleFrozen(car,true)
  1521. setElementData(source,"park","yes");
  1522. else
  1523. outputChatBox("You trying to park yourself? No way, please, get a car!",255,0,0);
  1524. end
  1525. else
  1526. outputChatBox("This park place is already taken! If this car is parked by you, go into car, so you can unpark it!",255,0,0);
  1527. end
  1528. end
  1529. end
  1530. end
  1531. addEventHandler("onClientMarkerHit",getRootElement(),onParkHit);
  1532.  
  1533. function exitIt()
  1534. if (source == exit) then
  1535. car = getPedOccupiedVehicle(getLocalPlayer())
  1536. addEventHandler("onClientMarkerLeave",getRootElement(),resetData)
  1537. setVehicleFrozen(car,false)
  1538. guiSetVisible(parkwnd,false);
  1539. showCursor(false);
  1540. end
  1541. end
  1542.  
  1543. function onPlayerWantToPark()
  1544. if (source == park) then
  1545. car = getPedOccupiedVehicle(getLocalPlayer())
  1546. local money = getPlayerMoney(getLocalPlayer())
  1547. if (money > 250) then
  1548. name = getPlayerName(getLocalPlayer())
  1549. setElementData(car,"parkowner",name);
  1550. showCursor(false);
  1551. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You have succesfully parked your vehicle!")
  1552. triggerServerEvent("takeAmoney",getLocalPlayer())
  1553. guiSetVisible(parkwnd,false)
  1554. addEventHandler("onClientPlayerVehicleEnter",getRootElement(),parker)
  1555. else
  1556. outputChatBox("You don't have enough money!",255,0,0);
  1557. end
  1558. end
  1559. end
  1560.  
  1561. function parker(vehicle,seat)
  1562. name = getPlayerName(getLocalPlayer())
  1563. if (getElementData(vehicle,"parkowner") == name) then
  1564. guiSetVisible(parkwnd,true);
  1565. showCursor(true);
  1566. end
  1567. end
  1568.  
  1569.  
  1570. function onPlayerWantToUnpark()
  1571. if (source == unpark) then
  1572. car = getPedOccupiedVehicle(getLocalPlayer())
  1573. setVehicleFrozen(car,false)
  1574. showCursor(false)
  1575. triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You have succesfully unparked your vehicle!")
  1576. guiSetVisible(parkwnd,false)
  1577. addEventHandler("onClientMarkerLeave",getRootElement(),resetData)
  1578. end
  1579. end
  1580.  
  1581. function resetData(hitPlayer)
  1582. if (hitPlayer == getLocalPlayer()) then
  1583. setElementData(source,"park","no");
  1584. removeEventHandler("onClientMarkerLeave",getRootElement(),resetData)
  1585. removeEventHandler("onClientPlayerVehicleEnter",getRootElement(),parker)
  1586. end
  1587. end
  1588.  
  1589.  
  1590. addEvent ("openOttoTradeCenter",true)
  1591. addEventHandler ("openOttoTradeCenter",getRootElement(),
  1592. function(carsTable)
  1593. guiGridListClear(theTradeCenterBuyTabGridlist)
  1594. for i,v in pairs (carsTable) do
  1595. local row = guiGridListAddRow (theTradeCenterBuyTabGridlist)
  1596. guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,1,tostring(i),false,true)
  1597. guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,2,getVehicleNameFromModel(v[1]),false,false)
  1598. guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,3,tostring(v[2]),false,true)
  1599. guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,4,v[3],false,false)
  1600. guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,5,tostring(v[4]),false,true)
  1601. end
  1602. guiSetVisible (theTradeCenterWindow,true)
  1603. showCursor (true,true)
  1604. end)
  1605.  
  1606. function gameState()
  1607. RCWARSSTARTED = true
  1608. end
  1609. addEvent("gameHasStarted",true)
  1610. addEventHandler("gameHasStarted",getRootElement(),gameState)
  1611.  
  1612. function gameState2()
  1613. RCWARSSTARTED = false
  1614. end
  1615. addEvent("gameHasStopped",true)
  1616. addEventHandler("gameHasStopped",getRootElement(),gameState2)
  1617.  
  1618. function getActualVelocity( element, x, y, z )
  1619. return (x^2 + y^2 + z^2) ^ 0.5
  1620. end
  1621.  
  1622.  
  1623. -----------------------------
  1624. function getVehicleSpeed( vehicle, units )
  1625. if getElementType( vehicle ) ~= "vehicle" then return false end
  1626. if units == "km/h" or units == 1 then
  1627. return math.floor( getActualVelocity( vehicle, getElementVelocity( vehicle ) ) * 161 )
  1628. elseif units == "mph" or units == 0 or not units then
  1629. return math.floor( getActualVelocity( vehicle, getElementVelocity( vehicle ) ) * 100 )
  1630. end
  1631. end
  1632.  
  1633. -----------------------------
  1634. function getVehicleMaxSpeed( vehicle, units )
  1635. if type( vehicle ) == "number" and ( vehicle >= 400 and vehicle <= 612 ) then
  1636. local vehid = vehicle - 399
  1637. if units == "mph" then return math.floor( g_MaxSpeedInKMPH[ vehid ] * 1.61 ) end
  1638. return g_MaxSpeedInKMPH[ vehid ]
  1639. elseif getElementType( vehicle ) ~= "vehicle" then
  1640. return false
  1641. elseif units == "km/h" or units == 1 then
  1642. return g_MaxSpeedInKMPH[ getVehicleID( vehicle ) - 399 ]
  1643. elseif units == "mph" or units == 0 or not units then
  1644. return math.floor(g_MaxSpeedInKMPH[ getVehicleID( vehicle ) - 399 ] / 1.61 )
  1645. end
  1646. end
  1647.  
  1648. function onClientResStart()
  1649. vehinfownd = guiCreateWindow ( 0.03, 0.4, 0.150, 0.2, "", true )
  1650. vehinfomemo = guiCreateMemo(0.0,0.12,0.98,0.98,"lmao",true,vehinfownd)
  1651. guiSetAlpha(vehinfownd,0.0)
  1652. end
  1653. addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),onClientResStart);
  1654.  
  1655. function onOpenVehicleInfo(text)
  1656. fadeElement(vehinfownd,true)
  1657. guiSetText(vehinfomemo,text)
  1658. setTimer(fadeOut,4000,1)
  1659. end
  1660. addEvent("onOpenInfo",true);
  1661. addEventHandler("onOpenInfo",getRootElement(),onOpenVehicleInfo);
  1662.  
  1663. function fadeOut()
  1664. fadeElement(vehinfownd,false)
  1665. end
  1666.  
  1667.  
  1668. function fadeElement( guiElem, state )
  1669. if state == false then
  1670. local currentAlpha = guiGetAlpha( guiElem );
  1671. local newAlpha = currentAlpha - 0.05;
  1672. if newAlpha < 0 then newAlpha = 0 end
  1673. guiSetAlpha( guiElem, newAlpha );
  1674.  
  1675. if newAlpha ~= 0 then
  1676. setTimer( fadeElement, 50, 1, guiElem, state );
  1677. end
  1678.  
  1679. elseif state == true then
  1680. local currentAlpha = guiGetAlpha( guiElem );
  1681. local newAlpha = currentAlpha + 0.05;
  1682. if newAlpha > 0.8 then newAlpha = 0.8 end
  1683. guiSetAlpha( guiElem, newAlpha );
  1684.  
  1685. if newAlpha ~= 0.8 then
  1686. setTimer( fadeElement, 50, 1, guiElem, state );
  1687. end
  1688.  
  1689. end
  1690. end
  1691.  
  1692. addEventHandler ("onClientGUIChanged",getRootElement(),
  1693. function(element)
  1694. if (element == theNametagShopWindowRedEdit) or (element == theNametagShopWindowGreenEdit) or (element == theNametagShopWindowBlueEdit) then
  1695. guiLabelSetColor (theNametagShopWindowExampleTextLabel,tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText(theNametagShopWindowBlueEdit)))
  1696. end
  1697. end)
  1698.  
  1699. function getCash()
  1700. money = getPlayerMoney(getLocalPlayer())
  1701. guiSetText(cashlbl,"Cash: " .. money .. "$")
  1702. end
  1703.  
  1704. function updateCam1()
  1705. local cx, cy, cz = getElementPosition( thing )
  1706. local tx, ty, tz = getElementPosition( plane )
  1707. setCameraMatrix ( cx, cy, cz, tx, ty, tz )
  1708. end
  1709.  
  1710. function updateCam2()
  1711. local cx, cy, cz = getElementPosition( thing2 )
  1712. local tx, ty, tz = getElementPosition( thing )
  1713. setCameraMatrix ( cx, cy, cz, tx, ty, tz )
  1714. end
  1715.  
  1716. function updateCam3()
  1717. local cx, cy, cz = getElementPosition( thing2 )
  1718. local tx, ty, tz = getElementPosition( thing )
  1719. setCameraMatrix ( cx, cy, cz, tx, ty, tz )
  1720. end
  1721.  
  1722. -- Employment Agency By JasperNL=D
  1723. addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),
  1724. function()
  1725. EmploymentAgencyWindow = guiCreateWindow(0.4563,0.2867,0.4563,0.5433,"Employment Agency",true)
  1726. guiSetVisible (EmploymentAgencyWindow,false)
  1727. guiWindowSetSizable(EmploymentAgencyWindow,false)
  1728. EmploymentAgencyWindowJobsGrid = guiCreateGridList(0.0301,0.1472,0.9397,0.319,true,EmploymentAgencyWindow)
  1729. guiGridListSetSortingEnabled (EmploymentAgencyWindowJobsGrid,false)
  1730. guiGridListSetSelectionMode(EmploymentAgencyWindowJobsGrid,0)
  1731. guiGridListAddColumn(EmploymentAgencyWindowJobsGrid,"Job name",0.5)
  1732. guiGridListAddColumn(EmploymentAgencyWindowJobsGrid,"Owner",0.4)
  1733. EmploymentAgencyWindowJobsLabel = guiCreateLabel(0.2603,0.0675,0.4521,0.0736,"The Jobs",true,EmploymentAgencyWindow)
  1734. guiLabelSetColor(EmploymentAgencyWindowJobsLabel,255,255,255)
  1735. guiLabelSetVerticalAlign(EmploymentAgencyWindowJobsLabel,"center")
  1736. guiLabelSetHorizontalAlign(EmploymentAgencyWindowJobsLabel,"center",false)
  1737. guiSetFont(EmploymentAgencyWindowJobsLabel,"default-bold-small")
  1738. EmploymentAgencyWindowGetJobInfoButton = guiCreateButton(0.7644,0.4755,0.2055,0.0828,"Get info",true,EmploymentAgencyWindow)
  1739. EmploymentAgencyWindowApplicateLabel = guiCreateLabel(0.0438,0.4847,0.3781,0.0767,"Start applicating!",true,EmploymentAgencyWindow)
  1740. guiLabelSetColor(EmploymentAgencyWindowApplicateLabel,255,255,255)
  1741. guiLabelSetVerticalAlign(EmploymentAgencyWindowApplicateLabel,"center")
  1742. guiLabelSetHorizontalAlign(EmploymentAgencyWindowApplicateLabel,"left",false)
  1743. guiSetFont(EmploymentAgencyWindowApplicateLabel,"default-bold-small")
  1744. EmploymentAgencyWindowApplicateMemo = guiCreateMemo(0.0384,0.5644,0.9288,0.2362,"Enter here why you think you're the best one which has to have this job.",true,EmploymentAgencyWindow)
  1745. EmploymentAgencyWindowApplicateButton = guiCreateButton(0.0356,0.8098,0.9315,0.1043,"Applicate!",true,EmploymentAgencyWindow)
  1746. EmploymentAgencyWindowCloseButton = guiCreateButton(0.7507,0.0706,0.2164,0.0736,"Close",true,EmploymentAgencyWindow)
  1747. EmploymentAgencyWindowCopyrightLabel = guiCreateLabel(0.0301,0.911,0.9452,0.0644,"Employment Agency by JasperNL=D",true,EmploymentAgencyWindow)
  1748. guiLabelSetColor(EmploymentAgencyWindowCopyrightLabel,255,255,255)
  1749. guiLabelSetVerticalAlign(EmploymentAgencyWindowCopyrightLabel,"center")
  1750. guiLabelSetHorizontalAlign(EmploymentAgencyWindowCopyrightLabel,"right",false)
  1751. guiSetFont(EmploymentAgencyWindowCopyrightLabel,"default-small")
  1752.  
  1753. EmploymentAgencyInfoWindow = guiCreateWindow(0.065,0.31,0.3288,0.37,"Employment Agency Job Info",true)
  1754. guiSetVisible (EmploymentAgencyInfoWindow,false)
  1755. guiWindowSetSizable(EmploymentAgencyInfoWindow,false)
  1756. EmploymentAgencyInfoWindowInformationMemo = guiCreateMemo(0.0342,0.0946,0.9316,0.7162,"",true,EmploymentAgencyInfoWindow)
  1757. guiMemoSetReadOnly(EmploymentAgencyInfoWindowInformationMemo,true)
  1758. EmploymentAgencyInfoWindowCloseButton = guiCreateButton(0.0342,0.8288,0.9316,0.1306,"Close Job Information",true,EmploymentAgencyInfoWindow)
  1759.  
  1760. EmploymentAgencyMyJobWindow = guiCreateWindow(0.3913,0.27,0.2288,0.4033,"My Job",true)
  1761. guiSetVisible (EmploymentAgencyMyJobWindow,false)
  1762. guiWindowSetSizable(EmploymentAgencyMyJobWindow,false)
  1763. EmploymentAgencyMyJobWindowCloseWindowButton = guiCreateButton(0.0492,0.8636,0.9016,0.0992,"Close",true,EmploymentAgencyMyJobWindow)
  1764. EmploymentAgencyMyJobWindowJobLabel = guiCreateLabel(0.0437,0.1033,0.9126,0.0744,"Job",true,EmploymentAgencyMyJobWindow)
  1765. guiLabelSetColor(EmploymentAgencyMyJobWindowJobLabel,255,255,255)
  1766. guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowJobLabel,"top")
  1767. guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowJobLabel,"left",false)
  1768. EmploymentAgencyMyJobWindowJobInfoLabel = guiCreateLabel(0.0383,0.1777,0.9235,0.0744,"-- JOB TITLE --",true,EmploymentAgencyMyJobWindow)
  1769. guiLabelSetColor(EmploymentAgencyMyJobWindowJobInfoLabel,255,255,255)
  1770. guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowJobInfoLabel,"top")
  1771. guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowJobInfoLabel,"right",false)
  1772. EmploymentAgencyMyJobWindowPaydayLabel = guiCreateLabel(0.0437,0.2603,0.918,0.0744,"Payday",true,EmploymentAgencyMyJobWindow)
  1773. guiLabelSetColor(EmploymentAgencyMyJobWindowPaydayLabel,255,255,255)
  1774. guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowPaydayLabel,"top")
  1775. guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowPaydayLabel,"left",false)
  1776. EmploymentAgencyMyJobWindowPaydayInfoLabel = guiCreateLabel(0.0437,0.3388,0.918,0.0744,"-- PAYDAY --",true,EmploymentAgencyMyJobWindow)
  1777. guiLabelSetColor(EmploymentAgencyMyJobWindowPaydayInfoLabel,255,255,255)
  1778. guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowPaydayInfoLabel,"top")
  1779. guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowPaydayInfoLabel,"right",false)
  1780. EmploymentAgencyMyJobWindowLeaveJobButton = guiCreateButton(0.0492,0.7355,0.8907,0.1074,"Leave this job",true,EmploymentAgencyMyJobWindow)
  1781. EmploymentAgencyMyJobWindowJobOwnerLabel = guiCreateLabel(0.0437,0.4174,0.918,0.0744,"Your Boss",true,EmploymentAgencyMyJobWindow)
  1782. guiLabelSetColor(EmploymentAgencyMyJobWindowJobOwnerLabel,255,255,255)
  1783. guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowJobOwnerLabel,"top")
  1784. guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowJobOwnerLabel,"left",false)
  1785. EmploymentAgencyMyJobWindowJobOwnerInfoLabel = guiCreateLabel(0.0437,0.4917,0.918,0.0744,"-- JOB OWNER --",true,EmploymentAgencyMyJobWindow)
  1786. guiLabelSetColor(EmploymentAgencyMyJobWindowJobOwnerInfoLabel,255,255,255)
  1787. guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowJobOwnerInfoLabel,"top")
  1788. guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowJobOwnerInfoLabel,"right",false)
  1789.  
  1790.  
  1791. jobBossPanel = guiCreateWindow(0.015,0.2133,0.4,0.5133,"Job Boss Panel",true)
  1792. guiSetVisible (jobBossPanel,false)
  1793. jobBossPanelTabPanel = guiCreateTabPanel(0.0313,0.0779,0.9312,0.8864,true,jobBossPanel)
  1794. jobBossPanelTabPanelAppTab = guiCreateTab("Applications",jobBossPanelTabPanel)
  1795. guiGridListSetSelectionMode(jobBossPanelTabPanelAppTab,0)
  1796. jobBossPanelTabPanelAppTabGrid = guiCreateGridList(0.0201,0.0241,0.9597,0.8353,true,jobBossPanelTabPanelAppTab)
  1797. guiGridListAddColumn(jobBossPanelTabPanelAppTabGrid,"Character Name",0.9)
  1798. jobBossPanelTabPanelAppTabAcceptButton = guiCreateButton(0.0168,0.8715,0.9631,0.1084,"Accept Application",true,jobBossPanelTabPanelAppTab)
  1799. jobBossPanelTabPanelEmpTab = guiCreateTab("Current Employment",jobBossPanelTabPanel)
  1800. jobBossPanelTabPanelEmpTabGrid = guiCreateGridList(0.0201,0.0321,0.9564,0.8112,true,jobBossPanelTabPanelEmpTab)
  1801. guiGridListSetSelectionMode(jobBossPanelTabPanelEmpTabGrid,0)
  1802. guiGridListAddColumn(jobBossPanelTabPanelEmpTabGrid,"Character Name",0.6)
  1803. guiGridListAddColumn(jobBossPanelTabPanelEmpTabGrid,"Worker Payday",0.2)
  1804. jobBossPanelTabPanelEmpTabFireButton = guiCreateButton(0.0201,0.8554,0.9564,0.1245,"Fire selected player",true,jobBossPanelTabPanelEmpTab)
  1805. end)
  1806.  
  1807. addEvent ("jobOpenJobInformationWindowAndOtherCrap",true)
  1808. addEventHandler ("jobOpenJobInformationWindowAndOtherCrap",getRootElement(),
  1809. function (job,payday,boss,thing1,thing2)
  1810. if (boss == "You are the boss xD") then
  1811. guiSetText (EmploymentAgencyMyJobWindowJobOwnerInfoLabel,boss)
  1812. guiSetText (EmploymentAgencyMyJobWindowPaydayInfoLabel,payday .. "$")
  1813. guiSetText (EmploymentAgencyMyJobWindowJobInfoLabel,job)
  1814. guiSetVisible (EmploymentAgencyMyJobWindow,true)
  1815. guiGridListClear (jobBossPanelTabPanelAppTabGrid)
  1816. guiGridListClear (jobBossPanelTabPanelEmpTabGrid)
  1817. for i,v in pairs (thing1) do
  1818. local row = guiGridListAddRow (jobBossPanelTabPanelEmpTabGrid)
  1819. guiGridListSetItemText (jobBossPanelTabPanelEmpTabGrid,row,1,v[1],false,false)
  1820. guiGridListSetItemText (jobBossPanelTabPanelEmpTabGrid,row,2,v[2],false,false)
  1821. end
  1822. for i,v in pairs (thing2) do
  1823. local row = guiGridListAddRow (jobBossPanelTabPanelAppTabGrid)
  1824. guiGridListSetItemText (jobBossPanelTabPanelAppTabGrid,row,1,v,false,false)
  1825. end
  1826. guiSetVisible (jobBossPanel,true)
  1827. showCursor (true,true)
  1828. else
  1829. if (job == "none") then
  1830. guiGridListClear (EmploymentAgencyWindowJobsGrid)
  1831. for i,v in pairs (payday) do
  1832. local row = guiGridListAddRow (EmploymentAgencyWindowJobsGrid)
  1833. guiGridListSetItemText (EmploymentAgencyWindowJobsGrid,row,1,v[1],false,false)
  1834. guiGridListSetItemText (EmploymentAgencyWindowJobsGrid,row,2,v[2],false,false)
  1835. end
  1836. guiSetVisible (EmploymentAgencyWindow,true)
  1837. showCursor (true,true)
  1838. else
  1839. guiSetText (EmploymentAgencyMyJobWindowJobOwnerInfoLabel,boss)
  1840. guiSetText (EmploymentAgencyMyJobWindowPaydayInfoLabel,payday .. "$")
  1841. guiSetText (EmploymentAgencyMyJobWindowJobInfoLabel,job)
  1842. guiSetVisible (EmploymentAgencyMyJobWindow,true)
  1843. showCursor (true,true)
  1844. end
  1845. end
  1846. end)
  1847.  
  1848. addEventHandler ("onClientGUIClick",getRootElement(),
  1849. function()
  1850. if (source == EmploymentAgencyWindowGetJobInfoButton) then
  1851. local row,col = guiGridListGetSelectedItem (EmploymentAgencyWindowJobsGrid)
  1852. if (row == 0) then
  1853. guiSetText (EmploymentAgencyInfoWindowInformationMemo,"The polices protects the city for criminals. \nCriminals are people with a wanted star above their head.\nWhen you want to jail those people. Aim them, and when you're in a short range. press E.\nFor aresting people you get money, but you need to wait until the payday for that.")
  1854. guiSetVisible (EmploymentAgencyInfoWindow,true)
  1855. showCursor (true,true)
  1856. elseif (row == 1) then
  1857. guiSetText (EmploymentAgencyInfoWindowInformationMemo,"City cleaner, an easy job. But you'll get bored fast.\nDrive around with a sweeper, bring it to the dump, and earn your money at the payday.")
  1858. guiSetVisible (EmploymentAgencyInfoWindow,true)
  1859. showCursor (true,true)
  1860. elseif (row == 2) then
  1861. guiSetText (EmploymentAgencyInfoWindowInformationMemo,"Drug Dealer, uhm. ye. i don't know exactly what it needs to do because I (JasperNL=D) am not responsible for the developping of this o_o")
  1862. guiSetVisible (EmploymentAgencyInfoWindow,true)
  1863. showCursor (true,true)
  1864. elseif (row == 3) then
  1865. guiSetText (EmploymentAgencyInfoWindowInformationMemo,"Farming, a cool job:D plant seeds and let plants grow.\nCut them down and get money on the payday.")
  1866. guiSetVisible (EmploymentAgencyInfoWindow,true)
  1867. showCursor (true,true)
  1868. else
  1869. outputChatBox ("bug?")
  1870. end
  1871. elseif (source == EmploymentAgencyWindowApplicateButton) then
  1872. local row,col = guiGridListGetSelectedItem (EmploymentAgencyWindowJobsGrid)
  1873. if (guiGetText (EmploymentAgencyWindowApplicateMemo) ~= "") then
  1874. local reason = guiGetText (EmploymentAgencyWindowApplicateMemo)
  1875. if (row == 0) then
  1876. triggerServerEvent ("jobApplicateToJob",getLocalPlayer(),"police",reason)
  1877. elseif (row == 1) then
  1878. triggerServerEvent ("jobApplicateToJob",getLocalPlayer(),"sweeper",reason)
  1879. elseif (row == 2) then
  1880. triggerServerEvent ("jobApplicateToJob",getLocalPlayer(),"drug",reason)
  1881. elseif (row == 3) then
  1882. triggerServerEvent ("jobApplicateToJob",getLocalPlayer(),"farm",reason)
  1883. else
  1884. outputChatBox ("bug?")
  1885. end
  1886. else
  1887. outputChatBox ("Fill in why you want the job first!",255,0,0,false)
  1888. end
  1889. elseif (source == EmploymentAgencyWindowCloseButton) then
  1890. guiSetVisible (EmploymentAgencyWindow,false)
  1891. guiSetVisible (EmploymentAgencyInfoWindow,false)
  1892. showCursor (false,false)
  1893. elseif (source == EmploymentAgencyInfoWindowCloseButton) then
  1894. guiSetVisible (EmploymentAgencyInfoWindow,false)
  1895. elseif (source == EmploymentAgencyMyJobWindowCloseWindowButton) then
  1896. guiSetVisible (EmploymentAgencyMyJobWindow,false)
  1897. guiSetVisible (jobBossPanel,false)
  1898. showCursor (false,false)
  1899. elseif (source == EmploymentAgencyMyJobWindowLeaveJobButton) then
  1900. triggerServerEvent ("jobLeaveJob",getLocalPlayer())
  1901. guiSetVisible (EmploymentAgencyMyJobWindow,false)
  1902. guiSetVisible (jobBossPanel,false)
  1903. showCursor (false,false)
  1904. elseif (source == jobBossPanelTabPanelAppTabAcceptButton) then
  1905. local row,col = guiGridListGetSelectedItem (jobBossPanelTabPanelAppTabGrid)
  1906. if (row) then
  1907. local acceptName = guiGridListGetItemText (jobBossPanelTabPanelAppTabGrid,row,1)
  1908. triggerServerEvent ("jobAcceptApplication",getLocalPlayer(),acceptName)
  1909. guiSetVisible (EmploymentAgencyMyJobWindow,false)
  1910. guiSetVisible (jobBossPanel,false)
  1911. showCursor (false,false)
  1912. else
  1913. outputChatBox ("First select the person you wish to accept :>",getLocalPlayer(),255,0,0,false)
  1914. end
  1915. end
  1916. end)
  1917.  
  1918.  
  1919. --[[ VERWIJDERD
  1920. -- bovenhoofd gedeelte
  1921. wantedPlayerList = {}
  1922. tagPlayerList = {}
  1923.  
  1924. addEvent ("jobToggleOnDuty",true)
  1925. addEventHandler ("jobToggleOnDuty",getRootElement(),
  1926. function(thing)
  1927. local tempTable = {source,thing}
  1928. table.insert (tagPlayerList,tempTable)
  1929. end)
  1930.  
  1931. addEvent ("jobToggleOffDuty",true)
  1932. addEventHandler ("jobToggleOffDuty",getRootElement(),
  1933. function ()
  1934. table.remove (tagPlayerList,searchPlayerIndexInTagTable (source))
  1935. end)
  1936.  
  1937. function searchPlayerIndexInTagTable (player)
  1938. for i,v in pairs (table) do
  1939. if (v[1] == source) then
  1940. return i
  1941. end
  1942. end
  1943. end
  1944.  
  1945. function showLevelTags ()
  1946. for i,v in pairs (tagPlayerList) do
  1947. showTag (v[1],v[2])
  1948. end
  1949. end
  1950.  
  1951. function showTag (player,tag)
  1952. if (getLocalPlayer() ~= player) then
  1953. if (player) and (isElementOnScreen (player)) then
  1954. local x,y,z = getElementPosition (getLocalPlayer())
  1955. local x1,y1,z1 = getElementPosition (player)
  1956. if (getDistanceBetweenPoints3D (x,y,z,x1,y1,z1) < 50) and (isLineOfSightClear (x,y,z,x1,y1,z1)) then
  1957. local sx,sy = getScreenFromWorldPosition (x1,y1,z1 +1,0,false)
  1958. if (sx) and (sy) then
  1959. dxDrawImage (sx -12,sy -12,24,24,tag)
  1960. end
  1961. end
  1962. end
  1963. end
  1964. end
  1965. addEventHandler ("onClientRender",getRootElement(),showLevelTags)
  1966. ]]--
  1967.  
  1968. addEvent ("clientUpdateCowWindow",true)
  1969. addEventHandler ("clientUpdateCowWindow",getRootElement(),
  1970. function(liter)
  1971. guiSetText (theCowStatsWindowMilkValueLabel, tostring (liter) .. "/10L")
  1972. playSound ("files/moo.mp3",false)
  1973. end)
  1974.  
  1975. addEvent ("clientViewCowWindow",true)
  1976. addEventHandler("clientViewCowWindow",getRootElement(),
  1977. function (viewhide)
  1978. guiSetVisible (theCowStatsWindow,viewhide)
  1979. end)
  1980.  
  1981. --[[function showintro()
  1982. fadeCamera( false, 0.5, 255, 55, 0 )
  1983. setTimer(
  1984. function ()
  1985. fadeCamera( true, 1.2, 255, 125, 0 )
  1986. moveObject( plane, 9000, 1477.4921875,1621.83203125, 12.011219978333)
  1987. addEventHandler( 'onClientPreRender', gR, updateCam )
  1988. setTimer( function() removeEventHandler( 'onClientPreRender', root, updateCam ) setCameraTarget( gMe, gMe ) end, 8900, 1 )
  1989. end
  1990. , 1000, 1 )
  1991. end--]]
  1992.  
  1993. local gR = getRootElement()
  1994. local gRR = getResourceRootElement( getThisResource() )
  1995. local gMe = getLocalPlayer()
  1996.  
  1997. local plane = createObject(1681,1480.6881103516,1896.1604003906,46.635292053223,0,0,180)
  1998. local thing = createObject( 3803,1503.2192382813,1730.5847167969,12.067991256714,0,0,316.32998657227)
  1999. local thing2 = createObject( 3803, 1870.99,1434.35,80 )
  2000.  
  2001. setElementDimension( plane, 1 )
  2002. setElementDimension( thing, 1 )
  2003.  
  2004. setElementAlpha( thing, 0 )
  2005. setElementAlpha( thing2, 0 )
  2006.  
  2007. function showintro()
  2008. fader = guiCreateStaticImage(0,0,1.9992,1.999,"images/widescreen.png",true)
  2009. showPlayerHudComponent( "radar", false )
  2010. fadeCamera( false, 0.5, 0, 0, 0 )
  2011. setElementDimension( gMe,1 )
  2012. setTimer(
  2013. function ()
  2014. fadeCamera( true, 1.2, 0, 0, 0 )
  2015. p1 = guiCreateStaticImage(0.3281,0.8486,0.4172,0.1494,"images/1.png",true)
  2016. moveObject( plane, 9000, 1477.4921875,1621.83203125, 12.011219978333)
  2017. setTimer(
  2018. function ()
  2019. fadeCamera( false, 1.0, 0, 0, 0 )
  2020. end
  2021. , 7500, 1 )
  2022. addEventHandler( 'onClientPreRender', gR, updateCam1 )
  2023. setTimer(
  2024. function ()
  2025. moveObject( thing, 8500, 2000,1547,40 )
  2026. destroyElement( p1 )
  2027. p2 = guiCreateStaticImage(0.3281,0.8486,0.4172,0.1494,"images/2.png",true)
  2028. fadeCamera( true, 0.5, 0, 0, 0 )
  2029. addEventHandler( 'onClientPreRender', gR, updateCam2 )
  2030. setTimer(
  2031. function ()
  2032. moveObject( thing2, 8000, 2057,1744, 11 )
  2033. destroyElement( p2 )
  2034. p3 = guiCreateStaticImage(0.3281,0.8486,0.4172,0.1494,"images/3.png",true)
  2035. --addEventHandler( 'onClientPreRender', gR, updateCam2 )
  2036. setTimer(
  2037. function ()
  2038. moveObject( thing2, 9000, 2048.20,1477.60,11 )
  2039. moveObject( thing, 6000, 2039.08,1430,15 )
  2040. destroyElement( p3 )
  2041. p4 = guiCreateStaticImage(0.3281,0.8486,0.4172,0.1494,"images/4a.png",true)
  2042. setTimer( function () destroyElement(p4) p5 = guiCreateStaticImage(0.3281,0.8486,0.4172,0.1494,"images/5.png",true) fadeCamera( false, 6.5, 0, 0, 0 ) end, 4000, 1 )
  2043. addEventHandler( 'onClientPreRender', gR, updateCam3 )
  2044.  
  2045. setTimer(
  2046. function()
  2047. removeEventHandler( 'onClientPreRender', gR, updateCam1 )
  2048. removeEventHandler( 'onClientPreRender', gR, updateCam2 )
  2049. removeEventHandler( 'onClientPreRender', gR, updateCam3 )
  2050. setElementDimension( gMe,0 )
  2051. setCameraTarget( gMe, gMe )
  2052. showPlayerHudComponent( "radar", true )
  2053. destroyElement( fader )
  2054. destroyElement( p5 )
  2055. fadeCamera( true, 1.5, 0, 0, 0 )
  2056. setCameraTarget (gMe,gMe)
  2057. end
  2058. , 10500, 1 )
  2059. end
  2060. , 8500, 1 )
  2061. end
  2062. , 9000, 1 )
  2063. end
  2064. , 8000, 1 )
  2065. end
  2066. , 1000, 1 )
  2067. end
  2068.  
  2069. addCommandHandler("intro",
  2070. function ()
  2071. showintro()
  2072. end
  2073. )
  2074.  
  2075. function updateCam1()
  2076. local cx, cy, cz = getElementPosition( thing )
  2077. local tx, ty, tz = getElementPosition( plane )
  2078. setCameraMatrix ( cx, cy, cz, tx, ty, tz )
  2079. end
  2080.  
  2081. function updateCam2()
  2082. local cx, cy, cz = getElementPosition( thing2 )
  2083. local tx, ty, tz = getElementPosition( thing )
  2084. setCameraMatrix ( cx, cy, cz, tx, ty, tz )
  2085. end
  2086.  
  2087. function updateCam3()
  2088. local cx, cy, cz = getElementPosition( thing2 )
  2089. local tx, ty, tz = getElementPosition( thing )
  2090. setCameraMatrix ( cx, cy, cz, tx, ty, tz )
  2091. end
  2092.  
  2093.  
  2094.  
  2095. addEvent ("clientShowIntroCamStuff",true)
  2096. addEventHandler ("clientShowIntroCamStuff",getRootElement(),
  2097. function()
  2098. showintro ()
  2099. for i,v in pairs (getElementsByType ("gui-window")) do
  2100. guiSetVisible (v,false)
  2101. end
  2102. end)
Add Comment
Please, Sign In to add comment