Anubhav
Members-
Posts
2,277 -
Joined
-
Last visited
Everything posted by Anubhav
-
Sensei release those scripts ONLY FOR CREATING NEW CSG. It is back now Big~Bang own it. He must have downloaded those scripts and misused them.
-
--------------------------||Open Source||-------------------------- ------------------------------------------------------------------- function createHauptGUI() local X = 0.3 local Y = 0.7 local Width = 0.4 local Height = 0.17 HauptGUI = guiCreateWindow(X, Y, Width, Height,"Garage Menu", true) X = 0.5 Y = 0.5 Width = 0.45 Height = 0.4 btnmyGarages = guiCreateButton(X, Y, Width, Height, "Own Garage", true, HauptGUI) X = 0.03 Y = 0.5 Width = 0.45 Height = 0.4 btnfreeGarages = guiCreateButton(X, Y, Width, Height, "Not Owned Garages", true, HauptGUI) X = 0.9 Y = 0.3 Width = 0.05 Height = 0.15 btnclose = guiCreateButton(X, Y, Width, Height, "X", true, HauptGUI) addEventHandler("onClientGUIClick", btnmyGarages, cmyGUI, false) addEventHandler("onClientGUIClick", btnfreeGarages, cfreeGUI, false) addEventHandler("onClientGUIClick", btnclose, clientHauptclose, false) end function cmyGUI() guiSetVisible(HauptGUI, false) triggerServerEvent ( "onmyGUI", localPlayer) end function cfreeGUI() guiSetVisible(HauptGUI, false) triggerServerEvent ( "onfreeGUI", localPlayer) end function clientHauptclose() guiSetVisible(HauptGUI, false) setCameraTarget ( localPlayer ) setElementFrozen ( localPlayer, false ) setPlayerHudComponentVisible ( "radar", true ) end function clientbuy(thePlayer) Index, b =guiGridListGetSelectedItem ( Garagenliste ) triggerServerEvent ( "buy",localPlayer, Index ) end function cHauptGUI(thePlayer) if not thePlayer then local thePlayer = localPlayer end createHauptGUI(thePlayer) setCameraMatrix(1631.8000488281, -1070.9000244141, 41, 1593, -1026, 30) setElementFrozen ( thePlayer, true ) setPlayerHudComponentVisible ( "radar", false ) end addEvent( "onMarkerHit", true ) addEventHandler( "onMarkerHit" , resourceRoot, cHauptGUI)
-
No support for leaked scripts of CSG. You mixed the script of manve and CSG. We're not giving support for those things.
-
Thanks for marking my mistake . Risk, this is my last script for you. You can see if it works or not.
-
Why don't you show us errors? You're making us make scripts for you. I am not going to make any other script for you.
-
turfSpawnTable = { [1] = { 1678.14, 2331.15, 10.82, 273.35775756836 }, [2] = { 1880.89, 2339.45, 10.97, 269.00161743164 }, [3] = { 2245.16, 2005.47, 10.82, 0.21148681640625 }, [4] = { 2237.48, 2125.49, 10.82, 356.15197753906 }, [5] = { 2029.36, 1933.53, 12.23, 266.12313842773 }, [6] = { 1417.09, 2091.61, 11.01, 82.934326171875 }, [7] = { 1635.65, 1038.43, 10.82, 264.73333740234 }, [8] = { 1980.15, 1798.95, 12.34, 176.65460205078 }, [9] = { 2010.08, 1177.31, 10.82, 215.78851318359 }, [10] = { 1955.01, 1343.09, 15.37, 267.49645996094 }, [11] = { 1452.9, 2368.78, 10.82, 263.83795166016 }, [12] = { 1164.08, 1336.63, 10.81, 88.367126464844 }, [13] = { 943.93, 1733.04, 8.85, 265.27719116211 }, [14] = { 966.79, 2072.79, 10.82, 278.10940551758 }, [15] = { 1047.33, 2161.22, 10.82, 267.41955566406 }, [16] = { 1069.38, 1887.18, 10.82, 267.08993530273 }, [17] = { 1086.41, 1610.5, 5.82, 12.428466796875 }, [18] = { 1629.91, 994.05, 10.82, 268.82580566406 }, [19] = { 1947.96, 1625.71, 22.76, 274.81344604492 }, [20] = { 2609.26, 2392.2, 17.82, 17.487762451172 }, [21] = { 2341.51, 2805.07, 10.82, 181.4172668457 }, [22] = { 2496.23, 2320.42, 10.82, 92.833129882812 }, [23] = { 2855.62, 2418.89, 10.82, 228.46691894531 }, [24] = { 2368.26, 2311.21, 8.14, 349.74685668945 }, [25] = { 2456.51, 2020.87, 11.06, 109.5491027832 }, [26] = { 2470.94, 2127.92, 10.82, 356.69580078125 }, [27] = { 2580.6, 2185.06, 10.82, 351.66400146484 }, [28] = { 2600.43, 2085.82, 10.81, 268.26000976562 }, [29] = { 2629.76, 1716.96, 11.02, 90.789642333984 }, [30] = { 2443.15, 1655.06, 10.82, 232.93293762207 }, [31] = { 2440.58, 1750.76, 10.82, 357.9153137207 }, [32] = { 2408.78, 1866.87, 6.01, 357.9153137207 }, [33] = { 2220.33, 1839.7, 10.82, 89.756927490234 }, [34] = { 2161.98, 1643.88, 11.11, 12.340576171875 }, [35] = { 2484.99, 1529.75, 10.84, 321.74227905273 }, [36] = { 2565.13, 1442.24, 11.03, 87.570617675781 }, [37] = { 2576.65, 1221.56, 10.82, 87.345397949219 }, [38] = { 2542.75, 1279.4, 10.82, 81.357757568359 }, [39] = { 2588.68, 1324.5, 10.82, 177.04461669922 }, [40] = { 2483.38, 1363.89, 10.81, 1.6122741699219 }, [41] = { 2479.25, 1291.08, 10.81, 265.03549194336 }, [42] = { 2507.62, 1210.74, 10.82, 179.81323242188 }, [43] = { 2467.91, 1405.13, 10.82, 277.16458129883 }, [44] = { 2283.97, 1388.91, 10.82, 356.69030761719 }, [45] = { 2136.67, 1493.05, 10.82, 0.00274658203125 }, [46] = { 2096.24, 1284.98, 10.82, 179.21997070312 }, [47] = { 2257.51, 1286.12, 19.16, 88.119934082031 }, [48] = { 2551.48, 1169.08, 18.71, 181.14259338379 }, [49] = { 2552.76, 1054.41, 10.82, 266.17807006836 }, [50] = { 2393.09, 1003.33, 10.82, 91.262084960938 }, [51] = { 2491.58, 1149.32, 22.02, 182.23025512695 }, [52] = { 2466.65, 1065.37, 10.82, 0.00274658203125 }, [53] = { 2476.44, 992.23, 10.82, 269.96292114258 }, [54] = { 2883.68, 894.57, 10.75, 89.537200927734 }, [55] = { 2575.47, 724.07, 10.82, 359.99176025391 }, [56] = { 2361.69, 694.46, 11.44, 4.79833984375 }, [57] = { 2221.24, 694.27, 11.45, 355.48181152344 }, [58] = { 2056.33, 730.03, 11.46, 358.47561645508 }, [59] = { 1533.66, 751.34, 11.02, 262.45364379883 }, [60] = { 1634.18, 759.18, 10.82, 181.89517211914 }, [61] = { 1917.02, 703.28, 11.13, 86.691680908203 }, [62] = { 2269.87, 965.09, 10.81, 353.1471862793 }, [63] = { 1904.34, 974.14, 10.82, 177.90155029297 }, [64] = { 2177.31, 1117.87, 12.64, 60.390014648438 }, [65] = { 1148.5, 758.79, 10.82,357}, [66] = { 1010.55,942.94,11,328}, [67] = { 2496.79, 2772.79, 10.82,79}, [68] = { 1493.52, 2773.69, 10.82, 275}, [69] = {2856.35, 2612.98, 10.82,264}, [70] = { 3217.61, 1857.92,194}, [71]= {3341.33, 1313.76, 7.88,179}, [72]= {3437.79, 1221.1, 7.91,92}, [73] = {3277.08, 946.24, 7.77,293}, [74] = { 3414.06, 947.97, 7.77,175}, [75] = {3306.74, 1100.21, 7.77 ,330}, [76] = { 3347.37, 545.36, 52.47,357}, [77] = {3110.62, 2115.57, 1.39,90}, } function someFunc(hitElement, match) if getElementType(hitElement) == "player" then outputChatBox("You entered a col-shape owned by "..getElementData(source,"gangMy")..". ", hitElement) end end for k,v in ipairs(turfSpawnTable) do col = createColRectangle (v[1], v[2], v[3], v[4]) setElementData(col, "gangMy", "None") addEventHandler("onColShapeHit", col, someFunc) end
-
turfSpawnTable = { [1] = { 1678.14, 2331.15, 10.82, 273.35775756836 }, [2] = { 1880.89, 2339.45, 10.97, 269.00161743164 }, [3] = { 2245.16, 2005.47, 10.82, 0.21148681640625 }, [4] = { 2237.48, 2125.49, 10.82, 356.15197753906 }, [5] = { 2029.36, 1933.53, 12.23, 266.12313842773 }, [6] = { 1417.09, 2091.61, 11.01, 82.934326171875 }, [7] = { 1635.65, 1038.43, 10.82, 264.73333740234 }, [8] = { 1980.15, 1798.95, 12.34, 176.65460205078 }, [9] = { 2010.08, 1177.31, 10.82, 215.78851318359 }, [10] = { 1955.01, 1343.09, 15.37, 267.49645996094 }, [11] = { 1452.9, 2368.78, 10.82, 263.83795166016 }, [12] = { 1164.08, 1336.63, 10.81, 88.367126464844 }, [13] = { 943.93, 1733.04, 8.85, 265.27719116211 }, [14] = { 966.79, 2072.79, 10.82, 278.10940551758 }, [15] = { 1047.33, 2161.22, 10.82, 267.41955566406 }, [16] = { 1069.38, 1887.18, 10.82, 267.08993530273 }, [17] = { 1086.41, 1610.5, 5.82, 12.428466796875 }, [18] = { 1629.91, 994.05, 10.82, 268.82580566406 }, [19] = { 1947.96, 1625.71, 22.76, 274.81344604492 }, [20] = { 2609.26, 2392.2, 17.82, 17.487762451172 }, [21] = { 2341.51, 2805.07, 10.82, 181.4172668457 }, [22] = { 2496.23, 2320.42, 10.82, 92.833129882812 }, [23] = { 2855.62, 2418.89, 10.82, 228.46691894531 }, [24] = { 2368.26, 2311.21, 8.14, 349.74685668945 }, [25] = { 2456.51, 2020.87, 11.06, 109.5491027832 }, [26] = { 2470.94, 2127.92, 10.82, 356.69580078125 }, [27] = { 2580.6, 2185.06, 10.82, 351.66400146484 }, [28] = { 2600.43, 2085.82, 10.81, 268.26000976562 }, [29] = { 2629.76, 1716.96, 11.02, 90.789642333984 }, [30] = { 2443.15, 1655.06, 10.82, 232.93293762207 }, [31] = { 2440.58, 1750.76, 10.82, 357.9153137207 }, [32] = { 2408.78, 1866.87, 6.01, 357.9153137207 }, [33] = { 2220.33, 1839.7, 10.82, 89.756927490234 }, [34] = { 2161.98, 1643.88, 11.11, 12.340576171875 }, [35] = { 2484.99, 1529.75, 10.84, 321.74227905273 }, [36] = { 2565.13, 1442.24, 11.03, 87.570617675781 }, [37] = { 2576.65, 1221.56, 10.82, 87.345397949219 }, [38] = { 2542.75, 1279.4, 10.82, 81.357757568359 }, [39] = { 2588.68, 1324.5, 10.82, 177.04461669922 }, [40] = { 2483.38, 1363.89, 10.81, 1.6122741699219 }, [41] = { 2479.25, 1291.08, 10.81, 265.03549194336 }, [42] = { 2507.62, 1210.74, 10.82, 179.81323242188 }, [43] = { 2467.91, 1405.13, 10.82, 277.16458129883 }, [44] = { 2283.97, 1388.91, 10.82, 356.69030761719 }, [45] = { 2136.67, 1493.05, 10.82, 0.00274658203125 }, [46] = { 2096.24, 1284.98, 10.82, 179.21997070312 }, [47] = { 2257.51, 1286.12, 19.16, 88.119934082031 }, [48] = { 2551.48, 1169.08, 18.71, 181.14259338379 }, [49] = { 2552.76, 1054.41, 10.82, 266.17807006836 }, [50] = { 2393.09, 1003.33, 10.82, 91.262084960938 }, [51] = { 2491.58, 1149.32, 22.02, 182.23025512695 }, [52] = { 2466.65, 1065.37, 10.82, 0.00274658203125 }, [53] = { 2476.44, 992.23, 10.82, 269.96292114258 }, [54] = { 2883.68, 894.57, 10.75, 89.537200927734 }, [55] = { 2575.47, 724.07, 10.82, 359.99176025391 }, [56] = { 2361.69, 694.46, 11.44, 4.79833984375 }, [57] = { 2221.24, 694.27, 11.45, 355.48181152344 }, [58] = { 2056.33, 730.03, 11.46, 358.47561645508 }, [59] = { 1533.66, 751.34, 11.02, 262.45364379883 }, [60] = { 1634.18, 759.18, 10.82, 181.89517211914 }, [61] = { 1917.02, 703.28, 11.13, 86.691680908203 }, [62] = { 2269.87, 965.09, 10.81, 353.1471862793 }, [63] = { 1904.34, 974.14, 10.82, 177.90155029297 }, [64] = { 2177.31, 1117.87, 12.64, 60.390014648438 }, [65] = { 1148.5, 758.79, 10.82,357}, [66] = { 1010.55,942.94,11,328}, [67] = { 2496.79, 2772.79, 10.82,79}, [68] = { 1493.52, 2773.69, 10.82, 275}, [69] = {2856.35, 2612.98, 10.82,264}, [70] = { 3217.61, 1857.92,194}, [71]= {3341.33, 1313.76, 7.88,179}, [72]= {3437.79, 1221.1, 7.91,92}, [73] = {3277.08, 946.24, 7.77,293}, [74] = { 3414.06, 947.97, 7.77,175}, [75] = {3306.74, 1100.21, 7.77 ,330}, [76] = { 3347.37, 545.36, 52.47,357}, [77] = {3110.62, 2115.57, 1.39,90}, } for k,v in ipairs(turfSpawnTable) do createColRectangle (v[1], v[2], v[3], v[4]) end
-
Show us the script lol.
-
Use the event onPlayerWeaponSwitch @ Max: It will only get the current weapon! Not previous .
-
enterMarker = createMarker ( 811.2, -1616.1, 13.5, "corona", 1.5, 0, 255, 0 ) bl = createBlipAttachedTo(enterMarker,10) function createItems() exitMarker = createMarker ( 363.3, -74.7, 1001.5, "corona", 1.5, 0, 255, 0 ) setElementInterior ( exitMarker, 10 ) setElementDimension ( exitMarker, 1 ) vendor = createPed ( 167, 375.9, -65.5, 1001.5, 180 ) setElementInterior ( vendor, 10 ) setElementDimension ( vendor, 1 ) addEventHandler("onMarkerHit", exitMarker, robberExit) end addEventHandler("onResourceStart", resourceRoot, createItems) function createRobMarker() outputChatBox("Burger shot robbery is now available!", getRootElement(), 255, 255, 0) robMarker = createMarker ( 376.1, -65, 1000.5, "cylinder", 1.5, 255, 255, 0 ) setElementInterior ( robMarker, 10 ) setElementDimension ( robMarker, 1 ) addEventHandler("onMarkerHit", robMarker, robberyHit) end addEventHandler("onResourceStart", resourceRoot, createRobMarker) function warpPedIntoBurger( robber ) outputChatBox("[burger shot] Käy peremmälle!", robber, 255, 0, 255) setElementPosition ( robber, 364.7, -73.5, 1001.5 ) setElementDimension ( robber, 1 ) setElementInterior ( robber, 10 ) playSoundFrontEnd ( robber, 1 ) end addEventHandler("onMarkerHit", enterMarker, warpPedIntoBurger) function robberExit(exitrobber) outputChatBox("[burger shot] Tervetuloa uudelleen!", exitrobber, 255, 0, 255) setElementDimension ( exitrobber, 0 ) setElementInterior ( exitrobber, 0 ) setElementPosition ( exitrobber, 814.9, -1616.7, 13.5 ) playSoundFrontEnd ( exitrobber, 1 ) end function robberyHit( hitPlayer ) outputChatBox(" #FF0000ALARM! #00FF00the player #FF0000"..getPlayerName(hitPlayer).." #00FF00is robbing the burger shot!",getRootElement(),255, 255, 255, true ) setPlayerTeam(hitPlayer, "Criminal") setPlayerWantedLevel(hitPlayer, 3) destroyElement( robMarker ) destroyElement( exitMarker ) killPed (vendor, hitPlayer) setTimer ( destryPedAfterKill, 5000, 1 ) giveWeapon ( hitPlayer, 31, 200 ) setPedWeaponSlot ( hitPlayer, 5) outputChatBox("--------------------------------------------------------------------------------------------------------------------- ", hitPlayer,255,255,0) outputChatBox("Wait in one minute. Do not leave the building!", hitPlayer,0,255,0) outputChatBox("--------------------------------------------------------------------------------------------------------------------- ", hitPlayer,255,255,0) seconds30 = setTimer ( seconds30, 30000, 1, hitPlayer ) addEventHandler ( "onPlayerWasted", hitPlayer, onPedDeath, false ) end function destryPedAfterKill() destroyElement( vendor ) end function onPedDeath() if isTimer( seconds30 ) then killTimer ( seconds30 ) end if isTimer( robTimer ) then killTimer ( robTimer ) end outputChatBox("Robbery failed!", source, 255, 0, 255 ) setTimer ( createItems, 1000, 1 ) setTimer ( createRobMarker, 300000, 1 ) end function seconds30(player) outputChatBox("30 seconds remaining...", player, 255, 255, 0) robTimer = setTimer ( robTimer, 30000, 1, player ) end function robTimer( thePlayer ) givePlayerMoney ( thePlayer, 10000 ) setTimer ( createItems, 1000, 1 ) setTimer ( createRobMarker, 300000, 1 ) outputChatBox("Now you can go out", player, 255, 255, 0) end
-
If I do it like this: SERVER: [lua] addEventHandler("onPlayerJoin", root, function() triggerClientEvent(source, "createGUI", root, source) end )
-
So if I do like this: lp = localPlayer or getLocalPlayer() addEventHandler("onClientPlayerJoin", root, function() startRendering(lp) end ) correct?
-
If I use guiSetVisible instead of addEventHandler( I removed dx functions. ), will it only be for that plr?
-
Can you give me a example for only the player who loginned? :-/
-
Another doubt: function startRendering() guiSetVisible(windowOne, true) end addEvent("createGUI", true) addEventHandler("createGUI", root, startRendering) So will it set the window visible for everyone?
-
I'll test it soon with multiple people. I will reply tommorow maybe.
-
Hello everyone!, I want to ask that, how to trigger a event only for a player? It should render something only FOR HIM. My server side code: addEventHandler("onPlayerLogin", root, function() triggerClientEvent(source,"createGUI", root) -- will it only trigger for him? D: end ) I'm not showing my full client sided code due to script leakings! My client side code: function startRendering(forWhom) local whoToRender = forWhom or lp addEventHandler("onClientRender", whoToRender, render) end addEvent("createGUI", true) addEventHandler("createGUI", root, startRendering)
-
Add ) after outputChatBox ends.
-
Here: capturing = setTimer( function( ) setElementData(pCuboid1, "friendly", "yes") setElementData(pCuboid1, "ownedBy", getTeamName(pTeam)) givePlayerMoney( p, 4000 ) callClientFunction(p, "NeedMsg", 4) setRadarAreaColor( pArea1, iR, iG, iB ) setRadarAreaFlashing( pArea1, false ) end, 600000, 1 -- 2nd arguement here. means: 600000. Replace it1 ) end
-
u must put getElementType in First and u must Check if player have team then Check his team He says that the GUI get's opened if he isn't in that team, you can clearly see that this shouldn't be a problem because if he isn't in a team the script doesn't even continue. Btw: You missed an end. I din't missed any end, lol. I've the team, it outputs that I don't have the team and opens the GUI. What is the problem?
-
https://forum.multitheftauto.com/viewtopic.php?f=108&t=78775
-
Thanks alot! Something new came.. function markerHit2 (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then return end if getElementType(hitPlayer) == "player" then if getTeamName(getPlayerTeam(hitPlayer)) == "Parademics" then triggerClientEvent (hitPlayer, "openWnd2", hitPlayer) else outputChatBox("You're not in the team for this specific marker!", hitPlayer) end end end Now it opens window if he doesn't have team why?
-
Same variable names? Hmm yes! I'll try to fix it by changing variable names ;d
-
Guyz, I just need help. I don't need advices atm. There's a diffrent problem. Why does the resource1 GUI comes with resource2 ??? Any helps!