Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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}}
- animations = {{"Wank","PAULNMAC","wank_loop"},{"Piss","PAULNMAC","Piss_loop"},{"Sunbathing","SUNBATHE","ParkSit_M_IdleB"},{"Sit","Ped","SEAT_idle"},{"Bitch Slap","misc","bitchslap"}}
- 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}}
- addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),
- function()
- -- login window
- theGameMenuTabPanelVHTabHouseNumberInfoLabel = guiCreateLabel (0,0,0,0," -- HOUSE NUMBER -- ",false,nil)
- jasmodLoginWindow = guiCreateWindow(0.35875,0.285,0.28375,0.4167,"JasperNL=D Roleplay",false)
- --toggleControl ("chatbox",false)
- guiWindowSetMovable(jasmodLoginWindow,false)
- guiWindowSetSizable(jasmodLoginWindow,false)
- jasmodLoginWindowUsernameLabel = guiCreateLabel(0.0352,0.108,0.859,0.112,"Username",true,jasmodLoginWindow)
- guiLabelSetColor(jasmodLoginWindowUsernameLabel,255,255,255)
- guiLabelSetVerticalAlign(jasmodLoginWindowUsernameLabel,"center")
- guiLabelSetHorizontalAlign(jasmodLoginWindowUsernameLabel,"left",false)
- jasmodLoginWindowUsernameEdit = guiCreateEdit(0.0749,0.248,0.8238,0.124,"",true,jasmodLoginWindow)
- guiEditSetMaxLength(jasmodLoginWindowUsernameEdit,20)
- jasmodLoginWindowPasswordEdit = guiCreateEdit(0.0749,0.54,0.8238,0.124,"",true,jasmodLoginWindow)
- guiEditSetMasked(jasmodLoginWindowPasswordEdit,true)
- guiEditSetMaxLength(jasmodLoginWindowPasswordEdit,20)
- jasmodLoginWindowPasswordLabel = guiCreateLabel(0.0352,0.396,0.8062,0.12,"Password",true,jasmodLoginWindow)
- guiLabelSetColor(jasmodLoginWindowPasswordLabel,255,255,255)
- guiLabelSetVerticalAlign(jasmodLoginWindowPasswordLabel,"center")
- guiLabelSetHorizontalAlign(jasmodLoginWindowPasswordLabel,"left",false)
- jasmodLoginWindowLoginButton = guiCreateButton(0.0441,0.704,0.9031,0.108,"Log in",true,jasmodLoginWindow)
- jasmodLoginWindowRegisterButton = guiCreateButton(0.0441,0.836,0.9031,0.108,"Register",true,jasmodLoginWindow)
- guiSetVisible (jasmodLoginWindow, false )
- --showCursor (true,true)
- --showChat (false)
- --setCameraMatrix (-2770.24,-1133.92,38.14,-2881.06,-907.75,9.301) Oude cam in SF
- --setCameraMatrix (966.36157226563,2589.4494628906,10.156999588013,966.626953125,2588.5498046875,10.503839492798,0,70)
- --showPlayerHudComponent ("radar",false)
- fadeCamera (true,2.5)
- -- Nametag Shop
- theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true)
- guiWindowSetSizable(theNametagShopWindow,false)
- theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow)
- guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255)
- guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top")
- guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false)
- theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow)
- guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255)
- guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top")
- guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false)
- theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow)
- guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255)
- guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top")
- guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false)
- theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow)
- theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow)
- theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow)
- guiEditSetMaxLength (theNametagShopWindowRedEdit,3)
- guiEditSetMaxLength (theNametagShopWindowGreenEdit,3)
- guiEditSetMaxLength (theNametagShopWindowBlueEdit,3)
- theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow)
- guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255)
- guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center")
- guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false)
- theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow)
- theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow)
- guiSetVisible(theNametagShopWindow,false)
- -- informatie window
- jasmodInfoWindow = guiCreateWindow(0.285,0.0267,0.4563,0.29,"Roleplay Info Window",true)
- guiSetVisible (jasmodInfoWindow,false)
- jasmodInfoWindowExitButton = guiCreateButton(0.0247,0.8333,0.9507,0.1149,"Ok",true,jasmodInfoWindow)
- jasmodInfoWindowMemo = guiCreateMemo(0.0247,0.1149,0.9507,0.6954,"BlahBlah",true,jasmodInfoWindow)
- guiMemoSetReadOnly(jasmodInfoWindowMemo,true)
- -- character select window
- jasmodCharSelectWindow = guiCreateWindow(0.75,0,0.25,1,"Select your character!",true)
- guiSetVisible (jasmodCharSelectWindow,false)
- guiWindowSetMovable(jasmodCharSelectWindow,false)
- guiWindowSetSizable(jasmodCharSelectWindow,false)
- jasmodCharSelectNewCharacterButton = guiCreateButton(0.045,0.04,0.89,0.05,"New Character",true,jasmodCharSelectWindow)
- jasmodCharSelectGridlist = guiCreateGridList(0.045,0.0967,0.905,0.5417,true,jasmodCharSelectWindow)
- guiGridListSetSelectionMode(jasmodCharSelectGridlist,2)
- characternameColumn = guiGridListAddColumn(jasmodCharSelectGridlist,"Character Name",0.8)
- jasmodCharSelectGameEnterButton = guiCreateButton(0.045,0.645,0.91,0.0517,"Enter the game!",true,jasmodCharSelectWindow)
- -- jasmodCharSelectGameDeleteButton = guiCreateButton(0.045,0.645,0.91,0.0517,"Delete this character!\nBE SURE!",true,jasmodCharSelectWindow)
- -- character create window
- jasmodCharCreateWindow = guiCreateWindow(0.0137,0.03,0.2262,0.4683,"Create your character!",true)
- guiSetVisible (jasmodCharCreateWindow,false)
- guiWindowSetSizable(jasmodCharCreateWindow,false)
- jasmodCharCreateSkinLeftButton = guiCreateButton(0.0497,0.1957,0.2652,0.1566,"<",true,jasmodCharCreateWindow)
- jasmodCharCreateSkinLabel = guiCreateLabel(0.0663,0.089,0.8343,0.0925,"Select the skin",true,jasmodCharCreateWindow)
- guiLabelSetColor(jasmodCharCreateSkinLabel,255,255,255)
- guiLabelSetVerticalAlign(jasmodCharCreateSkinLabel,"center")
- guiLabelSetHorizontalAlign(jasmodCharCreateSkinLabel,"center",false)
- jasmodCharCreateSkinRightButton = guiCreateButton(0.6685,0.1957,0.2652,0.1566,">",true,jasmodCharCreateWindow)
- jasmodCharCreateNameTagLabel = guiCreateLabel(0.0497,0.3772,0.895,0.0712,"Name Tag Color (0-255)",true,jasmodCharCreateWindow)
- guiLabelSetColor(jasmodCharCreateNameTagLabel,255,255,255)
- guiLabelSetVerticalAlign(jasmodCharCreateNameTagLabel,"top")
- guiLabelSetHorizontalAlign(jasmodCharCreateNameTagLabel,"left",false)
- jasmodCharCreateNameTagRedLabel = guiCreateLabel(0.0497,0.4555,0.2818,0.0712,"Red",true,jasmodCharCreateWindow)
- guiLabelSetColor(jasmodCharCreateNameTagRedLabel,255,255,255)
- guiLabelSetVerticalAlign(jasmodCharCreateNameTagRedLabel,"top")
- guiLabelSetHorizontalAlign(jasmodCharCreateNameTagRedLabel,"left",false)
- jasmodCharCreateNameTagGreenLabel = guiCreateLabel(0.0497,0.5338,0.2818,0.0797,"Green",true,jasmodCharCreateWindow)
- guiLabelSetColor(jasmodCharCreateNameTagGreenLabel,255,255,255)
- guiLabelSetVerticalAlign(jasmodCharCreateNameTagGreenLabel,"top")
- guiLabelSetHorizontalAlign(jasmodCharCreateNameTagGreenLabel,"left",false)
- jasmodCharCreateNameTagBlueLabel = guiCreateLabel(0.0497,0.6121,0.2818,0.0797,"Blue",true,jasmodCharCreateWindow)
- guiLabelSetColor(jasmodCharCreateNameTagBlueLabel,255,255,255)
- guiLabelSetVerticalAlign(jasmodCharCreateNameTagBlueLabel,"top")
- guiLabelSetHorizontalAlign(jasmodCharCreateNameTagBlueLabel,"left",false)
- jasmodCharCreateNameTagRedEdit = guiCreateEdit(0.3646,0.4484,0.3702,0.0747,"",true,jasmodCharCreateWindow)
- guiEditSetMaxLength(jasmodCharCreateNameTagRedEdit,3)
- jasmodCharCreateNameTagGreenEdit = guiCreateEdit(0.3646,0.5231,0.3702,0.0747,"",true,jasmodCharCreateWindow)
- guiEditSetMaxLength(jasmodCharCreateNameTagGreenEdit,3)
- jasmodCharCreateNameTagBlueEdit = guiCreateEdit(0.3646,0.5979,0.3702,0.0747,"",true,jasmodCharCreateWindow)
- guiEditSetMaxLength(jasmodCharCreateNameTagBlueEdit,3)
- jasmodCharCreateCharacterNameLabel = guiCreateLabel(0.0497,0.6904,0.9171,0.0854,"Character Name",true,jasmodCharCreateWindow)
- guiLabelSetColor(jasmodCharCreateCharacterNameLabel,255,255,255)
- guiLabelSetVerticalAlign(jasmodCharCreateCharacterNameLabel,"top")
- guiLabelSetHorizontalAlign(jasmodCharCreateCharacterNameLabel,"left",false)
- jasmodCharCreateNameEdit = guiCreateEdit(0.1768,0.7616,0.7735,0.089,"",true,jasmodCharCreateWindow)
- guiEditSetMaxLength(jasmodCharCreateNameEdit,20)
- jasmodCharCreateAccountCreateButton = guiCreateButton(0.0497,0.8719,0.9006,0.0961,"Create Account!",true,jasmodCharCreateWindow)
- -- Game Menu
- local scr2 = {guiGetScreenSize() };
- local w2, h2 = 551,470;
- local x2, y2 = (scr2[1]/2)-(w2/2), (scr2[2]/2)-(h2/2);
- theGameMenuWindow = guiCreateWindow(x2,y2,w2,h2,"Roleplay - Game Menu - Press M to show/hide!",false)
- guiWindowSetSizable(theGameMenuWindow,false)
- gameHelp = guiCreateButton(0.001,0.93,0.24,0.08,"Game Help",true,theGameMenuWindow)
- theGameMenuTabPanel = guiCreateTabPanel(10,27,529,405,false,theGameMenuWindow)
- theGameMenuTabPanelGeneralTab = guiCreateTab("General",theGameMenuTabPanel)
- theGameMenuTabPanelGeneralTabCharacterNameInfoLabel = guiCreateLabel(17,17,502,45,"Character Name:",false,theGameMenuTabPanelGeneralTab)
- guiLabelSetColor(theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,"top")
- guiLabelSetHorizontalAlign(theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,"left",false)
- guiSetFont(theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,"default-bold-small")
- theGameMenuTabPanelGeneralTabBankInfoLabel = guiCreateLabel(17,74,502,45,"Bank:",false,theGameMenuTabPanelGeneralTab)
- guiLabelSetColor(theGameMenuTabPanelGeneralTabBankInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(theGameMenuTabPanelGeneralTabBankInfoLabel,"top")
- guiLabelSetHorizontalAlign(theGameMenuTabPanelGeneralTabBankInfoLabel,"left",false)
- guiSetFont(theGameMenuTabPanelGeneralTabBankInfoLabel,"default-bold-small")
- cashlbl = guiCreateLabel(16,129,502,45,"Cash:",false,theGameMenuTabPanelGeneralTab)
- guiLabelSetColor(cashlbl,255,255,255)
- guiLabelSetVerticalAlign(cashlbl,"top")
- guiLabelSetHorizontalAlign(cashlbl,"left",false)
- guiSetFont(cashlbl,"default-bold-small")
- guiSetFont(infolbl,"default-bold-small")
- theGameMenuTabPanelGeneralTabLogoutButton = guiCreateButton(11,328,507,45,"Logout!",false,theGameMenuTabPanelGeneralTab)
- HUDLBL = guiCreateButton(361,281,154,41,"Show/Hide HUD",false,theGameMenuTabPanelGeneralTab)
- CHATLBL = guiCreateButton(362,234,154,41,"Show/Hide Chat",false,theGameMenuTabPanelGeneralTab)
- NEWSLBL = guiCreateButton(200,282,154,41,"Show/Hide News",false,theGameMenuTabPanelGeneralTab)
- YESGOTO = guiCreateButton(199,234,154,41,"Yesgoto/Nogoto",false,theGameMenuTabPanelGeneralTab)
- somethinglbl = guiCreateLabel(202,207,310,23,"Show/Hide functions:",false,theGameMenuTabPanelGeneralTab)
- setTimer(getCash,1000,0)
- guiLabelSetColor(somethinglbl,255,255,255)
- guiLabelSetVerticalAlign(somethinglbl,"top")
- guiLabelSetHorizontalAlign(somethinglbl,"left",false)
- guiSetFont(somethinglbl,"clear-normal")
- funtionslbl = guiCreateLabel(14,208,142,21,"Vehicle functions:",false,theGameMenuTabPanelGeneralTab)
- guiLabelSetColor(funtionslbl,255,255,255)
- guiLabelSetVerticalAlign(funtionslbl,"top")
- guiLabelSetHorizontalAlign(funtionslbl,"left",false)
- guiSetFont(funtionslbl,"clear-normal")
- theGameMenuTabPanelGeneralTabFixCarButton = guiCreateButton(13,234,172,40,"Fix Car (50$)",false,theGameMenuTabPanelGeneralTab)
- theGameMenuTabPanelGeneralTabFlipCarButton = guiCreateButton(13,280,172,40,"Flip Car",false,theGameMenuTabPanelGeneralTab)
- theGameMenuTabPanelPlayersTab = guiCreateTab("Players",theGameMenuTabPanel)
- theGameMenuTabPanelPlayersTabPlayerGridlist = guiCreateGridList(3,3,327,374,false,theGameMenuTabPanelPlayersTab)
- guiGridListSetSelectionMode(theGameMenuTabPanelPlayersTabPlayerGridlist,2)
- theGameMenuTabPanelPlayersTabPlayerColumn = guiGridListAddColumn(theGameMenuTabPanelPlayersTabPlayerGridlist,"Player Name",0.9)
- theGameMenuTabPanelPlayersTabPlayerGetInfoButton = guiCreateButton(337,9,183,60,"Get Info",false,theGameMenuTabPanelPlayersTab)
- guiSetFont(theGameMenuTabPanelPlayersTabPlayerGetInfoButton,"default-bold-small")
- theGameMenuTabPanelPlayersTabPlayerGotoButton = guiCreateButton(337,74,183,60,"Goto",false,theGameMenuTabPanelPlayersTab)
- guiSetFont(theGameMenuTabPanelPlayersTabPlayerGotoButton,"default-bold-small")
- theGameMenuTabPanelPlayersTabPlayerCarGotoButton = guiCreateButton(338,141,183,60,"Cargoto",false,theGameMenuTabPanelPlayersTab)
- guiSetFont(theGameMenuTabPanelPlayersTabPlayerCarGotoButton,"default-bold-small")
- theGameMenuTabPanelPlayersTabPlayerRefreshListButton = guiCreateButton(339,208,183,60,"Refresh List",false,theGameMenuTabPanelPlayersTab)
- guiSetFont(theGameMenuTabPanelPlayersTabPlayerRefreshListButton,"default-bold-small")
- theGameMenuTabPanelTaxiTab = guiCreateTab("Taxi",theGameMenuTabPanel)
- theGameMenuTabPanelTaxiTabGridlist = guiCreateGridList(6,40,516,286,false,theGameMenuTabPanelTaxiTab)
- guiGridListSetSelectionMode(theGameMenuTabPanelTaxiTabGridlist,0)
- locationlbl = guiCreateLabel(138,9,234,27,"Select the location you want to go:",false,theGameMenuTabPanelTaxiTab)
- guiLabelSetColor(locationlbl,255,255,255)
- guiLabelSetVerticalAlign(locationlbl,"top")
- guiLabelSetHorizontalAlign(locationlbl,"left",false)
- guiSetFont(locationlbl,"clear-normal")
- theGameMenuTabPanelTaxiTabGridlistIDColumn = guiGridListAddColumn(theGameMenuTabPanelTaxiTabGridlist,"ID",0.1)
- theGameMenuTabPanelTaxiTabGridlistDestColumn = guiGridListAddColumn(theGameMenuTabPanelTaxiTabGridlist,"Taxi Destination",0.7)
- theGameMenuTabPanelTaxiTabGridlistCashColumn = guiGridListAddColumn(theGameMenuTabPanelTaxiTabGridlist,"$",0.1)
- theGameMenuTabPanelTaxiTabTaxiButton = guiCreateButton(10,333,511,40,"Order the taxi now!",false,theGameMenuTabPanelTaxiTab)
- guiSetFont(theGameMenuTabPanelTaxiTabTaxiButton,"default-bold-small")
- theGameMenuTabPanelVehicleHouseTab = guiCreateTab("Vehicle&House",theGameMenuTabPanel)
- justlbl = guiCreateLabel(7,11,169,33,"Your vehicle properties:",false,theGameMenuTabPanelVehicleHouseTab)
- guiLabelSetColor(justlbl,255,255,255)
- guiLabelSetVerticalAlign(justlbl,"top")
- guiLabelSetHorizontalAlign(justlbl,"left",false)
- guiSetFont(justlbl,"default-bold-small")
- slot1lbl = guiCreateLabel(7,51,39,19,"Slot1:",false,theGameMenuTabPanelVehicleHouseTab)
- guiLabelSetColor(slot1lbl,255,255,255)
- guiLabelSetVerticalAlign(slot1lbl,"top")
- guiLabelSetHorizontalAlign(slot1lbl,"left",false)
- guiSetFont(slot1lbl,"clear-normal")
- theGameMenuTabPanelVHTabVehicleSpawnCarOne = guiCreateButton(66,47,127,23,"Spawn",false,theGameMenuTabPanelVehicleHouseTab)
- theGameMenuTabPanelVHTabVehicleDestroyCarOne = guiCreateButton(206,47,127,23,"Destroy",false,theGameMenuTabPanelVehicleHouseTab)
- theGameMenuTabPanelVHTabVehicleSellCarOne = guiCreateButton(347,46,127,23,"Sell",false,theGameMenuTabPanelVehicleHouseTab)
- slot2lbl = guiCreateLabel(7,106,39,19,"Slot2:",false,theGameMenuTabPanelVehicleHouseTab)
- guiLabelSetColor(slot2lbl,255,255,255)
- guiLabelSetVerticalAlign(slot2lbl,"top")
- guiLabelSetHorizontalAlign(slot2lbl,"left",false)
- guiSetFont(slot2lbl,"clear-normal")
- theGameMenuTabPanelVHTabVehicleSpawnCarTwo = guiCreateButton(65,102,127,23,"Spawn",false,theGameMenuTabPanelVehicleHouseTab)
- theGameMenuTabPanelVHTabVehicleDestroyCarTwo = guiCreateButton(207,102,127,23,"Destroy",false,theGameMenuTabPanelVehicleHouseTab)
- theGameMenuTabPanelVHTabVehicleSellCarTwo = guiCreateButton(348,102,127,23,"Sell",false,theGameMenuTabPanelVehicleHouseTab)
- justomethingzo = guiCreateLabel(8,165,169,33,"Your house properties:",false,theGameMenuTabPanelVehicleHouseTab)
- guiLabelSetColor(justomethingzo,255,255,255)
- guiLabelSetVerticalAlign(justomethingzo,"top")
- guiLabelSetHorizontalAlign(justomethingzo,"left",false)
- guiSetFont(justomethingzo,"default-bold-small")
- theGameMenuTabPanelVHTabHouseTeleportButton = guiCreateButton(9,202,510,36,"House Teleport - 250$",false,theGameMenuTabPanelVehicleHouseTab)
- theGameMenuTabPanelVHTabHouseGetFreeButton = guiCreateButton(9,256,510,36,"Get free houses (on F11 map)",false,theGameMenuTabPanelVehicleHouseTab)
- theGameMenuTabPanelVHTabHouseLockButton = guiCreateButton(8,315,510,36,"Lock/Unlock my house",false,theGameMenuTabPanelVehicleHouseTab)
- wowa = guiCreateLabel(181,442,223,23,"Game Menu - Press M to show/hide!",false,theGameMenuWindow)
- guiLabelSetColor(wowa,255,255,255)
- guiLabelSetVerticalAlign(wowa,"top")
- guiLabelSetHorizontalAlign(wowa,"left",false)
- guiSetFont(wowa,"default-bold-small")
- guiSetVisible(theGameMenuWindow,false)
- theGameMenuTabPanelAnimationTab = guiCreateTab("Anim",theGameMenuTabPanel)
- theAnimGrid = guiCreateGridList(2,2,524,310,false,theGameMenuTabPanelAnimationTab)
- guiGridListSetSelectionMode(theAnimGrid,2)
- guiGridListSetSelectionMode(theAnimGrid,0)
- ID = guiGridListAddColumn(theAnimGrid,"ID:",0.1);
- NAME = guiGridListAddColumn(theAnimGrid,"Animation Name:",0.7);
- animPlay = guiCreateButton(3,315,523,32,"Play The Animation!",false,theGameMenuTabPanelAnimationTab)
- animStop = guiCreateButton(4,348,523,32,"Stop The Animation!",false,theGameMenuTabPanelAnimationTab)
- local scr3 = {guiGetScreenSize() };
- local w3, h3 = 258,307;
- local x3, y3 = (scr3[1]/2)-(w3/2), (scr3[2]/2)-(h3/2);
- theGameMenuTabPanelPlayersTabGetInfoWindow = guiCreateWindow(x3,y3,w3,h3,"Player Info",false)
- guiSetVisible (theGameMenuTabPanelPlayersTabGetInfoWindow,false)
- guiWindowSetSizable(theGameMenuTabPanelPlayersTabGetInfoWindow,false)
- infolbl1 = guiCreateLabel(9,28,242,44,"Account Name:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
- guiLabelSetColor(infolbl1,255,255,255)
- guiLabelSetVerticalAlign(infolbl1,"top")
- guiLabelSetHorizontalAlign(infolbl1,"left",false)
- infolbl2 = guiCreateLabel(9,76,236,21,"Character Name:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
- guiLabelSetColor(infolbl2,255,255,255)
- guiLabelSetVerticalAlign(infolbl2,"top")
- guiLabelSetHorizontalAlign(infolbl2,"left",false)
- infolbl3 = guiCreateLabel(10,126,236,21,"Bank Balance:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
- guiLabelSetColor(infolbl3,255,255,255)
- guiLabelSetVerticalAlign(infolbl3,"top")
- guiLabelSetHorizontalAlign(infolbl3,"left",false)
- infolbl4 = guiCreateLabel(9,183,236,21,"Cash In Pocket:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
- guiLabelSetColor(infolbl4,255,255,255)
- guiLabelSetVerticalAlign(infolbl4,"top")
- guiLabelSetHorizontalAlign(infolbl4,"left",false)
- infolbl5 = guiCreateLabel(8,236,236,21,"Goto State:",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
- guiLabelSetColor(infolbl5,255,255,255)
- guiLabelSetVerticalAlign(infolbl5,"top")
- guiLabelSetHorizontalAlign(infolbl5,"left",false)
- theGameMenuTabPanelPlayersTabGetInfoWindowInfoCloseButton = guiCreateButton(9,271,240,27,"Close This Menu",false,theGameMenuTabPanelPlayersTabGetInfoWindow)
- -- bank
- bankWindow = guiCreateWindow(201,104,290,287,"-- BANK NAME --",false)
- guiSetVisible (bankWindow,false)
- bankWindowDisplay = guiCreateEdit(0.0483,0.115,0.8897,0.108,"",true,bankWindow)
- guiEditSetReadOnly(bankWindowDisplay,true)
- bankWindow1 = guiCreateButton(0.0793,0.2404,0.1759,0.1638,"1",true,bankWindow)
- bankWindow2 = guiCreateButton(0.3,0.2404,0.1759,0.1638,"2",true,bankWindow)
- bankWindow3 = guiCreateButton(0.5241,0.2404,0.1759,0.1638,"3",true,bankWindow)
- bankWindow4 = guiCreateButton(0.0793,0.4425,0.1759,0.1638,"4",true,bankWindow)
- bankWindow5 = guiCreateButton(0.3,0.4425,0.1759,0.1638,"5",true,bankWindow)
- bankWindow6 = guiCreateButton(0.5241,0.4425,0.1759,0.1638,"6",true,bankWindow)
- bankWindow7 = guiCreateButton(0.0793,0.6481,0.1759,0.1638,"7",true,bankWindow)
- bankWindow8 = guiCreateButton(0.3034,0.6481,0.1759,0.1638,"8",true,bankWindow)
- bankWindow9 = guiCreateButton(0.5241,0.6481,0.1759,0.1638,"9",true,bankWindow)
- bankWindowClose = guiCreateButton(0.0793,0.8328,0.8448,0.0906,"Close",true,bankWindow)
- bankWindowStore = guiCreateButton(0.7448,0.2404,0.1759,0.1638,"Store",true,bankWindow)
- bankWindowWithdraw = guiCreateButton(0.7448,0.4425,0.1759,0.1638,"Withdraw",true,bankWindow)
- bankWindow0 = guiCreateButton(0.7448,0.6481,0.1759,0.1638,"0",true,bankWindow)
- -- Restaurants
- -- screen sizer .. --
- local scr = {guiGetScreenSize() };
- local w, h = 709,221;
- local x, y = (scr[1]/2)-(w/2), (scr[2]/2)-(h/2);
- restaurant = guiCreateWindow(x,y,w,h,"Restaurant",false)
- reslbl = guiCreateLabel(9,28,237,17,"Choose a food you want to buy:",false,restaurant)
- guiLabelSetColor(reslbl,255,255,255)
- guiLabelSetVerticalAlign(reslbl,"top")
- guiLabelSetHorizontalAlign(reslbl,"left",false)
- guiSetFont(reslbl,"default-bold-small")
- resimg1 = guiCreateStaticImage(12,66,137,83,"images/BURHIG.png",false,restaurant)
- resbtn1 = guiCreateButton(12,157,136,29,"Mega Burger 50$",false,restaurant)
- resimg2 = guiCreateStaticImage(187,63,141,87,"images/BURMED.png",false,restaurant)
- resbtn2 = guiCreateButton(191,158,136,29,"Medium Burger 30$",false,restaurant)
- resimg3 = guiCreateStaticImage(361,56,151,94,"images/BURLOW.png",false,restaurant)
- resbtn3 = guiCreateButton(369,158,136,29,"Small Burger 20$",false,restaurant)
- resimg4 = guiCreateStaticImage(538,61,156,86,"images/CLULOW.png",false,restaurant)
- resbtn4 = guiCreateButton(551,157,136,29,"Mega XXL Burger 75$",false,restaurant)
- reslbl2 = guiCreateLabel(556,197,148,14,"Restaurant System by A FCKING NOOB WHICH LEFT US ALONE AND THREATS US.",false,restaurant)
- guiLabelSetColor(reslbl2,255,255,255)
- guiLabelSetVerticalAlign(reslbl2,"top")
- guiLabelSetHorizontalAlign(reslbl2,"left",false)
- guiSetFont(reslbl2,"default-small")
- resexit = guiCreateButton(666,24,34,41,"X",false,restaurant)
- guiSetVisible(restaurant,false);
- -- Ammu Nation
- theAmmuNationWindow = guiCreateWindow(0.0012,0.5633,0.2738,0.435,"Ammu Nation",true)
- guiSetVisible (theAmmuNationWindow,false)
- guiWindowSetMovable(theAmmuNationWindow,false)
- guiWindowSetSizable(theAmmuNationWindow,false)
- theAmmuNationGridlist = guiCreateGridList(9,28,197,128,false,theAmmuNationWindow)
- guiGridListSetSelectionMode(theAmmuNationGridlist,0)
- theAmmuNationGridlistCol1 = guiGridListAddColumn(theAmmuNationGridlist,"Weapon Name",0.45)
- theAmmuNationGridlistCol2 = guiGridListAddColumn(theAmmuNationGridlist,"Ammo",0.15)
- theAmmuNationGridlistCol3 = guiGridListAddColumn(theAmmuNationGridlist,"$",0.2)
- theAmmuNationBuyButton = guiCreateButton(9,162,198,40,"Buy!",false,theAmmuNationWindow)
- theAmmuNationCloseButton = guiCreateButton(9,208,198,40,"Close",false,theAmmuNationWindow)
- for i,v in ipairs (ammunation) do
- local row = guiGridListAddRow (theAmmuNationGridlist)
- guiGridListSetItemText (theAmmuNationGridlist,row,theAmmuNationGridlistCol1,v[1],false,false)
- guiGridListSetItemText (theAmmuNationGridlist,row,theAmmuNationGridlistCol2,v[2],false,false)
- guiGridListSetItemText (theAmmuNationGridlist,row,theAmmuNationGridlistCol3,v[3] .. "$",false,true)
- end
- ammuNationMarker = createMarker (295.91,-38.09,1000.51,"cylinder",1,0,255,255,127)
- setElementInterior (ammuNationMarker,1)
- setElementDimension (ammuNationMarker,1)
- -- refreshing player gridlist
- refreshPlayerGridlist()
- -- Grenade Apple
- local grenade = engineLoadTXD ("files/grenade.txd")
- engineImportTXD (grenade,342)
- -- Widescreen
- wideScreenGUI = guiCreateStaticImage(0,0,1,1,"images/widescreen.png",true,getRootElement())
- guiMoveToBack (wideScreenGUI)
- -- taxi
- for i,v in ipairs (taxis) do
- local row = guiGridListAddRow (theGameMenuTabPanelTaxiTabGridlist)
- guiGridListSetItemText (theGameMenuTabPanelTaxiTabGridlist,row,theGameMenuTabPanelTaxiTabGridlistDestColumn,v[1],false,false)
- guiGridListSetItemText (theGameMenuTabPanelTaxiTabGridlist,row,theGameMenuTabPanelTaxiTabGridlistIDColumn,tostring(i),false,true)
- guiGridListSetItemText (theGameMenuTabPanelTaxiTabGridlist,row,theGameMenuTabPanelTaxiTabGridlistCashColumn,v[2] .. "$",false,false)
- end
- for i,v in ipairs (animations) do
- local row2 = guiGridListAddRow (theAnimGrid)
- guiGridListSetItemText (theAnimGrid,row2,NAME,v[1],false,false)
- guiGridListSetItemText (theAnimGrid,row2,ID,tostring(i),false,true)
- end
- theHouseGUIWindow = guiCreateWindow(0.3088,0.275,0.3925,0.3433,"Home system by JasperNL=D",true)
- guiWindowSetMovable(theHouseGUIWindow,false)
- guiWindowSetSizable(theHouseGUIWindow,false)
- guiSetVisible (theHouseGUIWindow,false)
- theHouseGUIEnterButton = guiCreateButton(0.0446,0.7816,0.2771,0.1748,"Enter house",true,theHouseGUIWindow)
- theHouseGUIBuyButton = guiCreateButton(0.3567,0.7816,0.2771,0.1748,"Buy house",true,theHouseGUIWindow)
- theHouseGUISellButton = guiCreateButton(0.6688,0.7816,0.2771,0.1748,"Sell house",true,theHouseGUIWindow)
- theHouseGUICloseButton = guiCreateButton(0.9172,0.1165,0.0541,0.0777,"x",true,theHouseGUIWindow)
- theHouseGUIOwnerLabel = guiCreateLabel(0.0255,0.165,0.3854,0.1214,"Owner",true,theHouseGUIWindow)
- guiLabelSetColor(theHouseGUIOwnerLabel,255,255,255)
- guiLabelSetVerticalAlign(theHouseGUIOwnerLabel,"center")
- guiLabelSetHorizontalAlign(theHouseGUIOwnerLabel,"left",false)
- theHouseGUINumberLabel = guiCreateLabel(0.0255,0.5194,0.3854,0.1214,"House Number",true,theHouseGUIWindow)
- guiLabelSetColor(theHouseGUINumberLabel,255,255,255)
- guiLabelSetVerticalAlign(theHouseGUINumberLabel,"center")
- guiLabelSetHorizontalAlign(theHouseGUINumberLabel,"left",false)
- theHouseGUIPriceLabel = guiCreateLabel(0.0255,0.3447,0.3854,0.1214,"House Price",true,theHouseGUIWindow)
- guiLabelSetColor(theHouseGUIPriceLabel,255,255,255)
- guiLabelSetVerticalAlign(theHouseGUIPriceLabel,"center")
- guiLabelSetHorizontalAlign(theHouseGUIPriceLabel,"left",false)
- theHouseGUIOwnerInfoLabel = guiCreateLabel(0.5,0.165,0.3854,0.1214,"-- Owner --",true,theHouseGUIWindow)
- guiLabelSetColor(theHouseGUIOwnerInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(theHouseGUIOwnerInfoLabel,"center")
- guiLabelSetHorizontalAlign(theHouseGUIOwnerInfoLabel,"left",false)
- theHouseGUIPriceInfoLabel = guiCreateLabel(0.5478,0.3447,0.3854,0.1214,"-- House Price --",true,theHouseGUIWindow)
- guiLabelSetColor(theHouseGUIPriceInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(theHouseGUIPriceInfoLabel,"center")
- guiLabelSetHorizontalAlign(theHouseGUIPriceInfoLabel,"left",false)
- theHouseGUINumberInfoLabel = guiCreateLabel(0.5032,0.5194,0.3854,0.1214,"-- Adress -- ",true,theHouseGUIWindow)
- guiLabelSetColor(theHouseGUINumberInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(theHouseGUINumberInfoLabel,"center")
- guiLabelSetHorizontalAlign(theHouseGUINumberInfoLabel,"left",false)
- theHouseGUIDollarLabel = guiCreateLabel(0.5,0.3447,0.0446,0.1214,"$",true,theHouseGUIWindow)
- guiLabelSetColor(theHouseGUIDollarLabel,255,255,255)
- guiLabelSetVerticalAlign(theHouseGUIDollarLabel,"center")
- guiLabelSetHorizontalAlign(theHouseGUIDollarLabel,"left",false)
- theInsideHouseGUIWindow = guiCreateWindow(0.25,-0.025,0.5,0.1,"",true)
- guiSetVisible (theInsideHouseGUIWindow,false)
- guiWindowSetMovable(theInsideHouseGUIWindow,false)
- guiWindowSetSizable(theInsideHouseGUIWindow,false)
- theInsideHouseGUIWindowLockBut = guiCreateButton(10,21,153,30," -- LOCK/UNLOCK --",false,theInsideHouseGUIWindow)
- theInsideHouseGUIWindowLeaveBut = guiCreateButton(236,21,153,30,"Leave House",false,theInsideHouseGUIWindow)
- theCarMissionGUIWindow = guiCreateWindow(0.2537,0.2067,0.5013,0.5167,"Wang Cars Missions",true)
- guiWindowSetMovable(theCarMissionGUIWindow,false)
- guiWindowSetSizable(theCarMissionGUIWindow,false)
- guiSetVisible (theCarMissionGUIWindow,false)
- theCarMissionGUITitle = guiCreateLabel(0.0274,0.071,0.9377,0.1226,"Mission -1: Test?",true,theCarMissionGUIWindow)
- guiLabelSetColor(theCarMissionGUITitle,255,255,255)
- guiLabelSetVerticalAlign(theCarMissionGUITitle,"center")
- guiLabelSetHorizontalAlign(theCarMissionGUITitle,"left",false)
- guiSetFont(theCarMissionGUITitle,"sa-header")
- theCarMissionGUIDescription = guiCreateMemo(0.0574,0.229,0.8628,0.3452,"-- DESCRIPTION --",true,theCarMissionGUIWindow)
- theCarMissionGUIInfoLabel = guiCreateLabel(0.0499,0.6065,0.2519,0.1935,"Car\nMoney to win\nTime",true,theCarMissionGUIWindow)
- guiLabelSetColor(theCarMissionGUIInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(theCarMissionGUIInfoLabel,"top")
- guiLabelSetHorizontalAlign(theCarMissionGUIInfoLabel,"left",false)
- guiSetFont(theCarMissionGUIInfoLabel,"default-bold-small")
- theCarMissionGUIInfoInformationLabel = guiCreateLabel(0.3192,0.6065,0.6459,0.1935,"-- NAME -- \n\n-- TIME -- ",true,theCarMissionGUIWindow)
- guiLabelSetColor(theCarMissionGUIInfoInformationLabel,255,255,255)
- guiLabelSetVerticalAlign(theCarMissionGUIInfoInformationLabel,"top")
- guiLabelSetHorizontalAlign(theCarMissionGUIInfoInformationLabel,"left",false)
- guiSetFont(theCarMissionGUIInfoInformationLabel,"default-bold-small")
- theCarMissionGUIAcceptButton = guiCreateButton(0.0299,0.8161,0.5387,0.1419,"Let's go!",true,theCarMissionGUIWindow)
- theCarMissionGUICloseButton = guiCreateButton(0.6035,0.8161,0.3641,0.1419,"No thanks",true,theCarMissionGUIWindow)
- -- BOATING
- theBoatMissionGUIWindow = guiCreateWindow(0.2537,0.2067,0.5013,0.5167,"Anchor Boat Missions",true)
- guiWindowSetMovable(theBoatMissionGUIWindow,false)
- guiWindowSetSizable(theBoatMissionGUIWindow,false)
- guiSetVisible (theBoatMissionGUIWindow,false)
- theBoatMissionGUITitle = guiCreateLabel(0.0274,0.071,0.9377,0.1226,"Mission -1: Test?",true,theBoatMissionGUIWindow)
- guiLabelSetColor(theBoatMissionGUITitle,255,255,255)
- guiLabelSetVerticalAlign(theBoatMissionGUITitle,"center")
- guiLabelSetHorizontalAlign(theBoatMissionGUITitle,"left",false)
- guiSetFont(theBoatMissionGUITitle,"sa-header")
- theBoatMissionGUIDescription = guiCreateMemo(0.0574,0.229,0.8628,0.3452,"-- DESCRIPTION --",true,theBoatMissionGUIWindow)
- theBoatMissionGUIInfoLabel = guiCreateLabel(0.0499,0.6065,0.2519,0.1935,"Car\nMoney to win\nTime",true,theBoatMissionGUIWindow)
- guiLabelSetColor(theBoatMissionGUIInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(theBoatMissionGUIInfoLabel,"top")
- guiLabelSetHorizontalAlign(theBoatMissionGUIInfoLabel,"left",false)
- guiSetFont(theBoatMissionGUIInfoLabel,"default-bold-small")
- theBoatMissionGUIInfoInformationLabel = guiCreateLabel(0.3192,0.6065,0.6459,0.1935,"-- NAME -- \n\n-- TIME -- ",true,theBoatMissionGUIWindow)
- guiLabelSetColor(theBoatMissionGUIInfoInformationLabel,255,255,255)
- guiLabelSetVerticalAlign(theBoatMissionGUIInfoInformationLabel,"top")
- guiLabelSetHorizontalAlign(theBoatMissionGUIInfoInformationLabel,"left",false)
- guiSetFont(theBoatMissionGUIInfoInformationLabel,"default-bold-small")
- theBoatMissionGUIAcceptButton = guiCreateButton(0.0299,0.8161,0.5387,0.1419,"Let's go!",true,theBoatMissionGUIWindow)
- theBoatMissionGUICloseButton = guiCreateButton(0.6035,0.8161,0.3641,0.1419,"No thanks",true,theBoatMissionGUIWindow)
- theTradeCenterWindow = guiCreateWindow(0.2876,0.2666,0.475,0.4667,"Trade Center",true)
- guiSetVisible (theTradeCenterWindow,false)
- guiWindowSetSizable(theTradeCenterWindow,false)
- theTradeCenterTabPanel = guiCreateTabPanel(0.0237,0.0786,0.9526,0.8893,true,theTradeCenterWindow)
- theTradeCenterBuyTab = guiCreateTab("Buy a car",theTradeCenterTabPanel)
- theTradeCenterBuyTabGridlist = guiCreateGridList(0.0083,0.0133,0.9834,0.8267,true,theTradeCenterBuyTab)
- guiGridListSetSelectionMode(theTradeCenterBuyTabGridlist,0)
- guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Nr.",0.1)
- guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Car Name",0.2)
- guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Price",0.2)
- guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Old Owner",0.2)
- guiGridListAddColumn(theTradeCenterBuyTabGridlist,"Date added",0.25)
- theTradeCenterBuyTabBuySl1 = guiCreateButton(0.011,0.8489,0.4586,0.1333,"Buy Slot 1",true,theTradeCenterBuyTab)
- theTradeCenterBuyTabBuySl2 = guiCreateButton(0.5276,0.8489,0.4586,0.1333,"Buy Slot 2",true,theTradeCenterBuyTab)
- theTradeCenterSellTab = guiCreateTab("Sell your car",theTradeCenterTabPanel)
- theTradeCenterSellTabRadioSl1 = guiCreateRadioButton(0.0138,0.0267,0.4558,0.1289,"Sell slot 1",true,theTradeCenterSellTab)
- guiRadioButtonSetSelected(theTradeCenterSellTabRadioSl1,true)
- theTradeCenterSellTabRadioSl2 = guiCreateRadioButton(0.5304,0.0267,0.4558,0.1289,"Sell slot 2",true,theTradeCenterSellTab)
- theTradeCenterSellTabPriceEdit = guiCreateEdit(0.0249,0.2756,0.442,0.1156,"",true,theTradeCenterSellTab)
- guiEditSetMaxLength(theTradeCenterSellTabPriceEdit,6)
- theTradeCenterSellTabPriceLabel = guiCreateLabel(0.0193,0.1644,0.5,0.1022,"Enter the price",true,theTradeCenterSellTab)
- guiLabelSetColor(theTradeCenterSellTabPriceLabel,255,255,255)
- guiLabelSetVerticalAlign(theTradeCenterSellTabPriceLabel,"top")
- guiLabelSetHorizontalAlign(theTradeCenterSellTabPriceLabel,"left",false)
- 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)
- guiLabelSetColor(theTradeCenterSellTabWarningLabel,255,255,255)
- guiLabelSetVerticalAlign(theTradeCenterSellTabWarningLabel,"top")
- guiLabelSetHorizontalAlign(theTradeCenterSellTabWarningLabel,"left",false)
- theTradeCenterSellTabSellButton = guiCreateButton(0.0304,0.8089,0.4558,0.1244,"Sell the car!",true,theTradeCenterSellTab)
- theTradeCenterInformationTab = guiCreateTab("Information",theTradeCenterTabPanel)
- 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)
- guiMemoSetReadOnly(theTradeCenterInfoTabMemo,true)
- theTradeCenterCloseButton = guiCreateButton(0.9105,0.0714,0.0505,0.0686,"x",true,theTradeCenterWindow)
- --[[ --- Drug Shop --
- drugInventoryWnd = guiCreateWindow(308,169,400,459,".::Drug Inventory::. Press F5 to show/hide::.",false)
- drugInventoryGrid = guiCreateGridList(9,25,382,363,false,drugInventoryWnd)
- guiGridListSetSelectionMode(drugInventoryGrid,0)
- guiGridListAddColumn(drugInventoryGrid,"Drug Name:",0.2)
- guiGridListAddColumn(drugInventoryGrid,"Amount:",0.2)
- useItemBtn = guiCreateButton(13,412,87,38,"Use Item",false,drugInventoryWnd)
- dropItemBtn = guiCreateButton(119,414,88,35,"Drop Item",false,drugInventoryWnd)
- drugInventoryExit = guiCreateButton(355,411,36,39,"X",false,drugInventoryWnd)
- setTimer(getDrugs,1000,0)
- guiSetVisible(drugInventoryWnd,false)
- ]]--
- --
- -- Car Shop
- theCarShopGUIWindow = guiCreateWindow(0.2725,0.2133,0.45,0.3333,"Car Shop",true)
- guiWindowSetSizable (theCarShopGUIWindow,false)
- guiSetVisible (theCarShopGUIWindow,false)
- theCarShopGUIWindowBuySlot1But = guiCreateButton(0.6611,0.135,0.3,0.24,"Buy!\nSlot 1",true,theCarShopGUIWindow)
- theCarShopGUIWindowBuySlot2But = guiCreateButton(0.6611,0.415,0.3,0.24,"Buy!\nSlot 2",true,theCarShopGUIWindow)
- theCarShopGUIWindowCloseBut = guiCreateButton(0.6611,0.7,0.3,0.24,"Close Window",true,theCarShopGUIWindow)
- theCarShopGUIWindowGridList = guiCreateGridList(0.025,0.115,0.6194,0.84,true,theCarShopGUIWindow)
- guiGridListSetSelectionMode(theCarShopGUIWindowGridList,2)
- guiGridListAddColumn(theCarShopGUIWindowGridList,"Car Name",0.6)
- guiGridListAddColumn(theCarShopGUIWindowGridList,"$",0.2)
- theBikeShopGUIWindow = guiCreateWindow(0.2725,0.2133,0.45,0.3333,"Bike Shop",true)
- guiWindowSetSizable (theBikeShopGUIWindow,false)
- guiSetVisible (theBikeShopGUIWindow,false)
- theBikeShopGUIWindowBuySlot1But = guiCreateButton(0.6611,0.135,0.3,0.24,"Buy!\nSlot 1",true,theBikeShopGUIWindow)
- theBikeShopGUIWindowBuySlot2But = guiCreateButton(0.6611,0.415,0.3,0.24,"Buy!\nSlot 2",true,theBikeShopGUIWindow)
- theBikeShopGUIWindowCloseBut = guiCreateButton(0.6611,0.7,0.3,0.24,"Close Window",true,theBikeShopGUIWindow)
- theBikeShopGUIWindowGridList = guiCreateGridList(0.025,0.115,0.6194,0.84,true,theBikeShopGUIWindow)
- guiGridListSetSelectionMode(theBikeShopGUIWindowGridList,2)
- guiGridListAddColumn(theBikeShopGUIWindowGridList,"Bike Name",0.6)
- guiGridListAddColumn(theBikeShopGUIWindowGridList,"$",0.2)
- 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
- local row = guiGridListAddRow (theCarShopGUIWindowGridList)
- guiGridListSetItemText (theCarShopGUIWindowGridList,row,1,getVehicleNameFromModel(v[1]),false,false)
- guiGridListSetItemText (theCarShopGUIWindowGridList,row,2,tostring(v[2]),false,true)
- end
- 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
- local row = guiGridListAddRow (theBikeShopGUIWindowGridList)
- guiGridListSetItemText (theBikeShopGUIWindowGridList,row,1,getVehicleNameFromModel(v[1]),false,false)
- guiGridListSetItemText (theBikeShopGUIWindowGridList,row,2,tostring(v[2]),false,true)
- end
- wangCarsCarshopMarker = createMarker (-1952.82,299.93,34.47,"cylinder",1,0,255,255,127)
- nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127)
- restaurantMarker = createMarker (377.51,-67.94,1000.55,"cylinder",1.5,0,255,255,127)
- bikesCarshopMarker = createMarker (2192.5729980469,2764.2033691406,9.8203125,"cylinder",1,0,255,255,127)
- setElementInterior(restaurantMarker,10)
- setElementDimension(restaurantMarker,666)
- createBlip (-1951.66,642.98,45.5625,63)
- createBlip (2192.5729980469,2764.2033691406,9.8203125,8)
- stripper1 = createPed( 63, -2673.74, 1410.36, 907.57 )
- stripper2 = createPed( 237, -2677.55, 1402.78, 907.57 )
- stripper3 = createPed( 237, -2677.33, 1414.43, 907.57 )
- clubowner = createPed( 59, -2672.10, 1400.40, 912.40 )
- setElementDimension ( stripper1, 203 )
- setElementDimension ( stripper2, 203 )
- setElementDimension ( stripper3, 203 )
- setElementDimension ( clubowner, 203 )
- setElementInterior ( stripper1, 3 )
- setElementInterior ( stripper2, 3 )
- setElementInterior ( stripper3, 3 )
- setElementInterior ( clubowner, 3 )
- setPedRotation ( stripper1, 270 )
- setPedRotation ( stripper2, 270 )
- setPedRotation ( stripper3, 270 )
- setPedRotation ( clubowner, 38 )
- -- dj
- dj = createPed ( 217, -2661.21,1410.02,910.17)
- setElementInterior ( dj, 3 )
- setElementDimension ( dj, 203 )
- setPedRotation ( dj, 90 )
- -- bargirl
- bg = createPed ( 194, -2662.83, 1407.87, 906.27 )
- setElementInterior ( bg, 3 )
- setElementDimension ( bg, 203 )
- setPedRotation ( bg, 90 )
- -- guard.
- joe = createPed ( 163, -2639.90, 1407.51, 906.46 )
- setElementInterior ( joe, 3 )
- setElementDimension ( joe, 203 )
- setTimer(
- function ()
- setPedAnimation( stripper1, "STRIP", "STR_C1")
- setPedAnimation( stripper2, "STRIP", "STR_Loop_A" )
- setPedAnimation( stripper3, "STRIP", "STR_Loop_A" )
- setPedAnimation( dj, "DANCING", "dnce_M_c" )
- end
- , 200, 1 )
- -- guiSetVisible( gtag, false )
- -- Cow window :>
- theCowStatsWindow = guiCreateWindow(0.2288,0.8183,0.2512,0.1683,"Your Cow Stats",true)
- guiSetVisible (theCowStatsWindow,false)
- guiWindowSetMovable(theCowStatsWindow,false)
- guiWindowSetSizable(theCowStatsWindow,false)
- theCowStatsWindowMilkLabel = guiCreateLabel(0.0398,0.2574,0.5721,0.2178,"Milk holding",true,theCowStatsWindow)
- guiLabelSetColor(theCowStatsWindowMilkLabel,255,255,255)
- guiLabelSetVerticalAlign(theCowStatsWindowMilkLabel,"center")
- guiLabelSetHorizontalAlign(theCowStatsWindowMilkLabel,"left",false)
- theCowStatsWindowMilkValueLabel = guiCreateLabel(0.6766,0.2574,0.2736,0.2178,"0/10L",true,theCowStatsWindow)
- guiLabelSetColor(theCowStatsWindowMilkValueLabel,255,255,255)
- guiLabelSetVerticalAlign(theCowStatsWindowMilkValueLabel,"center")
- guiLabelSetHorizontalAlign(theCowStatsWindowMilkValueLabel,"right",false)
- theCowStatsWindowDropMilkLabel = guiCreateButton(0.0647,0.6535,0.4478,0.2277,"Drop milk",true,theCowStatsWindow)
- theCowStatsWindowCloseButton = guiCreateButton(0.6368,0.6535,0.2886,0.2277,"Close",true,theCowStatsWindow)
- end)
- addEvent ("lolmodOpenInfoWindow",true)
- addEventHandler ("lolmodOpenInfoWindow",getRootElement(),
- function(text)
- if (source == getLocalPlayer()) then
- guiSetText (jasmodInfoWindowMemo,text)
- guiSetVisible (jasmodInfoWindow,true)
- guiBringToFront (jasmodInfoWindow)
- if (isCursorShowing (getLocalPlayer())) then
- setElementData (getLocalPlayer(),"cursorshowing",true)
- else
- setElementData (getLocalPlayer(),"cursorshowing",false)
- showCursor (true,true)
- end
- end
- end)
- hudShowing = true;
- chatShowing = true;
- newsShow = true;
- addEventHandler ("onClientGUIClick",getRootElement(),
- function(button,state,absx,absy)
- if (source == jasmodInfoWindowExitButton) then
- guiSetVisible (jasmodInfoWindow,false)
- if (getElementData (getLocalPlayer(),"cursorshowing") == false) then
- showCursor (false,false)
- end
- elseif (source == gangsystemgrid) then
- local gangName = guiGridListGetItemText ( gangsystemgrid, guiGridListGetSelectedItem ( gangsystemgrid ) )
- if (gangName) then
- triggerServerEvent("gangSystemWantsPlayers",getLocalPlayer(),gangName)
- end
- elseif (source == createformexit) then
- guiSetVisible(createformwnd,false)
- guiSetInputEnabled(false)
- elseif (source == invitebtn) then
- guiSetVisible(gangsysteminput,true)
- guiSetInputEnabled(true)
- elseif (source == rankbtn) then
- guiSetVisible(ranknamewnd,true)
- guiSetInputEnabled(true)
- elseif (source == gangsystemokbtn4) then
- if not(guiGetText(thenameedit5) == "") and not (guiGetText(thenameedit6) == "") then
- triggerServerEvent("setPlayerGangRank",getLocalPlayer(),guiGetText(thenameedit5),guiGetText(thenameedit6))
- guiSetVisible(ranknamewnd,false)
- guiSetInputEnabled(false)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You must fill the name and rank!")
- end
- elseif (source == kickbtn) then
- guiSetVisible(kicknamewnd,true)
- guiSetInputEnabled(true)
- elseif (source == gangsystemokbtn2) then
- if not(guiGetText(thenameedit2) == "") then
- triggerServerEvent("gangSystemKickGang",getLocalPlayer(),guiGetText(thenameedit2))
- guiSetVisible(kicknamewnd,false)
- guiSetInputEnabled(false)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You must fill the name!")
- end
- elseif (source == gangsystemokbtn) then
- if not(guiGetText(thenameedit) == "") then
- triggerServerEvent("gangSystemInviteGang",getLocalPlayer(),guiGetText(thenameedit))
- guiSetVisible(gangsysteminput,false)
- guiSetInputEnabled(false)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You must fill the name!")
- end
- elseif (source == skinbtn) then
- triggerServerEvent("setPlayerGangSkin",getLocalPlayer(),getLocalPlayer())
- elseif (source == deletegangbtn) then
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"This feature is not in use in current version..")
- elseif (source == creategangbtn2) then
- if not (guiGetText(gangnameedit) == "") and not (guiGetText(gangskinedit) == "") and not (guiGetText(gangowneredit) == "") then
- -- we send datas to server--
- triggerServerEvent("gangSystemCreateGang",getLocalPlayer(),guiGetText(gangnameedit),guiGetText(gangskinedit),guiGetText(gangowneredit))
- guiSetVisible(createformwnd,false)
- guiSetInputEnabled(false)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You must fill all edit's before you can create a gang!")
- end
- elseif (source == creategangbtn) then
- guiSetVisible(createformwnd,true)
- guiBringToFront(createformwnd)
- guiSetInputEnabled(true)
- elseif (source == jasmodLoginWindowLoginButton) then
- local username = guiGetText (jasmodLoginWindowUsernameEdit)
- local password = guiGetText (jasmodLoginWindowPasswordEdit)
- if (username ~= "") and (password ~= "") then
- triggerServerEvent ("lolmodLoginPlayer",getLocalPlayer(),username,password)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Sorry, your username or password is not filled in!\nPlease give up a valid username ans password.")
- end
- elseif (source == jasmodLoginWindowRegisterButton) then
- local username = guiGetText (jasmodLoginWindowUsernameEdit)
- local password = guiGetText (jasmodLoginWindowPasswordEdit)
- if (username ~= "") and (password ~= "") then
- triggerServerEvent ("lolmodRegisterPlayer",getLocalPlayer(),username,password)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Sorry, your username or password is not filled in!\nPlease give up a valid username ans password before registering.")
- end
- elseif (source == jasmodCharSelectGameEnterButton) then
- if (guiGridListGetSelectedItem (jasmodCharSelectGridlist)) then
- if (guiGetText (jasmodCharSelectGameEnterButton) == "Enter the game!") then
- r,c = guiGridListGetSelectedItem (jasmodCharSelectGridlist)
- if (r) then
- local name = guiGridListGetItemText (jasmodCharSelectGridlist,r,c,false,false)
- guiSetText (theGameMenuTabPanelGeneralTabCharacterNameInfoLabel,"Character Name: " .. name)
- triggerServerEvent ("lolmodSpawnCharacter",getLocalPlayer(),name)
- toggleControl ("chatbox",true)
- guiSetText (jasmodCharSelectGameEnterButton,"Working ...")
- setTimer (guiSetAlpha,20000,1,jasmodCharSelectGameEnterButton,1)
- setTimer (guiSetText,20000,1,jasmodCharSelectGameEnterButton,"Enter the game!")
- end
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You're being spawned already!")
- end
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Make sure you select a character!\nYou can make one by clicking New Character!")
- end
- elseif (source == jasmodCharSelectNewCharacterButton) then
- guiSetVisible (jasmodCharCreateWindow,true)
- setCameraMatrix (-1505.55,1377.75,3,-1508.71,1372.91,4)
- if not (skinped) then
- skinped = createPed (math.random(0,288),-1508.71,1372.91,3.5)
- if not (skinped) then
- skinped = createPed (math.random(0,288),-1508.71,1372.91,3.5)
- end
- end
- elseif (source == jasmodCharCreateSkinLeftButton) then
- local skin = getElementModel (skinped)
- if (skin == 0) then setElementModel (skinped,288)
- elseif (skin == 7) then setElementModel (skinped,0)
- elseif (skin == 9) then setElementModel (skinped,7)
- elseif (skin == 43) then setElementModel (skinped,41)
- elseif (skin == 66) then setElementModel (skinped,64)
- elseif (skin == 75) then setElementModel (skinped,73)
- elseif (skin == 87) then setElementModel (skinped,85)
- elseif (skin == 120) then setElementModel (skinped,118)
- elseif (skin == 150) then setElementModel (skinped,148)
- elseif (skin == 209) then setElementModel (skinped,207)
- elseif (skin == 274) then setElementModel (skinped,164)
- else setElementModel (skinped,skin -1)
- end
- elseif (source == jasmodCharCreateSkinRightButton) then
- local skin = getElementModel (skinped)
- if (skin == 288) then setElementModel (skinped,0)
- elseif (skin == 0) then setElementModel (skinped,7)
- elseif (skin == 7) then setElementModel (skinped,9)
- elseif (skin == 41) then setElementModel (skinped,43)
- elseif (skin == 64) then setElementModel (skinped,66)
- elseif (skin == 73) then setElementModel (skinped,75)
- elseif (skin == 85) then setElementModel (skinped,87)
- elseif (skin == 118) then setElementModel (skinped,150)
- elseif (skin == 148) then setElementModel (skinped,148)
- elseif (skin == 207) then setElementModel (skinped,209)
- elseif (skin == 264) then setElementModel (skinped,274)
- else setElementModel (skinped,skin +1)
- end
- elseif (source == HUDLBL) then
- if (hudShowing == true) then
- showPlayerHudComponent ( "ammo", false)
- showPlayerHudComponent ( "weapon", false)
- showPlayerHudComponent ( "radar", false)
- showPlayerHudComponent ( "clock", false)
- showPlayerHudComponent ( "money", false)
- showPlayerHudComponent ( "health", false)
- showPlayerHudComponent ( "armour", false)
- hudShowing = false;
- outputChatBox("Your HUD is disabled now!",0,255,0)
- else
- showPlayerHudComponent ( "ammo", true)
- showPlayerHudComponent ( "weapon", true)
- showPlayerHudComponent ( "radar", true)
- showPlayerHudComponent ( "clock", true)
- showPlayerHudComponent ( "money", true)
- showPlayerHudComponent ( "health", true)
- showPlayerHudComponent ( "armour", true)
- hudShowing = true;
- outputChatBox("Your HUD is enabled now!",0,255,0)
- end
- elseif (source == CHATLBL) then
- if (chatShowing == true) then
- showChat(false)
- chatShowing = false;
- else
- showChat(true)
- chatShowing = true;
- outputChatBox("Your CHAT is showing now",0,255,0)
- end
- elseif (source == gameHelp) then
- toggle()
- elseif (source == YESGOTO) then
- if (getElementData(getLocalPlayer(),"gotostate") == true) then
- outputChatBox("People can't warp to you now",0,255,0)
- setElementData (getLocalPlayer(),"gotostate",false)
- else
- setElementData (getLocalPlayer(),"gotostate",true)
- outputChatBox("People can warp to you now",0,255,0)
- end
- elseif (source == NEWSLBL) then
- if (newsShow == true) then
- hideNews()
- newsShow = false;
- else
- showNews()
- newsShow = true;
- end
- elseif (source == jasmodCharCreateAccountCreateButton) then
- local skin = getElementModel (skinped)
- local colorred = guiGetText (jasmodCharCreateNameTagRedEdit)
- local colorgreen = guiGetText (jasmodCharCreateNameTagGreenEdit)
- local colorblue = guiGetText (jasmodCharCreateNameTagBlueEdit)
- local charactername = guiGetText (jasmodCharCreateNameEdit)
- if (colorred ~= "") and (colorgreen ~= "") and (colobrlue ~= "") and (charactername ~= "") then
- guiSetVisible (jasmodCharCreateWindow,false)
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Your new character has been created!\nPlease, login again.")
- guiSetVisible (jasmodLoginWindow,true)
- guiSetVisible (jasmodCharSelectWindow,false)
- guiSetVisible (jasmodCharCreateWindow,false)
- triggerServerEvent ("createNewCharacter",getLocalPlayer(),skin,colorred,colorgreen,colorblue,charactername)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You've forget something!")
- end
- elseif (source == theGameMenuTabPanelGeneralTabLogoutButton) then
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You are logged out succesfully")
- guiSetVisible (jasmodCharCreateWindow,false)
- guiSetVisible (jasmodLoginWindow,true)
- guiSetVisible (jasmodCharSelectWindow,false)
- guiSetVisible (jasmodCharCreateWindow,false)
- guiSetVisible (theGameMenuWindow,false)
- triggerServerEvent ("logoutPlayer",getLocalPlayer())
- showCursor (true,true)
- showChat (false)
- showPlayerHudComponent ("radar",false)
- setCameraMatrix (-2770.24,-1133.92,38.14,-2881.06,-907.75,9.301)
- enableWideScreen (getLocalPlayer())
- elseif (source == bankWindow1) then
- addIntoBankEditDisplay ("1")
- elseif (source == bankWindow2) then
- addIntoBankEditDisplay ("2")
- elseif (source == bankWindow3) then
- addIntoBankEditDisplay ("3")
- elseif (source == bankWindow4) then
- addIntoBankEditDisplay ("4")
- elseif (source == bankWindow5) then
- addIntoBankEditDisplay ("5")
- elseif (source == bankWindow6) then
- addIntoBankEditDisplay ("6")
- elseif (source == bankWindow7) then
- addIntoBankEditDisplay ("7")
- elseif (source == bankWindow8) then
- addIntoBankEditDisplay ("8")
- elseif (source == bankWindow9) then
- addIntoBankEditDisplay ("9")
- elseif (source == bankWindow0) then
- addIntoBankEditDisplay ("0")
- elseif (source == bankWindowClose) then
- guiSetVisible (bankWindow,false)
- guiSetText (bankWindowDisplay,"")
- showCursor (false,false)
- elseif (source == bankWindowStore) then
- triggerServerEvent ("bankStoreMoney",getLocalPlayer(),tonumber(guiGetText(bankWindowDisplay)))
- elseif (source == bankWindowWithdraw) then
- triggerServerEvent ("bankWithdrawMoney",getLocalPlayer(),tonumber(guiGetText(bankWindowDisplay)))
- elseif (source == theGameMenuTabPanelGeneralTabFixCarButton) then
- triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"fix")
- elseif (source == theGameMenuTabPanelGeneralTabFlipCarButton) then
- triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"flip")
- elseif (source == theGameMenuTabPanelPlayersTabPlayerRefreshListButton) then
- refreshPlayerGridlist ()
- elseif (source == wideScreenGUI) then
- guiMoveToBack (wideScreenGUI)
- elseif (source == theGameMenuTabPanelTaxiTabTaxiButton) then
- local row,col = guiGridListGetSelectedItem (theGameMenuTabPanelTaxiTabGridlist)
- taxiPlayer (getLocalPlayer(),tonumber(guiGridListGetItemText(theGameMenuTabPanelTaxiTabGridlist,row,col)))
- elseif (source == animPlay) then
- local row,col = guiGridListGetSelectedItem (theAnimGrid)
- playAnimation (getLocalPlayer(),tonumber(guiGridListGetItemText(theAnimGrid,row,col)))
- elseif (source == animStop) then
- local row,col = guiGridListGetSelectedItem (theAnimGrid)
- stopAnimation ()
- elseif (source == theGameMenuTabPanelPlayersTabPlayerGetInfoButton) then
- local r,c = guiGridListGetSelectedItem (theGameMenuTabPanelPlayersTabPlayerGridlist)
- if r and c and (guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)) then
- local playernametext = guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)
- triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"getPlayerInfo",playernametext)
- end
- elseif (source == theGameMenuTabPanelPlayersTabGetInfoWindowInfoCloseButton) then
- guiSetVisible (theGameMenuTabPanelPlayersTabGetInfoWindow,false)
- elseif (source == theGameMenuTabPanelPlayersTabPlayerCarGotoButton) then
- if (isPedInVehicle (getLocalPlayer())) then
- local r,c = guiGridListGetSelectedItem (theGameMenuTabPanelPlayersTabPlayerGridlist)
- if r and c and (guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)) then
- local playernametext = guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)
- triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"carGotoPlayer",playernametext)
- end
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"For this you need to be in a vehicle!")
- end
- elseif (source == theGameMenuTabPanelPlayersTabPlayerGotoButton) then
- if not (isPedInVehicle (getLocalPlayer())) then
- local r,c = guiGridListGetSelectedItem (theGameMenuTabPanelPlayersTabPlayerGridlist)
- if r and c and (guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)) then
- local playernametext = guiGridListGetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,r,c)
- triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"gotoPlayer",playernametext)
- end
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"For this you don't need to be in a vehicle!\nYou can use car goto")
- end
- elseif (source == theAmmuNationBuyButton) then
- local r,c = guiGridListGetSelectedItem (theAmmuNationGridlist)
- if r then
- local weaponName = guiGridListGetItemText (theAmmuNationGridlist,r,1)
- local weaponTable = findWeaponbyAmmuNationName (weaponName)
- if (weaponTable) then
- triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"ammunationbuy",weaponTable[1],weaponTable[2],weaponTable[3],weaponTable[4])
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"ERROR!")
- end
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Please select a weapon first!")
- end
- elseif (source == theAmmuNationCloseButton) then
- guiSetVisible (theAmmuNationWindow,false)
- showCursor (false,false)
- elseif (source == theGameMenuTabPanelVHTabHouseTeleportButton) then
- local housenumber = guiGetText (theGameMenuTabPanelVHTabHouseNumberInfoLabel)
- triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"warpToHouse",housenumber)
- elseif (source == theCarMissionGUIAcceptButton) then
- triggerServerEvent ("startSSCarMission",getLocalPlayer())
- guiSetVisible (theCarMissionGUIWindow,false)
- showCursor (false,false)
- elseif (source == theCarMissionGUICloseButton) then
- guiSetVisible (theCarMissionGUIWindow,false)
- showCursor (false,false)
- --
- elseif (source == theBoatMissionGUIAcceptButton) then
- triggerServerEvent ("startSSBoatMission",getLocalPlayer())
- guiSetVisible (theBoatMissionGUIWindow,false)
- showCursor (false,false)
- elseif (source == theBoatMissionGUICloseButton) then
- guiSetVisible (theBoatMissionGUIWindow,false)
- showCursor (false,false)
- --
- elseif (source == theCarShopGUIWindowCloseBut) then
- guiSetVisible (theCarShopGUIWindow,false)
- showCursor (false,false)
- elseif (source == theBikeShopGUIWindowCloseBut) then
- guiSetVisible (theBikeShopGUIWindow,false)
- showCursor (false,false)
- elseif (source == theCarShopGUIWindowBuySlot1But) then
- if (guiGridListGetSelectedItem (theCarShopGUIWindowGridList)) then
- local carName = guiGridListGetItemText (theCarShopGUIWindowGridList, guiGridListGetSelectedItem (theCarShopGUIWindowGridList), 1)
- local carID = getVehicleModelFromName (carName)
- local carCost = guiGridListGetItemText (theCarShopGUIWindowGridList, guiGridListGetSelectedItem (theCarShopGUIWindowGridList), 2)
- triggerServerEvent ("carShopCarBuy", getLocalPlayer(), carID, carCost, carName)
- else
- triggerServerEvent ("falied",getLocalPlayer())
- end
- elseif (source == theCarShopGUIWindowBuySlot2But) then
- if (guiGridListGetSelectedItem (theCarShopGUIWindowGridList)) then
- local carName = guiGridListGetItemText (theCarShopGUIWindowGridList, guiGridListGetSelectedItem (theCarShopGUIWindowGridList), 1)
- local carID = getVehicleModelFromName (carName)
- local carCost = guiGridListGetItemText (theCarShopGUIWindowGridList, guiGridListGetSelectedItem (theCarShopGUIWindowGridList), 2)
- triggerServerEvent ("carShopCarBuy2", getLocalPlayer(), carID, carCost, carName)
- else
- triggerServerEvent ("falied",getLocalPlayer())
- end
- elseif (source == theBikeShopGUIWindowBuySlot1But) then
- if (guiGridListGetSelectedItem (theBikeShopGUIWindowGridList)) then
- local bikeName = guiGridListGetItemText (theBikeShopGUIWindowGridList, guiGridListGetSelectedItem (theBikeShopGUIWindowGridList), 1)
- local bikeID = getVehicleModelFromName (bikeName)
- local bikeCost = guiGridListGetItemText (theBikeShopGUIWindowGridList, guiGridListGetSelectedItem (theBikeShopGUIWindowGridList), 2)
- triggerServerEvent ("bikeShopBikeBuy", getLocalPlayer(), bikeID, bikeCost, bikeName)
- else
- triggerServerEvent ("falied2",getLocalPlayer())
- end
- elseif (source == theBikeShopGUIWindowBuySlot2But) then
- if (guiGridListGetSelectedItem (theBikeShopGUIWindowGridList)) then
- local bikeName = guiGridListGetItemText (theBikeShopGUIWindowGridList, guiGridListGetSelectedItem (theBikeShopGUIWindowGridList), 1)
- local bikeID = getVehicleModelFromName (bikeName)
- local bikeCost = guiGridListGetItemText (theBikeShopGUIWindowGridList, guiGridListGetSelectedItem (theBikeShopGUIWindowGridList), 2)
- triggerServerEvent ("bikeShopBikeBuy2", getLocalPlayer(), bikeID, bikeCost, bikeName)
- else
- triggerServerEvent ("falied2",getLocalPlayer())
- end
- elseif (source == resbtn1) then
- local money = getPlayerMoney(getLocalPlayer())
- if (money > 50) then
- local health = getElementHealth (getLocalPlayer())
- triggerServerEvent("restaurantBuy",getLocalPlayer(),50);
- setElementHealth(getLocalPlayer(),health+5);
- outputChatBox("You have bought mega burger, have fun. Your health increased +5",0,255,0);
- setPedAnimation( getLocalPlayer(), "FOOD", "EAT_Burger",5500,false,false,false)
- setTimer(resetAnim,5500,1)
- else
- outputChatBox("You don't have enough money!",255,0,0);
- end
- elseif (source == resbtn2) then
- local money = getPlayerMoney(getLocalPlayer())
- if (money > 30) then
- local health = getElementHealth (getLocalPlayer())
- triggerServerEvent("restaurantBuy",getLocalPlayer(),30);
- setElementHealth(getLocalPlayer(),health+3);
- outputChatBox("You have bought medium burger, have fun. Your health increased +3",0,255,0);
- setPedAnimation( getLocalPlayer(), "FOOD", "EAT_Burger",5500,false,false,false)
- setTimer(resetAnim,5500,1)
- else
- outputChatBox("You don't have enough money!",255,0,0);
- end
- elseif (source == resbtn3) then
- local money = getPlayerMoney(getLocalPlayer())
- if (money > 20) then
- local health = getElementHealth (getLocalPlayer())
- triggerServerEvent("restaurantBuy",getLocalPlayer(),20);
- setElementHealth(getLocalPlayer(),health+1);
- outputChatBox("You have bought small burger, have fun. Your health increased +1",0,255,0);
- setPedAnimation( getLocalPlayer(), "FOOD", "EAT_Burger",5500,false,false,false)
- setTimer(resetAnim,5500,1)
- else
- outputChatBox("You don't have enough money!",255,0,0);
- end
- elseif (source == resbtn4) then
- local money = getPlayerMoney(getLocalPlayer())
- if (money > 75) then
- local health = getElementHealth (getLocalPlayer())
- triggerServerEvent("restaurantBuy",getLocalPlayer(),75);
- setElementHealth(getLocalPlayer(),health+20);
- outputChatBox("You have bought XXL burger, have fun. Your health increased +20",0,255,0);
- setPedAnimation( getLocalPlayer(), "FOOD", "EAT_Burger",5500,false,false,false)
- setTimer(resetAnim,5500,1)
- else
- outputChatBox("You don't have enough money!",255,0,0);
- end
- elseif (source == resexit) then
- local money = getPlayerMoney(getLocalPlayer())
- guiSetVisible(restaurant,false)
- showCursor(false)
- outputChatBox("Bye bye, come again!",255,255,0);
- elseif (source == minigamebtn) then
- minigam = guiGridListGetSelectedItem( theGameMenuTabPanelMinigameTabGridlist )
- if ( minigam == 0 ) then
- if not (RCWARSSTARTED == true) then
- if not (getElementData(getLocalPlayer(),"RCWAR") == true) then
- money = getPlayerMoney(getLocalPlayer())
- if (money > 1000) then
- name = getPlayerName(getLocalPlayer())
- x,y,z = getElementPosition(getLocalPlayer())
- triggerServerEvent("onRequestRCWars",getLocalPlayer(),name,x,y,z)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You don't have enough money to enter RC wars..")
- end
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You have already joined RC Wars minigame")
- end
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Sorry, but RC Wars minigame has already started")
- end
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You need to choose the minigame first.")
- end
- elseif (source == theCarShopGUIWindowBuySlot2But) then
- triggerServerEvent ("falied",getLocalPlayer())
- elseif (source == theGameMenuTabPanelVHTabVehicleSpawnCarOne) then
- triggerServerEvent("carSpawn",getLocalPlayer())
- elseif (source == theGameMenuTabPanelVHTabVehicleDestroyCarOne) then
- triggerServerEvent("carDestroy",getLocalPlayer())
- elseif (source == theGameMenuTabPanelVHTabVehicleDestroyCarTwo) then
- triggerServerEvent("carDestroy2",getLocalPlayer())
- elseif (source == theGameMenuTabPanelVHTabVehicleSpawnCarTwo) then
- triggerServerEvent("carSpawn2",getLocalPlayer())
- elseif (source == theTradeCenterCloseButton) then
- guiSetVisible (theTradeCenterWindow,false)
- showCursor (false,false)
- elseif (source == theNametagShopWindowAcceptButton) then
- if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then
- guiSetVisible (theNametagShopWindow,false)
- showCursor (false,false)
- triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit)))
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Sorry, you need to fill in numbers!")
- end
- elseif (source == theNametagShopWindowCloseButton) then
- guiSetVisible (theNametagShopWindow,false)
- showCursor (false,false)
- elseif (source == theTradeCenterSellTabSellButton) then
- local sellCar1 = guiRadioButtonGetSelected (theTradeCenterSellTabRadioSl1)
- local sellCar2 = guiRadioButtonGetSelected (theTradeCenterSellTabRadioSl2)
- local priceStr = guiGetText (theTradeCenterSellTabPriceEdit)
- local price = tonumber (priceStr)
- if (price) and (price > 100) and (price < 800000) then
- if (sellCar1 == true) then
- triggerServerEvent ("tradeCenterSellCar",getLocalPlayer(),1,price)
- elseif (sellCar2 == true) then
- triggerServerEvent ("tradeCenterSellCar",getLocalPlayer(),2,price)
- end
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"Make sure your price is all right!\nYou can ask at most 800000$, at lease 100$")
- end
- elseif (source == theTradeCenterBuyTabBuySl1) then
- local r,c = guiGridListGetSelectedItem(theTradeCenterBuyTabGridlist)
- if (r) then
- local listid = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,1)
- local name = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,2)
- local cost = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,3)
- local id = getVehicleModelFromName (name)
- local oldOwner = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,4)
- triggerServerEvent ("tradeCenterBuyCar",getLocalPlayer(),id,cost,name,oldOwner,1,listid)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You haven't selected a car you want to buy!")
- end
- elseif (source == theTradeCenterBuyTabBuySl2) then
- local r,c = guiGridListGetSelectedItem(theTradeCenterBuyTabGridlist)
- if (r) then
- local listid = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,1)
- local name = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,2)
- local cost = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,3)
- local id = getVehicleModelFromName (name)
- local oldOwner = guiGridListGetItemText (theTradeCenterBuyTabGridlist,r,4)
- triggerServerEvent ("tradeCenterBuyCar",getLocalPlayer(),id,cost,name,oldOwner,2,listid)
- else
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You haven't selected a car you want to buy!")
- end
- elseif (source == theCowStatsWindowCloseButton) then
- guiSetVisible (theCowStatsWindow,false)
- end
- end)
- function resetAnim()
- setPedAnimation(getLocalPlayer(),false)
- end
- addEvent ("lolmodOpenCharacterSelectWindow",true)
- addEventHandler ("lolmodOpenCharacterSelectWindow",getRootElement(),
- function(username,char1,char2,char3)
- if (source == getLocalPlayer()) then
- guiGridListClear (jasmodCharSelectGridlist)
- guiSetVisible (jasmodLoginWindow,false)
- guiSetVisible (jasmodCharSelectWindow,true)
- if (char1) then
- local row = guiGridListAddRow (jasmodCharSelectGridlist)
- guiGridListSetItemText (jasmodCharSelectGridlist,row,characternameColumn,char1,false,false)
- end
- if (char2) then
- local row = guiGridListAddRow (jasmodCharSelectGridlist)
- guiGridListSetItemText (jasmodCharSelectGridlist,row,characternameColumn,char2,false,false)
- end
- if (char3) then
- local row = guiGridListAddRow (jasmodCharSelectGridlist)
- guiGridListSetItemText (jasmodCharSelectGridlist,row,characternameColumn,char3,false,false)
- end
- end
- end)
- addEvent ("lolmodHideCharacterSelectWindow",true)
- addEventHandler ("lolmodHideCharacterSelectWindow",getRootElement(),
- function()
- guiSetVisible (jasmodCharSelectWindow,false)
- showCursor (false,false)
- showChat (true)
- showPlayerHudComponent ("radar",true)
- disableWideScreen (source)
- end)
- function refreshGameMenuBankAndCash (cash,bank,housenumber)
- if (source == getLocalPlayer()) then
- if (bank) then
- guiSetText (theGameMenuTabPanelGeneralTabBankInfoLabel,"Bank: " .. tostring(bank) .. "$")
- end
- if (housenumber) then
- guiSetText (theGameMenuTabPanelVHTabHouseNumberInfoLabel,tostring(housenumber))
- end
- end
- end
- addEvent ("lolmodRefreshBankInfoMenu",true)
- addEventHandler ("lolmodRefreshBankInfoMenu",getRootElement(),refreshGameMenuBankAndCash)
- function addIntoBankEditDisplay (number)
- local text = guiGetText (bankWindowDisplay)
- guiSetText (bankWindowDisplay, text .. "" .. number)
- end
- addEvent ("openBankWindow",true)
- addEventHandler ("openBankWindow",getRootElement(),
- function(bankname)
- guiSetText (bankWindow,bankname)
- guiSetVisible (bankWindow,true)
- showCursor (true,true)
- end)
- function refreshPlayerGridlist ()
- guiGridListClear (theGameMenuTabPanelPlayersTabPlayerGridlist)
- for i,v in ipairs (getElementsByType ("player")) do
- local row = guiGridListAddRow (theGameMenuTabPanelPlayersTabPlayerGridlist)
- if (getPlayerNametagColor (v)) then
- guiGridListSetItemText (theGameMenuTabPanelPlayersTabPlayerGridlist,row,theGameMenuTabPanelPlayersTabPlayerColumn,getPlayerNametagText (v),false,false)
- end
- end
- end
- addEventHandler ("onClientPlayerJoin",getRootElement(),function() refreshPlayerGridlist() end)
- -- Widescreen Functions
- function enableWideScreen (player)
- if (getLocalPlayer() == player) then
- guiSetVisible (wideScreenGUI,true)
- guiMoveToBack (wideScreenGUI)
- end
- end
- function disableWideScreen (player)
- if (getLocalPlayer() == player) then
- guiSetVisible (wideScreenGUI,false)
- end
- end
- -- TAXI!
- function taxiPlayer (player,id)
- if (player == getLocalPlayer()) and (id) then
- local destination = taxis[id]
- if (destination) then
- local name = destination[1]
- local cost = destination[2]
- local x = destination[3]
- local y = destination[4]
- local z = destination[5]
- if name and cost and x and y and z then
- triggerServerEvent ("bringPlayerToTaxiDestination",player,name,cost,x,y,z)
- else
- end
- else
- end
- end
- end
- function stopAnimation()
- triggerServerEvent ("playtheanim",getLocalPlayer(),"false")
- end
- --ANIM
- function playAnimation (player,id)
- if (player == getLocalPlayer()) and (id) then
- local name = animations[id]
- if (name) then
- local group = name[2]
- local ingroup = name[3]
- if name and group and ingroup then
- triggerServerEvent ("playtheanim",getLocalPlayer(),name,group,ingroup)
- else
- end
- else
- end
- end
- end
- addEvent ("gameMenuShowPlayerInfo",true)
- addEventHandler ("gameMenuShowPlayerInfo",getRootElement(),
- function(accountname,charactername,cash,bank,goto)
- guiSetText(infolbl1,"Account Name: " .. accountname)
- guiSetText(infolbl2,"Character Name: " .. charactername)
- guiSetText(infolbl3,"Bank Balance: " .. bank .. "$")
- guiSetText(infolbl4,"Cash In Pocket: " .. cash .. "$")
- guiSetText(infolbl5,"Goto State: " .. goto)
- guiSetVisible (theGameMenuTabPanelPlayersTabGetInfoWindow,true)
- end)
- -- godmode stuff
- addEvent("enableGodMode", true)
- addEvent("disableGodMode", true)
- addEventHandler ("enableGodMode", getRootElement(),
- function()
- removeEventHandler ("onClientPlayerDamage", getRootElement(), cancelEventEvent)
- addEventHandler ("onClientPlayerDamage", getRootElement(), cancelEventEvent)
- end)
- addEventHandler ("disableGodMode", getRootElement(),
- function()
- removeEventHandler ("onClientPlayerDamage", getRootElement(), cancelEventEvent)
- end)
- function cancelEventEvent () cancelEvent() end
- -- ammu nation
- addEventHandler ("onClientMarkerHit",getRootElement(),
- function(hitElement,matchingDimension)
- if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then
- if (source == ammuNationMarker) then
- showCursor (true,true)
- guiSetVisible (theAmmuNationWindow,true)
- elseif (source == wangCarsCarshopMarker) then
- showCursor (true,true)
- guiSetVisible (theCarShopGUIWindow,true)
- elseif (source == bikesCarshopMarker) then
- showCursor (true,true)
- guiSetVisible (theBikeShopGUIWindow,true)
- elseif (source == restaurantMarker) then
- showCursor (true,true)
- guiSetVisible (restaurant,true)
- elseif (source == nametagshopMarker) then
- guiSetVisible (theNametagShopWindow,true)
- showCursor (true,true)
- end
- end
- end)
- function findWeaponbyAmmuNationName (name)
- for i,v in ipairs (ammunation) do
- if (v[1] == name) then
- return v
- end
- end
- end
- addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),
- function()
- x,y = guiGetScreenSize ()
- if (x < 800) and (y < 600) then
- 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")
- end
- end)
- -- Home System
- addEvent ("viewHouseGUIwindow",true)
- addEventHandler ("viewHouseGUIwindow",getRootElement(),
- function(owner,price,housenumber)
- if (source == getLocalPlayer()) then
- guiSetText (theHouseGUIOwnerInfoLabel,owner)
- guiSetText (theHouseGUIPriceInfoLabel,price)
- guiSetText (theHouseGUINumberInfoLabel,housenumber)
- guiSetVisible (theHouseGUIWindow,true)
- showCursor (true,true)
- end
- end)
- addEventHandler ("onClientGUIClick",getRootElement(),
- function(button,state,absX,absY)
- if (source == theHouseGUICloseButton) then
- guiSetVisible (theHouseGUIWindow,false)
- showCursor (false,false)
- elseif (source == theHouseGUIEnterButton) then
- local housenumber = guiGetText (theHouseGUINumberInfoLabel)
- triggerServerEvent ("HouseSystemEnterHouse",getLocalPlayer(),housenumber)
- elseif (source == theHouseGUIBuyButton) then
- local housenumber = guiGetText (theHouseGUINumberInfoLabel)
- triggerServerEvent ("HouseSystemBuyHouse",getLocalPlayer(),housenumber)
- elseif (source == theHouseGUISellButton) then
- local housenumber = guiGetText (theHouseGUINumberInfoLabel)
- triggerServerEvent ("HouseSystemSellHouse",getLocalPlayer(),housenumber)
- elseif (source == theInsideHouseGUIWindowLeaveBut) then
- triggerServerEvent ("HouseSystemLeaveHouse",getLocalPlayer())
- guiSetVisible (theInsideHouseGUIWindow,false)
- elseif (source == theInsideHouseGUIWindowLockBut) then
- if not (guiGetText (theInsideHouseGUIWindowLockBut) == "Owner-Only!") then
- triggerServerEvent ("HouseSystemLockHouse",getLocalPlayer(),guiGetText(theInsideHouseGUIWindowLockBut))
- end
- if (guiGetText (theInsideHouseGUIWindowLockBut) == "lock") then
- guiSetText (theInsideHouseGUIWindowLockBut,"unlock")
- elseif (guiGetText (theInsideHouseGUIWindowLockBut) == "unlock") then
- guiSetText (theInsideHouseGUIWindowLockBut,"lock")
- else
- outputChatBox ("This isn't your house, so you can't lock or unlock it!",255,0,0,false)
- end
- end
- end)
- addEvent ("hideHouseGuiWindow",true)
- addEventHandler("hideHouseGuiWindow",getRootElement(),
- function()
- if (source == getLocalPlayer()) then
- guiSetVisible (theHouseGUIWindow,false)
- showCursor (false,false)
- end
- end)
- addEvent ("enterHouseOpenGuiWindow",true)
- addEventHandler("enterHouseOpenGuiWindow",getRootElement(),
- function(lockstate)
- if (source == getLocalPlayer()) then
- guiSetVisible (theHouseGUIWindow,false)
- showCursor (false,false)
- guiSetVisible (theInsideHouseGUIWindow,true)
- if (lockstate == "unsold") then
- guiSetText (theInsideHouseGUIWindowLockBut,"Owner-Only!")
- elseif (lockstate == "lock") then
- guiSetText (theInsideHouseGUIWindowLockBut,"unlock")
- elseif (lockstate == "unlock") then
- guiSetText (theInsideHouseGUIWindowLockBut,"lock")
- end
- end
- end)
- -- CAR MISSIONS
- addEvent ("startCSCarMission",true)
- addEventHandler ("startCSCarMission",getRootElement(),
- function(number,title,time,carname,description,winMoney)
- if (getLocalPlayer() == source) then
- guiSetText (theCarMissionGUITitle,"Mission ".. number ..": ".. title)
- guiSetText (theCarMissionGUIDescription,description)
- guiSetText (theCarMissionGUIInfoInformationLabel,carname .."\n" .. winMoney .."\n" .. time)
- guiSetVisible (theCarMissionGUIWindow,true)
- showCursor (true,true)
- end
- end)
- -- BOAT MISSIONS
- addEvent ("startCSBoatMission",true)
- addEventHandler ("startCSBoatMission",getRootElement(),
- function(number,title,time,carname,description,winMoney)
- if (getLocalPlayer() == source) then
- guiSetText (theBoatMissionGUITitle,"Mission ".. number ..": ".. title)
- guiSetText (theBoatMissionGUIDescription,description)
- guiSetText (theBoatMissionGUIInfoInformationLabel,carname .."\n" .. winMoney .."\n" .. time)
- guiSetVisible (theBoatMissionGUIWindow,true)
- showCursor (true,true)
- end
- end)
- function parkSystem()
- parkwnd = guiCreateWindow(-3,0,199,219,"Taalas Parking",false)
- park = guiCreateButton(113,182,77,28,"Park (250$)",false,parkwnd)
- lbl = guiCreateLabel(13,29,183,38,"Do you want to park your car?",false,parkwnd)
- guiLabelSetColor(lbl,255,255,255)
- guiLabelSetVerticalAlign(lbl,"top")
- guiLabelSetHorizontalAlign(lbl,"left",false)
- parkimg = guiCreateStaticImage(12,63,95,112,"images/park.jpg",false,parkwnd)
- unpark = guiCreateButton(114,147,74,28,"Unpark (0$)",false,parkwnd)
- exit = guiCreateButton(114,112,74,28,"Exit",false,parkwnd)
- ffslbl = guiCreateLabel(11,197,99,20,"Parking System 0.2",false,parkwnd)
- guiLabelSetColor(ffslbl,255,255,255)
- guiLabelSetVerticalAlign(ffslbl,"top")
- guiLabelSetHorizontalAlign(ffslbl,"left",false)
- guiSetFont(ffslbl,"default-small")
- guiSetVisible(parkwnd,false)
- --]]
- parkmarker = createMarker(-2927.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
- parkmarker2 = createMarker(-2920.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
- parkmarker3 = createMarker(-2913.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
- parkmarker4 = createMarker(-2906.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
- parkmarker5 = createMarker(-2899.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
- parkmarker6 = createMarker(-2892.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
- parkmarker7 = createMarker(-2885.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
- parkmarker8 = createMarker(-2878.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
- parkmarker9 = createMarker(-2871.41,507.44,3.92,"cylinder",1.0,0,255,255,127);
- addEventHandler("onClientGUIClick",park,onPlayerWantToPark);
- addEventHandler("onClientGUIClick",unpark,onPlayerWantToUnpark);
- addEventHandler("onClientGUIClick",exit,exitIt);
- end
- addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),parkSystem)
- function onParkHit(hitPlayer)
- 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
- if (hitPlayer == getLocalPlayer()) then
- if not (getElementData(source,"park") == "yes") then
- car = getPedOccupiedVehicle(getLocalPlayer())
- if (car) then
- outputChatBox("Welcome to SA park'n'service! Would you like to park your car?",255,0,0);
- guiSetVisible(parkwnd,true);
- showCursor(true);
- setVehicleFrozen(car,true)
- setElementData(source,"park","yes");
- else
- outputChatBox("You trying to park yourself? No way, please, get a car!",255,0,0);
- end
- else
- 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);
- end
- end
- end
- end
- addEventHandler("onClientMarkerHit",getRootElement(),onParkHit);
- function exitIt()
- if (source == exit) then
- car = getPedOccupiedVehicle(getLocalPlayer())
- addEventHandler("onClientMarkerLeave",getRootElement(),resetData)
- setVehicleFrozen(car,false)
- guiSetVisible(parkwnd,false);
- showCursor(false);
- end
- end
- function onPlayerWantToPark()
- if (source == park) then
- car = getPedOccupiedVehicle(getLocalPlayer())
- local money = getPlayerMoney(getLocalPlayer())
- if (money > 250) then
- name = getPlayerName(getLocalPlayer())
- setElementData(car,"parkowner",name);
- showCursor(false);
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You have succesfully parked your vehicle!")
- triggerServerEvent("takeAmoney",getLocalPlayer())
- guiSetVisible(parkwnd,false)
- addEventHandler("onClientPlayerVehicleEnter",getRootElement(),parker)
- else
- outputChatBox("You don't have enough money!",255,0,0);
- end
- end
- end
- function parker(vehicle,seat)
- name = getPlayerName(getLocalPlayer())
- if (getElementData(vehicle,"parkowner") == name) then
- guiSetVisible(parkwnd,true);
- showCursor(true);
- end
- end
- function onPlayerWantToUnpark()
- if (source == unpark) then
- car = getPedOccupiedVehicle(getLocalPlayer())
- setVehicleFrozen(car,false)
- showCursor(false)
- triggerEvent ("lolmodOpenInfoWindow",getLocalPlayer(),"You have succesfully unparked your vehicle!")
- guiSetVisible(parkwnd,false)
- addEventHandler("onClientMarkerLeave",getRootElement(),resetData)
- end
- end
- function resetData(hitPlayer)
- if (hitPlayer == getLocalPlayer()) then
- setElementData(source,"park","no");
- removeEventHandler("onClientMarkerLeave",getRootElement(),resetData)
- removeEventHandler("onClientPlayerVehicleEnter",getRootElement(),parker)
- end
- end
- addEvent ("openOttoTradeCenter",true)
- addEventHandler ("openOttoTradeCenter",getRootElement(),
- function(carsTable)
- guiGridListClear(theTradeCenterBuyTabGridlist)
- for i,v in pairs (carsTable) do
- local row = guiGridListAddRow (theTradeCenterBuyTabGridlist)
- guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,1,tostring(i),false,true)
- guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,2,getVehicleNameFromModel(v[1]),false,false)
- guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,3,tostring(v[2]),false,true)
- guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,4,v[3],false,false)
- guiGridListSetItemText (theTradeCenterBuyTabGridlist,row,5,tostring(v[4]),false,true)
- end
- guiSetVisible (theTradeCenterWindow,true)
- showCursor (true,true)
- end)
- function gameState()
- RCWARSSTARTED = true
- end
- addEvent("gameHasStarted",true)
- addEventHandler("gameHasStarted",getRootElement(),gameState)
- function gameState2()
- RCWARSSTARTED = false
- end
- addEvent("gameHasStopped",true)
- addEventHandler("gameHasStopped",getRootElement(),gameState2)
- function getActualVelocity( element, x, y, z )
- return (x^2 + y^2 + z^2) ^ 0.5
- end
- -----------------------------
- function getVehicleSpeed( vehicle, units )
- if getElementType( vehicle ) ~= "vehicle" then return false end
- if units == "km/h" or units == 1 then
- return math.floor( getActualVelocity( vehicle, getElementVelocity( vehicle ) ) * 161 )
- elseif units == "mph" or units == 0 or not units then
- return math.floor( getActualVelocity( vehicle, getElementVelocity( vehicle ) ) * 100 )
- end
- end
- -----------------------------
- function getVehicleMaxSpeed( vehicle, units )
- if type( vehicle ) == "number" and ( vehicle >= 400 and vehicle <= 612 ) then
- local vehid = vehicle - 399
- if units == "mph" then return math.floor( g_MaxSpeedInKMPH[ vehid ] * 1.61 ) end
- return g_MaxSpeedInKMPH[ vehid ]
- elseif getElementType( vehicle ) ~= "vehicle" then
- return false
- elseif units == "km/h" or units == 1 then
- return g_MaxSpeedInKMPH[ getVehicleID( vehicle ) - 399 ]
- elseif units == "mph" or units == 0 or not units then
- return math.floor(g_MaxSpeedInKMPH[ getVehicleID( vehicle ) - 399 ] / 1.61 )
- end
- end
- function onClientResStart()
- vehinfownd = guiCreateWindow ( 0.03, 0.4, 0.150, 0.2, "", true )
- vehinfomemo = guiCreateMemo(0.0,0.12,0.98,0.98,"lmao",true,vehinfownd)
- guiSetAlpha(vehinfownd,0.0)
- end
- addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),onClientResStart);
- function onOpenVehicleInfo(text)
- fadeElement(vehinfownd,true)
- guiSetText(vehinfomemo,text)
- setTimer(fadeOut,4000,1)
- end
- addEvent("onOpenInfo",true);
- addEventHandler("onOpenInfo",getRootElement(),onOpenVehicleInfo);
- function fadeOut()
- fadeElement(vehinfownd,false)
- end
- function fadeElement( guiElem, state )
- if state == false then
- local currentAlpha = guiGetAlpha( guiElem );
- local newAlpha = currentAlpha - 0.05;
- if newAlpha < 0 then newAlpha = 0 end
- guiSetAlpha( guiElem, newAlpha );
- if newAlpha ~= 0 then
- setTimer( fadeElement, 50, 1, guiElem, state );
- end
- elseif state == true then
- local currentAlpha = guiGetAlpha( guiElem );
- local newAlpha = currentAlpha + 0.05;
- if newAlpha > 0.8 then newAlpha = 0.8 end
- guiSetAlpha( guiElem, newAlpha );
- if newAlpha ~= 0.8 then
- setTimer( fadeElement, 50, 1, guiElem, state );
- end
- end
- end
- addEventHandler ("onClientGUIChanged",getRootElement(),
- function(element)
- if (element == theNametagShopWindowRedEdit) or (element == theNametagShopWindowGreenEdit) or (element == theNametagShopWindowBlueEdit) then
- guiLabelSetColor (theNametagShopWindowExampleTextLabel,tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText(theNametagShopWindowBlueEdit)))
- end
- end)
- function getCash()
- money = getPlayerMoney(getLocalPlayer())
- guiSetText(cashlbl,"Cash: " .. money .. "$")
- end
- function updateCam1()
- local cx, cy, cz = getElementPosition( thing )
- local tx, ty, tz = getElementPosition( plane )
- setCameraMatrix ( cx, cy, cz, tx, ty, tz )
- end
- function updateCam2()
- local cx, cy, cz = getElementPosition( thing2 )
- local tx, ty, tz = getElementPosition( thing )
- setCameraMatrix ( cx, cy, cz, tx, ty, tz )
- end
- function updateCam3()
- local cx, cy, cz = getElementPosition( thing2 )
- local tx, ty, tz = getElementPosition( thing )
- setCameraMatrix ( cx, cy, cz, tx, ty, tz )
- end
- -- Employment Agency By JasperNL=D
- addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),
- function()
- EmploymentAgencyWindow = guiCreateWindow(0.4563,0.2867,0.4563,0.5433,"Employment Agency",true)
- guiSetVisible (EmploymentAgencyWindow,false)
- guiWindowSetSizable(EmploymentAgencyWindow,false)
- EmploymentAgencyWindowJobsGrid = guiCreateGridList(0.0301,0.1472,0.9397,0.319,true,EmploymentAgencyWindow)
- guiGridListSetSortingEnabled (EmploymentAgencyWindowJobsGrid,false)
- guiGridListSetSelectionMode(EmploymentAgencyWindowJobsGrid,0)
- guiGridListAddColumn(EmploymentAgencyWindowJobsGrid,"Job name",0.5)
- guiGridListAddColumn(EmploymentAgencyWindowJobsGrid,"Owner",0.4)
- EmploymentAgencyWindowJobsLabel = guiCreateLabel(0.2603,0.0675,0.4521,0.0736,"The Jobs",true,EmploymentAgencyWindow)
- guiLabelSetColor(EmploymentAgencyWindowJobsLabel,255,255,255)
- guiLabelSetVerticalAlign(EmploymentAgencyWindowJobsLabel,"center")
- guiLabelSetHorizontalAlign(EmploymentAgencyWindowJobsLabel,"center",false)
- guiSetFont(EmploymentAgencyWindowJobsLabel,"default-bold-small")
- EmploymentAgencyWindowGetJobInfoButton = guiCreateButton(0.7644,0.4755,0.2055,0.0828,"Get info",true,EmploymentAgencyWindow)
- EmploymentAgencyWindowApplicateLabel = guiCreateLabel(0.0438,0.4847,0.3781,0.0767,"Start applicating!",true,EmploymentAgencyWindow)
- guiLabelSetColor(EmploymentAgencyWindowApplicateLabel,255,255,255)
- guiLabelSetVerticalAlign(EmploymentAgencyWindowApplicateLabel,"center")
- guiLabelSetHorizontalAlign(EmploymentAgencyWindowApplicateLabel,"left",false)
- guiSetFont(EmploymentAgencyWindowApplicateLabel,"default-bold-small")
- 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)
- EmploymentAgencyWindowApplicateButton = guiCreateButton(0.0356,0.8098,0.9315,0.1043,"Applicate!",true,EmploymentAgencyWindow)
- EmploymentAgencyWindowCloseButton = guiCreateButton(0.7507,0.0706,0.2164,0.0736,"Close",true,EmploymentAgencyWindow)
- EmploymentAgencyWindowCopyrightLabel = guiCreateLabel(0.0301,0.911,0.9452,0.0644,"Employment Agency by JasperNL=D",true,EmploymentAgencyWindow)
- guiLabelSetColor(EmploymentAgencyWindowCopyrightLabel,255,255,255)
- guiLabelSetVerticalAlign(EmploymentAgencyWindowCopyrightLabel,"center")
- guiLabelSetHorizontalAlign(EmploymentAgencyWindowCopyrightLabel,"right",false)
- guiSetFont(EmploymentAgencyWindowCopyrightLabel,"default-small")
- EmploymentAgencyInfoWindow = guiCreateWindow(0.065,0.31,0.3288,0.37,"Employment Agency Job Info",true)
- guiSetVisible (EmploymentAgencyInfoWindow,false)
- guiWindowSetSizable(EmploymentAgencyInfoWindow,false)
- EmploymentAgencyInfoWindowInformationMemo = guiCreateMemo(0.0342,0.0946,0.9316,0.7162,"",true,EmploymentAgencyInfoWindow)
- guiMemoSetReadOnly(EmploymentAgencyInfoWindowInformationMemo,true)
- EmploymentAgencyInfoWindowCloseButton = guiCreateButton(0.0342,0.8288,0.9316,0.1306,"Close Job Information",true,EmploymentAgencyInfoWindow)
- EmploymentAgencyMyJobWindow = guiCreateWindow(0.3913,0.27,0.2288,0.4033,"My Job",true)
- guiSetVisible (EmploymentAgencyMyJobWindow,false)
- guiWindowSetSizable(EmploymentAgencyMyJobWindow,false)
- EmploymentAgencyMyJobWindowCloseWindowButton = guiCreateButton(0.0492,0.8636,0.9016,0.0992,"Close",true,EmploymentAgencyMyJobWindow)
- EmploymentAgencyMyJobWindowJobLabel = guiCreateLabel(0.0437,0.1033,0.9126,0.0744,"Job",true,EmploymentAgencyMyJobWindow)
- guiLabelSetColor(EmploymentAgencyMyJobWindowJobLabel,255,255,255)
- guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowJobLabel,"top")
- guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowJobLabel,"left",false)
- EmploymentAgencyMyJobWindowJobInfoLabel = guiCreateLabel(0.0383,0.1777,0.9235,0.0744,"-- JOB TITLE --",true,EmploymentAgencyMyJobWindow)
- guiLabelSetColor(EmploymentAgencyMyJobWindowJobInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowJobInfoLabel,"top")
- guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowJobInfoLabel,"right",false)
- EmploymentAgencyMyJobWindowPaydayLabel = guiCreateLabel(0.0437,0.2603,0.918,0.0744,"Payday",true,EmploymentAgencyMyJobWindow)
- guiLabelSetColor(EmploymentAgencyMyJobWindowPaydayLabel,255,255,255)
- guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowPaydayLabel,"top")
- guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowPaydayLabel,"left",false)
- EmploymentAgencyMyJobWindowPaydayInfoLabel = guiCreateLabel(0.0437,0.3388,0.918,0.0744,"-- PAYDAY --",true,EmploymentAgencyMyJobWindow)
- guiLabelSetColor(EmploymentAgencyMyJobWindowPaydayInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowPaydayInfoLabel,"top")
- guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowPaydayInfoLabel,"right",false)
- EmploymentAgencyMyJobWindowLeaveJobButton = guiCreateButton(0.0492,0.7355,0.8907,0.1074,"Leave this job",true,EmploymentAgencyMyJobWindow)
- EmploymentAgencyMyJobWindowJobOwnerLabel = guiCreateLabel(0.0437,0.4174,0.918,0.0744,"Your Boss",true,EmploymentAgencyMyJobWindow)
- guiLabelSetColor(EmploymentAgencyMyJobWindowJobOwnerLabel,255,255,255)
- guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowJobOwnerLabel,"top")
- guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowJobOwnerLabel,"left",false)
- EmploymentAgencyMyJobWindowJobOwnerInfoLabel = guiCreateLabel(0.0437,0.4917,0.918,0.0744,"-- JOB OWNER --",true,EmploymentAgencyMyJobWindow)
- guiLabelSetColor(EmploymentAgencyMyJobWindowJobOwnerInfoLabel,255,255,255)
- guiLabelSetVerticalAlign(EmploymentAgencyMyJobWindowJobOwnerInfoLabel,"top")
- guiLabelSetHorizontalAlign(EmploymentAgencyMyJobWindowJobOwnerInfoLabel,"right",false)
- jobBossPanel = guiCreateWindow(0.015,0.2133,0.4,0.5133,"Job Boss Panel",true)
- guiSetVisible (jobBossPanel,false)
- jobBossPanelTabPanel = guiCreateTabPanel(0.0313,0.0779,0.9312,0.8864,true,jobBossPanel)
- jobBossPanelTabPanelAppTab = guiCreateTab("Applications",jobBossPanelTabPanel)
- guiGridListSetSelectionMode(jobBossPanelTabPanelAppTab,0)
- jobBossPanelTabPanelAppTabGrid = guiCreateGridList(0.0201,0.0241,0.9597,0.8353,true,jobBossPanelTabPanelAppTab)
- guiGridListAddColumn(jobBossPanelTabPanelAppTabGrid,"Character Name",0.9)
- jobBossPanelTabPanelAppTabAcceptButton = guiCreateButton(0.0168,0.8715,0.9631,0.1084,"Accept Application",true,jobBossPanelTabPanelAppTab)
- jobBossPanelTabPanelEmpTab = guiCreateTab("Current Employment",jobBossPanelTabPanel)
- jobBossPanelTabPanelEmpTabGrid = guiCreateGridList(0.0201,0.0321,0.9564,0.8112,true,jobBossPanelTabPanelEmpTab)
- guiGridListSetSelectionMode(jobBossPanelTabPanelEmpTabGrid,0)
- guiGridListAddColumn(jobBossPanelTabPanelEmpTabGrid,"Character Name",0.6)
- guiGridListAddColumn(jobBossPanelTabPanelEmpTabGrid,"Worker Payday",0.2)
- jobBossPanelTabPanelEmpTabFireButton = guiCreateButton(0.0201,0.8554,0.9564,0.1245,"Fire selected player",true,jobBossPanelTabPanelEmpTab)
- end)
- addEvent ("jobOpenJobInformationWindowAndOtherCrap",true)
- addEventHandler ("jobOpenJobInformationWindowAndOtherCrap",getRootElement(),
- function (job,payday,boss,thing1,thing2)
- if (boss == "You are the boss xD") then
- guiSetText (EmploymentAgencyMyJobWindowJobOwnerInfoLabel,boss)
- guiSetText (EmploymentAgencyMyJobWindowPaydayInfoLabel,payday .. "$")
- guiSetText (EmploymentAgencyMyJobWindowJobInfoLabel,job)
- guiSetVisible (EmploymentAgencyMyJobWindow,true)
- guiGridListClear (jobBossPanelTabPanelAppTabGrid)
- guiGridListClear (jobBossPanelTabPanelEmpTabGrid)
- for i,v in pairs (thing1) do
- local row = guiGridListAddRow (jobBossPanelTabPanelEmpTabGrid)
- guiGridListSetItemText (jobBossPanelTabPanelEmpTabGrid,row,1,v[1],false,false)
- guiGridListSetItemText (jobBossPanelTabPanelEmpTabGrid,row,2,v[2],false,false)
- end
- for i,v in pairs (thing2) do
- local row = guiGridListAddRow (jobBossPanelTabPanelAppTabGrid)
- guiGridListSetItemText (jobBossPanelTabPanelAppTabGrid,row,1,v,false,false)
- end
- guiSetVisible (jobBossPanel,true)
- showCursor (true,true)
- else
- if (job == "none") then
- guiGridListClear (EmploymentAgencyWindowJobsGrid)
- for i,v in pairs (payday) do
- local row = guiGridListAddRow (EmploymentAgencyWindowJobsGrid)
- guiGridListSetItemText (EmploymentAgencyWindowJobsGrid,row,1,v[1],false,false)
- guiGridListSetItemText (EmploymentAgencyWindowJobsGrid,row,2,v[2],false,false)
- end
- guiSetVisible (EmploymentAgencyWindow,true)
- showCursor (true,true)
- else
- guiSetText (EmploymentAgencyMyJobWindowJobOwnerInfoLabel,boss)
- guiSetText (EmploymentAgencyMyJobWindowPaydayInfoLabel,payday .. "$")
- guiSetText (EmploymentAgencyMyJobWindowJobInfoLabel,job)
- guiSetVisible (EmploymentAgencyMyJobWindow,true)
- showCursor (true,true)
- end
- end
- end)
- addEventHandler ("onClientGUIClick",getRootElement(),
- function()
- if (source == EmploymentAgencyWindowGetJobInfoButton) then
- local row,col = guiGridListGetSelectedItem (EmploymentAgencyWindowJobsGrid)
- if (row == 0) then
- 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.")
- guiSetVisible (EmploymentAgencyInfoWindow,true)
- showCursor (true,true)
- elseif (row == 1) then
- 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.")
- guiSetVisible (EmploymentAgencyInfoWindow,true)
- showCursor (true,true)
- elseif (row == 2) then
- 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")
- guiSetVisible (EmploymentAgencyInfoWindow,true)
- showCursor (true,true)
- elseif (row == 3) then
- guiSetText (EmploymentAgencyInfoWindowInformationMemo,"Farming, a cool job:D plant seeds and let plants grow.\nCut them down and get money on the payday.")
- guiSetVisible (EmploymentAgencyInfoWindow,true)
- showCursor (true,true)
- else
- outputChatBox ("bug?")
- end
- elseif (source == EmploymentAgencyWindowApplicateButton) then
- local row,col = guiGridListGetSelectedItem (EmploymentAgencyWindowJobsGrid)
- if (guiGetText (EmploymentAgencyWindowApplicateMemo) ~= "") then
- local reason = guiGetText (EmploymentAgencyWindowApplicateMemo)
- if (row == 0) then
- triggerServerEvent ("jobApplicateToJob",getLocalPlayer(),"police",reason)
- elseif (row == 1) then
- triggerServerEvent ("jobApplicateToJob",getLocalPlayer(),"sweeper",reason)
- elseif (row == 2) then
- triggerServerEvent ("jobApplicateToJob",getLocalPlayer(),"drug",reason)
- elseif (row == 3) then
- triggerServerEvent ("jobApplicateToJob",getLocalPlayer(),"farm",reason)
- else
- outputChatBox ("bug?")
- end
- else
- outputChatBox ("Fill in why you want the job first!",255,0,0,false)
- end
- elseif (source == EmploymentAgencyWindowCloseButton) then
- guiSetVisible (EmploymentAgencyWindow,false)
- guiSetVisible (EmploymentAgencyInfoWindow,false)
- showCursor (false,false)
- elseif (source == EmploymentAgencyInfoWindowCloseButton) then
- guiSetVisible (EmploymentAgencyInfoWindow,false)
- elseif (source == EmploymentAgencyMyJobWindowCloseWindowButton) then
- guiSetVisible (EmploymentAgencyMyJobWindow,false)
- guiSetVisible (jobBossPanel,false)
- showCursor (false,false)
- elseif (source == EmploymentAgencyMyJobWindowLeaveJobButton) then
- triggerServerEvent ("jobLeaveJob",getLocalPlayer())
- guiSetVisible (EmploymentAgencyMyJobWindow,false)
- guiSetVisible (jobBossPanel,false)
- showCursor (false,false)
- elseif (source == jobBossPanelTabPanelAppTabAcceptButton) then
- local row,col = guiGridListGetSelectedItem (jobBossPanelTabPanelAppTabGrid)
- if (row) then
- local acceptName = guiGridListGetItemText (jobBossPanelTabPanelAppTabGrid,row,1)
- triggerServerEvent ("jobAcceptApplication",getLocalPlayer(),acceptName)
- guiSetVisible (EmploymentAgencyMyJobWindow,false)
- guiSetVisible (jobBossPanel,false)
- showCursor (false,false)
- else
- outputChatBox ("First select the person you wish to accept :>",getLocalPlayer(),255,0,0,false)
- end
- end
- end)
- --[[ VERWIJDERD
- -- bovenhoofd gedeelte
- wantedPlayerList = {}
- tagPlayerList = {}
- addEvent ("jobToggleOnDuty",true)
- addEventHandler ("jobToggleOnDuty",getRootElement(),
- function(thing)
- local tempTable = {source,thing}
- table.insert (tagPlayerList,tempTable)
- end)
- addEvent ("jobToggleOffDuty",true)
- addEventHandler ("jobToggleOffDuty",getRootElement(),
- function ()
- table.remove (tagPlayerList,searchPlayerIndexInTagTable (source))
- end)
- function searchPlayerIndexInTagTable (player)
- for i,v in pairs (table) do
- if (v[1] == source) then
- return i
- end
- end
- end
- function showLevelTags ()
- for i,v in pairs (tagPlayerList) do
- showTag (v[1],v[2])
- end
- end
- function showTag (player,tag)
- if (getLocalPlayer() ~= player) then
- if (player) and (isElementOnScreen (player)) then
- local x,y,z = getElementPosition (getLocalPlayer())
- local x1,y1,z1 = getElementPosition (player)
- if (getDistanceBetweenPoints3D (x,y,z,x1,y1,z1) < 50) and (isLineOfSightClear (x,y,z,x1,y1,z1)) then
- local sx,sy = getScreenFromWorldPosition (x1,y1,z1 +1,0,false)
- if (sx) and (sy) then
- dxDrawImage (sx -12,sy -12,24,24,tag)
- end
- end
- end
- end
- end
- addEventHandler ("onClientRender",getRootElement(),showLevelTags)
- ]]--
- addEvent ("clientUpdateCowWindow",true)
- addEventHandler ("clientUpdateCowWindow",getRootElement(),
- function(liter)
- guiSetText (theCowStatsWindowMilkValueLabel, tostring (liter) .. "/10L")
- playSound ("files/moo.mp3",false)
- end)
- addEvent ("clientViewCowWindow",true)
- addEventHandler("clientViewCowWindow",getRootElement(),
- function (viewhide)
- guiSetVisible (theCowStatsWindow,viewhide)
- end)
- --[[function showintro()
- fadeCamera( false, 0.5, 255, 55, 0 )
- setTimer(
- function ()
- fadeCamera( true, 1.2, 255, 125, 0 )
- moveObject( plane, 9000, 1477.4921875,1621.83203125, 12.011219978333)
- addEventHandler( 'onClientPreRender', gR, updateCam )
- setTimer( function() removeEventHandler( 'onClientPreRender', root, updateCam ) setCameraTarget( gMe, gMe ) end, 8900, 1 )
- end
- , 1000, 1 )
- end--]]
- local gR = getRootElement()
- local gRR = getResourceRootElement( getThisResource() )
- local gMe = getLocalPlayer()
- local plane = createObject(1681,1480.6881103516,1896.1604003906,46.635292053223,0,0,180)
- local thing = createObject( 3803,1503.2192382813,1730.5847167969,12.067991256714,0,0,316.32998657227)
- local thing2 = createObject( 3803, 1870.99,1434.35,80 )
- setElementDimension( plane, 1 )
- setElementDimension( thing, 1 )
- setElementAlpha( thing, 0 )
- setElementAlpha( thing2, 0 )
- function showintro()
- fader = guiCreateStaticImage(0,0,1.9992,1.999,"images/widescreen.png",true)
- showPlayerHudComponent( "radar", false )
- fadeCamera( false, 0.5, 0, 0, 0 )
- setElementDimension( gMe,1 )
- setTimer(
- function ()
- fadeCamera( true, 1.2, 0, 0, 0 )
- p1 = guiCreateStaticImage(0.3281,0.8486,0.4172,0.1494,"images/1.png",true)
- moveObject( plane, 9000, 1477.4921875,1621.83203125, 12.011219978333)
- setTimer(
- function ()
- fadeCamera( false, 1.0, 0, 0, 0 )
- end
- , 7500, 1 )
- addEventHandler( 'onClientPreRender', gR, updateCam1 )
- setTimer(
- function ()
- moveObject( thing, 8500, 2000,1547,40 )
- destroyElement( p1 )
- p2 = guiCreateStaticImage(0.3281,0.8486,0.4172,0.1494,"images/2.png",true)
- fadeCamera( true, 0.5, 0, 0, 0 )
- addEventHandler( 'onClientPreRender', gR, updateCam2 )
- setTimer(
- function ()
- moveObject( thing2, 8000, 2057,1744, 11 )
- destroyElement( p2 )
- p3 = guiCreateStaticImage(0.3281,0.8486,0.4172,0.1494,"images/3.png",true)
- --addEventHandler( 'onClientPreRender', gR, updateCam2 )
- setTimer(
- function ()
- moveObject( thing2, 9000, 2048.20,1477.60,11 )
- moveObject( thing, 6000, 2039.08,1430,15 )
- destroyElement( p3 )
- p4 = guiCreateStaticImage(0.3281,0.8486,0.4172,0.1494,"images/4a.png",true)
- 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 )
- addEventHandler( 'onClientPreRender', gR, updateCam3 )
- setTimer(
- function()
- removeEventHandler( 'onClientPreRender', gR, updateCam1 )
- removeEventHandler( 'onClientPreRender', gR, updateCam2 )
- removeEventHandler( 'onClientPreRender', gR, updateCam3 )
- setElementDimension( gMe,0 )
- setCameraTarget( gMe, gMe )
- showPlayerHudComponent( "radar", true )
- destroyElement( fader )
- destroyElement( p5 )
- fadeCamera( true, 1.5, 0, 0, 0 )
- setCameraTarget (gMe,gMe)
- end
- , 10500, 1 )
- end
- , 8500, 1 )
- end
- , 9000, 1 )
- end
- , 8000, 1 )
- end
- , 1000, 1 )
- end
- addCommandHandler("intro",
- function ()
- showintro()
- end
- )
- function updateCam1()
- local cx, cy, cz = getElementPosition( thing )
- local tx, ty, tz = getElementPosition( plane )
- setCameraMatrix ( cx, cy, cz, tx, ty, tz )
- end
- function updateCam2()
- local cx, cy, cz = getElementPosition( thing2 )
- local tx, ty, tz = getElementPosition( thing )
- setCameraMatrix ( cx, cy, cz, tx, ty, tz )
- end
- function updateCam3()
- local cx, cy, cz = getElementPosition( thing2 )
- local tx, ty, tz = getElementPosition( thing )
- setCameraMatrix ( cx, cy, cz, tx, ty, tz )
- end
- addEvent ("clientShowIntroCamStuff",true)
- addEventHandler ("clientShowIntroCamStuff",getRootElement(),
- function()
- showintro ()
- for i,v in pairs (getElementsByType ("gui-window")) do
- guiSetVisible (v,false)
- end
- end)
Add Comment
Please, Sign In to add comment