-
Posts
1,283 -
Joined
-
Last visited
Everything posted by manve1
-
tried using: return false ?
-
sorry, i had something which should't of been thhere, worked, thank you.
-
I do the command once, it changes to radar ( this is working ), i do it second time it changes back to pic ( this is working ), i do the command to change back to radar and it creates another pic on top of the already existing one.
-
Well, i am trying to create a logo on a command so it gets destroyed or created. local logo = guiCreateStaticImage( 0, 0.8, 0.6, 0.2, 'no.png', true ) addCommandHandler('hah', function() if ( isElement(logo) == false ) then showPlayerHudComponent ( 'radar', true ) destroyElement( logo ) elseif ( isElement(logo) == true ) then showPlayerHudComponent ( 'radar', false ) local logo = guiCreateStaticImage( 0, 0.8, 0.6, 0.2, 'no.png', true ) end end )
-
scripts ... nearly each script must be edited for it to work.
-
Well, for the race gamemodes you must edit the 'race' folder for it to work and for the other you make it the same, you must edit every single gamemode for it to work.
-
You get player account with getPlayerAccount ( i think, not sure ) and then u use getAccountData
-
theCurrentAccount is not defined
-
Right, i created a script for a pick up (( my made pick up )) and when i hit the col shape it does work for 1 person, but not the person who hit the col shape Server side: local box1 = createObject( 2289, 2694, -1425, 15.2 ) local col1 = createColCuboid( 2693, -1426, 15.2, 2, 2, 3 ) addEventHandler('onColShapeHit', col1, function( ) setTimer( function( ) triggerClientEvent('anims', hitElement) setTimer( function( ) triggerClientEvent('anims2', hitElement) destroyElement( box1 ) destroyElement( col1 ) end, 1500, 1 ) end, 50, 1 ) Client side: addEvent('anims', true) addEventHandler('anims', getRootElement(), function() setPedAnimation( localPlayer, 'CARRY', 'liftup' ) triggerServerEvent('weapons"n"money', localPlayer) end ) addEvent('anims2', true) addEventHandler('anims2', getRootElement(), function() setPedAnimation( localPlayer, false ) end )
-
but what do you want changed on it?
-
you can't, It's original made by MTA. (( I Think ))
-
Client: GUIEditor = { button = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(152, 118, 501, 412, "-|SiG|- User Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) modlord = guiCreateButton(36, 99, 80, 54, "Infernus-mod", false, GUIEditor.window[1]) guiSetFont(modlord, "default-bold-small") wheelsabe = guiCreateButton(36, 259, 80, 54, "Wheels", false, GUIEditor.window[1]) guiSetFont(wheelsabe, "default-bold-small") GUIEditor.button[10] = guiCreateButton(370, 259, 80, 54, "Black 'N' White", false, GUIEditor.window[1]) shaderwater = guiCreateButton(207, 259, 80, 54, "Water Shader", false, GUIEditor.window[1]) guiSetFont(shaderwater, "default-bold-small") Carcolor1 = guiCreateButton(207, 100, 80, 54, "Green Car Color", false, GUIEditor.window[1]) guiSetFont(Carcolor1, "default-bold-small") GUIEditor.button[14] = guiCreateButton(370, 101, 80, 54, "Party mode", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[14], "default-bold-small") end ) bindKey ( "U", "down", function ( ) state = ( not state ) removeEventHandler ( "onClientRender", root, draw ) guiSetVisible ( GUIEditor.window[1], state ) showCursor (false) if ( state ) then addEventHandler ( "onClientRender", root) end end ) addEventHandler ("onClientGUIClick", modlord, function(button, state, absoluteX, absoluteY) if (source == modlord) then triggerServerEvent ("domo", getLocalPlayer()) end end, false ) addEvent('newVeh', true) addEventHandler('newVeh', getRootElement(), function() engineLoadTXD ( "infernus.txd", 411 ) engineImportTXD ( txd, 411 ) dff = engineLoadDFF ( "infernus.dff", 411 ) engineReplaceModel ( dff, 411 ) end ) Server: addEvent("domo", true) addEventHandler("domo", rootElement, function() if isPedInVehicle(source) then if ( getPlayerMoney (source) >= 7000 ) then takePlayerMoney(source, 7000) triggerClientEvent('newVeh', source) outputChatBox("Infernus Successfully changed", source, 255, 255, 0, true) else outputChatBox("Not enough money 7000.", source, 255, 0, 0, true) end else outputChatBox("You are not in a vehicle", source, 255, 0, 0, true) end end ) NOT tested.
-
1. You need m4 2. U are creating air bomb o_O 3. The command handler is wrong 4. add this line at the bottom: addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc) 5. Change: addCommandHandler("grenade", getLocalPlayer(), onClientPlayerWeaponFireFunc) to: addCommandHandler("grenade", onClientPlayerWeaponFireFunc)
-
but, if i do something like this: local gifts = { objects = { { 2289, 2494.0295410156, -1674.1334228516, 12.335947036743 }; }, colshapes = { { 2493.25, -1675.25, 12.335947036743, 1.25, 2, 1 }; } }; for key, value in ipairs( gifts.objects ) do present = createObject( unpack( value ) ); end for key, value in ipairs( gifts.colshapes ) do colshape = createColCuboid( unpack( value ) ); end I made it, but how i attach the object to col shape?
-
sorry for asking, but what do you mean?
-
you must make a function that would handle the dimensions in the script and would load it from the xml file
-
Well, I want to make like from a table objects and i need them to have separate col shape, so when player hits it some stuff happens, but the problem is that when i try to attach them to each other i can't, and I'm using table because i will need to create loads of objects and i think that will speed up things ... and take a lot less space. local present = {} local gifts = { { 2289, 2494.0295410156, -1674.1334228516, 12.335947036743 } } for key, value in ipairs( gifts ) do present[key] = createObject( unpack( value ) ); end local collision = createColCuboid( 2493.25, -1675.25, 12.335947036743, 1.25, 2, 1 ) local string = string.format( "Object's X: %d, Y: %d, Z: %d", getElementPosition( present[1] ) ); attachElements( collision, present ) ^ that's how the script is looking
-
yes, it is a table, so how could i make a loop? or get it by index?
-
alright, it worked, it might have been my mistake, but how can i attach a collision shape to an specific object? local collision = createColCuboid( 2493.25, -1675.25, 12.335947036743, 1.25, 2, 1 ) local string = string.format( "Object's X: %d, Y: %d, Z: %d", getElementPosition( present[1] ) ); attachElements( collision, present )
-
galejo buti geriau
-
i got the table bit, but i haven't got how the getElementPosition should look, because when i try to get the objects position it just debugs bad argument
-
How can i get object's position?
