-
Posts
965 -
Joined
-
Last visited
Everything posted by DakiLLa
-
ahh, yee, agree with you to unbind it when you teleporting
-
actually, limit for elements is 65535 as far as i know...
-
thats my way of a code like your, should work i think you need to bind your key when you hit marker so i did a function for that and also function to unbind key, when you leave marker. local enterLSPD = createMarker ( 1554.7901611328, -1675.5651855469, 15.116052627563, "cylinder", 1.1, 0, 255, 0, 175 ) function markerHit( player ) if getElementType( player ) == "player" and source == enterLSPD then bindKey( player, "f", "down", teleport ) outputChatBox( "Press 'f' button to teleport somewhere..", player, 0, 255, 0 ) end end addEventHandler( "onMarkerHit", getRootElement(), markerHit ) function markerLeave( player ) if getElementType( player ) == "player" and source == enterLSPD then unbindKey( player, "f", "down", teleport ) end end addEventHandler( "onMarkerLeave", getRootElement(), markerLeave ) function teleport( player, key, keyState ) setElementInterior( player, 6, 246.78932189941 , 62.632732391357, 1002.6146240234 ) setElementPosition( player, 247.78932189941, 65.632732391357, 1004.6146240234 ) setPedRotation( player, 90 ) end
-
well, nothing hard: you just need to get player skin and then apply it when he spawns addEventHandler( "onPlayerWasted", getRootElement( ), function( ) local skin = getElementModel( source ) setTimer( spawnPlayer, 2000, 1, source, 2497.2021, -1666.7891, 13.3850, 0, skin ) end )
-
ah, i just copied this from wiki..well, anyway, i fixed the example on the wiki
-
ehm, i thought he was needed the next thing: addEventHandler( "onPlayerWasted", getRootElement( ), function( ) setTimer( spawnPlayer, 2000, 1, source, 2497.2021, -1666.7891, 13.3850 ) end ) right?
-
-
first Thank you and keep up the good work, guys..
-
did you write the '/engine' command in chat?
-
i think you must download the latest resource pack with included race resource which has its own edf-definition. Then add 'race' in definitions menu and now you are able to create spawnpoints, pickups and checkpoints
-
function turnOffEngine() for i, vehicle in ipairs( getElementsByType( 'vehicle' ) ) do setVehicleEngineState ( vehicle, false ) end end addEventHandler ( "onResourceStart", getResourceRootElement( getThisResource() ), turnOffEngine ) function toggleEngine ( player ) local theVehicle = getPlayerOcuppiedVehicle ( player ) if theVehicle and getVehicleController ( theVehicle ) == player then local state = getVehicleEngineState ( theVehicle ) setVehicleEngineState ( theVehicle, not state ) end end addCommandHandler ( "engine", toggleEngine ) ^ should work
-
hehe, i got 99753.
-
yea! 10/10, awesome!
-
dorf..another one again...
-
oh, ok, thx.. i think ill just wait till 1.0.2
-
hey guys, I started to get one error today. It happens only on my local server when im trying to click somewhere on admin panel window, and then.. Attached image I dont have any 'TeamCity' folders on my C-disc. I tryed with both admin panels (admin and admin2), and still get this error.. Anybody knows wtf is this? btw, on other servers admin panel works without errors.
-
well, i think you can use this one from the mta community
-
i think it should be like this: function invisibility ( vehicle ) local driver = getVehicleOccupant ( vehicle ) setElementAlpha ( vehicle, 0 ) setElementAlpha ( driver, 0 ) end addEvent ( "invisibility", true ) addEventHandler ( "invisibility", getRootElement(), invisibility ) you are sending 'vehicle' from client side to the server, so..i've added 'vehicle' argument in server side function.
-
ehm..you could just do /ghostmode and it will be turned off / on, or set collisions enabling/disabling in map settings.
-
hehe, i thought that you will get this mistake, but you didnt.. well anyway, you must read wiki carefully. Look at the dxDrawText Syntax. You missed some arguments in your example, such as 'right' and 'bottom' arguments. dxDrawText( "TEST2", screenWidth/2, screenHeight/2, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 2, "pricedown") this should work.
-
well, if you want to swim, then you need to change something again in race code.. there is a check: if player in water, then he will be killed immediately.
-
function createText () dxDrawText( "TEST2", screenWidth/2, screenHeight/2, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 2, "pricedown") end addEventHandler( 'onClientRender', getRootElement(), createText ) dx functions must be attached to 'render' event, cse dx images, text etc. rendering in one frame.
-
first: g_Root = getRootElement() addEvent( "onPlayer_instruktion", true ) function instruktionToPlayer ( j_PlayerName ) outputChatBox( "TEST client side" .. j_PlayerName ) outputChatBox( "TEST client side" ) end addEventHandler( "onPlayer_instruktion", g_Root, instruktionToPlayer ) try to put addEventHandler after function you want to call. second: g_Root = getRootElement() function forbidenPlayer () local joinedPlayerName = getPlayerName ( source ) triggerClientEvent ( source, "onPlayer_instruktion", g_Root, joinedPlayerName ) outputChatBox( "TEST " .. joinedPlayerName .. " server side", source, 0, 255, 0) end addEventHandler ( "onPlayerJoin", g_Root, forbidenPlayer ) You have put 'source' in the 'getPlayerName' function but in the next lines you used 'sourcePlayer'..idk why... so i changed 'sourcePlayer' on 'source', cse i think 'sourcePlayer' in this case is nil.
-
setElementData (source, 'next.checkpoint', ncp) i think it should be 'source' there.
-
yay! Works great! Thx a lot for help !!
