-
Posts
1,518 -
Joined
-
Last visited
-
Days Won
8
Everything posted by Simple0x47
-
Freedom :'v
-
I still like using more interpolateBetween
-
Good Work! You've got my like for the time you spent on the animations
-
Its the bind key try to make bigger the distance between the 3d points. ( try to change 5 to 10 ).
-
[OFFERING] High Quality Scripting Service [PAID]
Simple0x47 replied to Simple0x47's topic in Looking for staff
Then go in the scripting section and help the people that needs help. Remember me whats your skype name so I can give a real view about what happened and about 'spaghetti code' you should check again my code if you have any ( which is not the case ).- 18 replies
-
- paid
- optimization
-
(and 1 more)
Tagged with:
-
The only thing I can think off would be checking if you could modify by using OOP the dimension like this. local water = createWater( ... ) water.dimension = 1 I'm not sure if it would work, but at least give it a try.
-
local shops = { { name ="Example Shop", x = 369.48327636719, y = -6.5628895759583, z = 1001, dim = 1, int = 9, blip = 47, type = "cylinder", size = 1, r = 203, g = 150, b = 25, a = 100 }, } function on_shop_start1() for i = 1, #shops do local theShop = shops[ i ] theShop[ "marker" ] = createMarker( theShop.x, theShop.y, theShop.z, theShop.type, theShop.size, theShop.r, theShop.g, theShop.b, theShop.a ) theShop[ "blip" ] = createBlipAttachedTo( theShop[ "markeR" ], theShop.blip ) setElementCollisionsEnabled( theShop[ "marker" ], false ) setElementInterior( theShop[ "marker" ], theShop.int ) setElementDimension( theShop[ "marker" ], theShop.dim ) end end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),on_shop_start1) function shopROB_1(source) local playercount = getPlayerCount() for i = 1, #shops do local theShop = shops[ i ] if ( theShop[ "marker" ] ) then if ( ( isElement( theShop[ "marker" ] ) ) and ( isElementWithinMarker( source, theShop[ "marker" ] ) ) and ( ( getElementType( source ) ) == "player" ) ) then if ( ( tonumber( playercount ) ) > 0 ) then setElementFrozen( source, true ) setPedAnimation( source, "rob_bank", "cat_safe_rob", 2 * 30000, true, true, true, false ) outputChatBox( getPlayerName( source ) .. " started robbing the " .. theShop[ "name" ], source, 0, 255, 0 ) setTimer( function( source, theShopID ) local theShop = shops[ theShopID ] setElementFrozen( source, false ) local random_var = math.random( 1500, 400000 ) exports.rc_core:giveMoney( source, random_var ) destroyElement( theShop[ "marker" ] ) destroyElement( theShop[ "blip" ] ) end, 60000, 1, source, i ) setTimer( function( theShopID ) local theShop = shops[ theShopID ] theShop[ "marker" ] = createMarker( theShop.x, theShop.y, theShop.z, theShop.type, theShop.size, theShop.r, theShop.g, theShop.b, theShop.a ) theShop[ "blip" ] = createBlipAttachedTo( theShop[ "marker" ], theShop.blip ) end, 1800000, 1, i ) else outputChatBox( "Not enough players!", source, 255, 0, 0, true ) end break end end end end addCommandHandler("shoprob",shopROB_1)
-
This is what you're looking for. RemoveWorldModel
-
Have you tried changing it's dimension by using setElementDimension?
-
The error occurs because I forgot to put an if theres a marker element.
-
Nice work! 5/5
- 11 replies
-
- mansion
- appartment
-
(and 1 more)
Tagged with:
-
It should work. local shops = { { name ="Example Shop", x = 369.48327636719, y = -6.5628895759583, z = 1001, dim = 1, int = 9, blip = 47, type = "cylinder", size = 1, r = 203, g = 150, b = 25, a = 100 }, } function on_shop_start1() for i = 1, #shops do local theShop = shops[ i ] theShop[ "marker" ] = createMarker( theShop.x, theShop.y, theShop.z, theShop.type, theShop.size, theShop.r, theShop.g, theShop.b, theShop.a ) theShop[ "blip" ] = createBlipAttachedTo( theShop[ "markeR" ], theShop.blip ) setElementCollisionsEnabled( theShop[ "marker" ], false ) setElementInterior( theShop[ "marker" ], theShop.int ) setElementDimension( theShop[ "marker" ], theShop.dim ) end end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),on_shop_start1) function shopROB_1(source) local playercount = getPlayerCount() for i = 1, #shops do local theShop = shops[ i ] if ( theShop[ "marker" ] ) then if ( ( isElementWithinMarker( source, theShop[ "marker" ] ) ) and ( ( getElementType( source ) ) == "player" ) ) then if ( ( tonumber( playercount ) ) > 0 ) then setElementFrozen( source, true ) setPedAnimation( source, "rob_bank", "cat_safe_rob", 2 * 30000, true, true, true, false ) outputChatBox( getPlayerName( source ) .. " started robbing the " .. theShop[ "name" ], source, 0, 255, 0 ) setTimer( function( source, theShopID ) local theShop = shops[ theShopID ] setElementFrozen( source, false ) local random_var = math.random( 1500, 400000 ) exports.rc_core:giveMoney( source, random_var ) destroyElement( theShop[ "marker" ] ) destroyElement( theShop[ "blip" ] ) end, 60000, 1, source, i ) setTimer( function( theShopID ) local theShop = shops[ theShopID ] theShop[ "marker" ] = createMarker( theShop.x, theShop.y, theShop.z, theShop.type, theShop.size, theShop.r, theShop.g, theShop.b, theShop.a ) theShop[ "blip" ] = createBlipAttachedTo( theShop[ "marker" ], theShop.blip ) end, 1800000, 1, i ) else outputChatBox( "Not enough players!", source, 255, 0, 0, true ) end break end end end end addCommandHandler("shoprob",shopROB_1)
-
Is it possible to duplicate weapons in Mta Freeroam?
Simple0x47 replied to Beckhamjr's topic in Scripting
With original weapon I've meant that the model is the original without any txd/dff replacement. -
It would be pretty hardcore but it would work with this too. removeWorldModel()
-
Is it possible to duplicate weapons in Mta Freeroam?
Simple0x47 replied to Beckhamjr's topic in Scripting
Original Gun -> https://wiki.multitheftauto.com/wiki/CreateWeapon -
I've made a shop robbery for someone and he released it on the forum and community, let me check. Sorry can't found it. So please explain me better to understand what you're trying to accomplish so I can help you with it.
-
Then do it like this, put the database into the sql folder and for accessing the database use the exported function like this way. exports.sql:query( theDatabaseID, theQueryString ) -- theDatabaseID is the key that holds the database value in main.lua, yours is 1, and the querystring is a query for example "INSERT INTO ..." http://www75.zippyshare.com/v/Ko6JMf2O/file.html
-
No problem, if you want any more help contact me via, skype ( killer.68x ), email ( [email protected] ) or just by PM's
-
So you don't want to destroy it then no problem. addEvent( "Help_Login", true ) local guiElements = {} local screenW, screenH = guiGetScreenSize() function switchGUI() if ( guiElements[ 1 ] ) then if ( guiGetVisible( guiElements[ 1 ] ) then showCursor( false ) guiSetVisible( guiElements[ 1 ], false ) else guiSetInputEnabled(false) showCursor(true) guiSetVisible( guiElements[ 1 ], true ) end else guiSetInputEnabled(false) showCursor(true) guiElements[ 1 ] = guiCreateWindow((screenW - 591) / 2, (screenH - 534) / 2, 591, 534, "Information", false) guiWindowSetSizable(guiElements[ 1 ], false) guiSetAlpha(guiElements[ 1 ], 0.92) guiSetProperty(guiElements[ 1 ], "CaptionColour", "FFD7E21C") guiElements[ 2 ] = guiCreateLabel(230, 499, 196, 35, "F1 to close window", false, guiElements[ 1 ]) guiSetProperty(guiElements[ 2 ], "NormalTextColour", "FFFE0000") guiElements[ 3 ] = guiCreateTabPanel(9, 28, 572, 461, false, guiElements[ 1 ]) guiElements[ 4 ] = guiCreateTab("Tab1", guiElements[ 3 ]) guiElements[ 5 ] = guiCreateMemo(6, 32, 561, 399, "Line 1. \n\nLine 2.", false, guiElements[ 4 ] ) guiElements[ 6 ] = guiCreateLabel(13, 10, 544, 26, "Label", false, guiElements[ 4 ] ) guiLabelSetColor( guiElements[ 6 ], 255, 100, 25) guiElements[ 7 ] = guiCreateTab("Tab2", guiElements[ 3 ]) guiElements[ 8 ] = guiCreateMemo(5, 32, 561, 399, "Line 1 \n/Line 2", false, guiElements[ 7 ]) guiElements[ 9 ] = guiCreateLabel(15, 10, 544, 26, "Label", false, guiElements[ 7 ]) guiLabelSetColor( guiElements[ 9 ], 255, 100, 25) guiElements[ 10 ] = guiCreateTab("Tab3", guiElements[ 3 ]) guiElements[ 11 ] = guiCreateMemo(5, 32, 561, 399, "Line 1.\nLine2.", false, guiElements[ 10 ] ) end end bindKey( "f1", "down", switchGUI ) addEventHandler( "Help_Login", getRootElement(), switchGUI )
-
Move the database file to the ZP folder and change this to. local connect = dbConnect("sqlite",":ZP/Mlife.db")
-
[OFFERING] High Quality Scripting Service [PAID]
Simple0x47 replied to Simple0x47's topic in Looking for staff
When I get done my work I give with author rights so they are the full owners of the script. So I don't save a backup of the code on my PC or something.- 18 replies
-
- paid
- optimization
-
(and 1 more)
Tagged with:
-
[OFFERING] High Quality Scripting Service [PAID]
Simple0x47 replied to Simple0x47's topic in Looking for staff
I don't waste my time writing code just for showing them they're wrong. When a customer arrives to me I'll prove they're wrong and I'll have benefits too. Thanks for your support!- 18 replies
-
- paid
- optimization
-
(and 1 more)
Tagged with:
-
SetPlayerHudComponentVisible( root, "radio", false ) Just use this when a player it's being initialized and done.
-
Post the code you've made so we can help you out with it.
-
So you're basically telling the bindKey is not made anymore so. addEvent( "Help_Login", true ) local guiElements = {} local screenW, screenH = guiGetScreenSize() function switchGUI() if ( guiElements[ 1 ] ) then showCursor( false ) for i = 1, #guiElements do local theElement = guiElements[ i ] destroyElement( theElement ) end else guiSetInputEnabled(false) showCursor(true) guiElements[ 1 ] = guiCreateWindow((screenW - 591) / 2, (screenH - 534) / 2, 591, 534, "Information", false) guiWindowSetSizable(guiElements[ 1 ], false) guiSetAlpha(guiElements[ 1 ], 0.92) guiSetProperty(guiElements[ 1 ], "CaptionColour", "FFD7E21C") guiElements[ 2 ] = guiCreateLabel(230, 499, 196, 35, "F1 to close window", false, guiElements[ 1 ]) guiSetProperty(guiElements[ 2 ], "NormalTextColour", "FFFE0000") guiElements[ 3 ] = guiCreateTabPanel(9, 28, 572, 461, false, guiElements[ 1 ]) guiElements[ 4 ] = guiCreateTab("Tab1", guiElements[ 3 ]) guiElements[ 5 ] = guiCreateMemo(6, 32, 561, 399, "Line 1. \n\nLine 2.", false, guiElements[ 4 ] ) guiElements[ 6 ] = guiCreateLabel(13, 10, 544, 26, "Label", false, guiElements[ 4 ] ) guiLabelSetColor( guiElements[ 6 ], 255, 100, 25) guiElements[ 7 ] = guiCreateTab("Tab2", guiElements[ 3 ]) guiElements[ 8 ] = guiCreateMemo(5, 32, 561, 399, "Line 1 \n/Line 2", false, guiElements[ 7 ]) guiElements[ 9 ] = guiCreateLabel(15, 10, 544, 26, "Label", false, guiElements[ 7 ]) guiLabelSetColor( guiElements[ 9 ], 255, 100, 25) guiElements[ 10 ] = guiCreateTab("Tab3", guiElements[ 3 ]) guiElements[ 11 ] = guiCreateMemo(5, 32, 561, 399, "Line 1.\nLine2.", false, guiElements[ 10 ] ) end end bindKey( "f1", "down", switchGUI ) addEventHandler( "Help_Login", getRootElement(), switchGUI )
