-
Posts
877 -
Joined
-
Last visited
Everything posted by denny199
-
Here ya go, with explanations bargate = createObject (968,-2063.5,1371.0999755859,7.0999999046326,0,270,0) -- creating the object damarker = createMarker (-2066.81201, 1370.72888, 6.90067, "cylinder", 9.5, 255, 0, 0, 100 ) -- the last thing 255,0,0,0 = the color & the alpha so: Red,Green,Blue,alpha, so the alpha is 0 so you can't see the marker moving = false function gatefunc(hitPlayer) if getElementType ( hitPlayer ) == "player" and isPedInVehicle(hitPlayer) and (moving == false ) then -- you want to chek if the hitElement is a player and if it's in a vehicle, because you only want to do this for busses. --and because you are working with rotations, you need to chek if it's moving. or else it will rotate sometimes twice when two people are hitting it. veh = getPedOccupiedVehicle ( hitPlayer ) -- get the players vehicle if getElementModel ( veh ) == 431 then -- if the players vehicle is 431 so the bus then it will execute these lines underneath moving = true moveObject(bargate, 1500, -2063.5,1371.0999755859,7.0999999046326, 0,90,0 ) end end end addEventHandler ("onMarkerHit",damarker, gatefunc ) -- adding event when the player will hit the marker function gatefuncclose(leavePlayer) if getElementType ( leavePlayer ) == "player" and isPedInVehicle(leavePlayer) and ( moving == true ) then -- you want to chek if the hitElement is a player and if it's in a vehicle, because you only want to do this for busses. --chekking if it's moving or else when it's already done it will rotateback veh = getPedOccupiedVehicle ( leavePlayer ) -- get the players vehicle if getElementModel ( veh ) == 431 then -- if the players vehicle is 431 so the bus then it will execute these lines underneath moving = false moveObject(bargate, 1500, -2063.5,1371.0999755859,7.0999999046326, 0,-90,0 ) end end end addEventHandler ("onMarkerLeave",damarker, gatefuncclose ) -- adding event when the player will leave the marker
-
You had the rotation set to 358 while moving. local gate = createObject(7709, -2122.5, 381.89999389648, 35.700000762939, 0, 0, 358) function open() moveObject(gate, 2500, -2122.5, 381.89999389648, 30, 0, 0, 0 ) end addCommandHandler("open", open) function close() moveObject(gate, 2500, -2122.5, 381.89999389648, 35.700000762939, 0, 0, 0 ) end addCommandHandler("close", close) BTW, you can move the gate with one command with this code: local gate = createObject(7709, -2122.5, 381.89999389648, 35.700000762939, 0, 0, 358) megusta = false addCommandHandler("openclose", function () if (megusta == false) then moveObject(gate, 2500, -2122.5, 381.89999389648, 30, 0, 0, 0 ) megusta = true elseif (megusta == true) then moveObject(gate, 2500, -2122.5, 381.89999389648, 35.700000762939, 0, 0, 0 ) megusta = false end end)
-
Use scripts. use these functions https://wiki.multitheftauto.com/wiki/CreateVehicle https://wiki.multitheftauto.com/wiki/Set ... onsEnabled
-
Because you are attaching the heli to the boat at the boat itself the location, so example, the boat is at 2000,20,10 it will attach the heli at that location at the boat, so 2000 steps away. so: local x, y, z = getElementPosition ( boot1 ) is wrong
-
Because it's wrong. Just change the 20 again btw ;p local url = "http://www.di.fm/mp3/hardstyle.pls" function playTheSound(x, y, z, vehicle) sound = playSound3D(url, x, y, z) setSoundMaxDistance (sound,20) -- use a element .. if (isElement(vehicle)) then attachElements(sound, vehicle) end end addEvent("playTheSound", true) addEventHandler("playTheSound", root, playTheSound) function stopTheSound(x, y, z) stopSound(sound) end addEvent("stopTheSound", true) addEventHandler("stopTheSound", root, stopTheSound) -- 181 FM: [url=http://www.181.fm/winamp.pls?station=18]http://www.181.fm/winamp.pls?station=18[/url] ... 0(Top%2040)&file=181-power.pls -- The Hitz channel: [url=http://www.in.com/music/radio/977-the-h]http://www.in.com/music/radio/977-the-h[/url] ... el-15.html
-
Do you mean this:? CLICKME setSoundMaxDistance
-
show me the client side part.
-
Read better α7мα∂qтя, it's there. BTW, any errors in debugscript 3? EDIT: Organise your code more.
-
Aah, just add this in your acl: under admin: paneel = the resource name off the panel BTW, are you from the netherlands? Edit: are other functions working like importing stats?
-
Ah, it was maded by fivos, my mate ;p what does /debugscript 3 says? is mapmanager running?
-
pff, use this: [not tested] --client side setTimer( function() gPS69 = getPedStat(getLocalPlayer(), 69) Pstats = (gPS69/10) --because the maximum of getpedstat is 1000. guiProgressBarSetProgress(Progress[1], Pstats) end ,50 ,0 ) [why setting a timer of 50 miliseconds btw? ]
-
Show us the import script
-
ik wel: http://www.versio.nl/?pa=10514srelz Versio is een goede hosting company, en ook wel goedkoop [ vind ik ]
-
Because dxDrawGifImage is a usefull function put this in your code: function dxDrawGifImage ( x, y, w, h, path, iStart, iType, effectSpeed ) local gifElement = createElement ( "dx-gif" ) if ( gifElement ) then setElementData ( gifElement, "gifData", { x = x, y = y, w = w, h = h, imgPath = path, startID = iStart, imgID = iStart, imgType = iType, speed = effectSpeed, tick = getTickCount ( ) } ) return gifElement else return false end end addEventHandler ( "onClientRender", root, function ( ) local currentTick = getTickCount ( ) for index, gif in ipairs ( getElementsByType ( "dx-gif" ) ) do local gifData = getElementData ( gif, "gifData" ) if ( gifData ) then if ( currentTick - gifData.tick >= gifData.speed ) then gifData.tick = currentTick gifData.imgID = ( gifData.imgID + 1 ) if ( fileExists ( gifData.imgPath .."".. gifData.imgID ..".".. gifData.imgType ) ) then gifData.imgID = gifData.imgID setElementData ( gif, "gifData", gifData ) else gifData.imgID = gifData.startID setElementData ( gif, "gifData", gifData ) end end dxDrawImage ( gifData.x, gifData.y, gifData.w, gifData.h, gifData.imgPath .."".. gifData.imgID ..".".. gifData.imgType ) end end end )
-
Replacing a car bodikit + Replacing rims
denny199 replied to DeletedAccount1111's topic in Scripting
Maybe this will help you: viewtopic.php?f=108&t=35828 Read the steps slow. -
Could you delete all my resources? Because I gonna update everything soon, with a clear start ;p page: https://community.multitheftauto.com/ind ... &id=270846 DONE
-
use source: local teamer = getPlayerTeam( source ) == getTeamFromName('LS') if teamer and ( getElementType ( source ) == "player" ) then giveWeapon( source, 31, 500 ) giveWeapon( source, 35, 20 ) giveWeapon( source, 16, 20 ) givePlayerMoney( source, 50000 ) end
-
Maybe this?: http://egret.net/kb__mb.htm
-
Haha, klopt dat bedoel ik
-
Because there are to many objects in one place I guess. Use what tapl said.
-
Yes. It might look like "idea stealing". But I only want to make this for another gamemodes, not race =,=. So, what do I need to use?
