-
Posts
283 -
Joined
-
Last visited
Everything posted by Buffalo
-
I don't think that peds should get an important roles, at least not with the current ped functions as the movement is synced locally-only, and it's very hard to script that, as peds can't be moved in the simplest way like with function setPedMoveTo(ped,x,y,z); Moreover, peds can't use guns, so co-op would be available in vehicle only; But they perfectly fit to simple roles, like goods seller NPC and so on; though, it's more like for rp roles
-
search next time.. https://forum.multitheftauto.com/viewtop ... te#p274375
-
All functions are listed in wiki https://wiki.multitheftauto.com/index.ph ... =Main_Page This case its getPlayerOccupiedVehicle(thePlayer)
-
May sound crazy.. but what about if you would destroy objects clientside using destroyElement? can be a prob to recover without reconnecting.. but i can't see any other way, as setObjectStreamable with arguement false when there is so many objects, could cause unwanted results;
-
1) I don't have the correct answer to that but afiak those are two different entities. The main difference (I assume) is that players are always synchronized and representing remote clients whereas peds are primarily meant for client side purposes. 2) When 1.0 is released it should contain all the functions mentioned on the wiki. 3) Some old functions are bugged in the nightly builds. Try to find out what's causing your map not to load and post your issues in the bug tracker (make sure the report doesn't exist already). 4) In my experience it is. 5) Yes, but the configuration syntax is slightly different. You must fetch the server configuration files from the repository. 6) What do you mean by that? DP2 modules should work with nightly builds afaik. 7) The source was released to encourage coders to anticipate in the project. You can however download the nightly builds to upgrade your game mode without having to build it from source. 8 ) No. I hope that answers some of your questions. 1) all functions using "player" returns nil 5) What you mean? (i can't load any module)
-
some qestions.. 1) do element "player" is now associated along with "ped" (scriptingside)? 2) does 1.0 beta realease includes all new functions, that written in wiki? 3) why 1.0 cannnot load my .map file, that did load in early dp releases? aren't it synced while in beta? 4) is 1.0 beta release enough stable, that i can start upgrading my gamemodes to fit it? 5) can 1.0 beta load modules now? 6) will already released modules be needed to upgrade to fit mta 1.0? 7) is 1.0 beta released just for developing, or gamemodes upgrading too? is map editor present? can't get launched; 9) what about script converter, that converts .pwn to .lua? 10) what about 'built in mta' serials keys in 1.0 nightly releases , 1.0? 11) What means 'BEFORE VERSION 1.0' on the wiki?
-
Yeah, it works. Missed propagating.. Thanks for help.
-
Here is 2 buttons attached to parent 'regLogBoard' : local registerok = guiCreateButton(0.3,0.6, 0.4,0.3,"OK",true,regLogBoard) local back = guiCreateButton(0.8,0.08, 0.1,0.8,"Back",true,regLogBoard) addEventHandler ("onClientGUIClick",registerok,CallForRegister) addEventHandler ("onClientGUIClick",back,ReturnMainWind) The prob is that i can click on button parent regLogBoard(not on button) but button will get clicked. Is there an error somewhere..?
-
Yes, i know that, it calculates offset of the element, not it's world position. But its meanless while it calcs wrong offset.
-
Yeah, thats maths, and my prob too, as i cant do it, and asking for help in maths
-
Ahh, it was correct, likely messed up while copy pasting code, as i deleted few things And yes, source is definetely a player as function getPlayerOccupiedVehicle says that Yes , i want to just stick something to the front of the car, but it needs good math's count, as now: attachElementToElement(permRamp [source] , source, 0, y-yo, 0, 0, 0, 0) you just increased y, what means it would only work while driving vehicle to the north, i tested that, but i need that it would stick to the front of vehicle in that pos the object was created, and would stay sticked.
-
I have two guiCreateTab's, and when these pop's up i need that first would open the second tab its now something like that: _____________ \Tab 1/\Tab 2/ ---^ selected but i need that Tab 2 would open first after pop'up: _____________ \Tab 1/\Tab 2/ -------------^ -------- selected Is there a function that forces that?
-
I have a problem with maths, i need to attach an object to the front of car: local x, y, z = getElementPosition ( source ) local xo, yo, zo = getElementPosition ( source ) local theVehicle = getPlayerOccupiedVehicle ( source ) local a,b,r = getVehicleRotation ( theVehicle ) x = x - math.sin ( math.rad(r) ) * 20 y = y + math.sin ( math.rad(r) ) * 20 permRamp [source] = createObject ( 1655, x, y, z, 0, 0, r ) -- <-- creates in front of it attachElementToElement(permRamp [source] , source, x-xo, y-yo, 0, 0, 0, 0) -- <-- attaches on different pos it creates a ramp in front of vehicle, but attaches it every time on different sides of it.
-
Then its better using tables in this case.. Thanks for reply.
-
ok.. here it is: function consoleDrift ( player) spawnPlayer ( player, -2414.1169433594, -603.33264160156, 132.5625, 0, 43) local driftMarker = createMarker ( -2431.5637207031, -596.71917724609, 131.91340637207, "cylinder", 5, 255, 255, 0, 170, player ) outputChatBox(getClientName(player).." has teleported to drift area (/drift)") setElementData(player, "driftingmarker", driftMarker) setElementData(player, "marker", 1) end addCommandHandler("drift",consoleDrift) function checkMarker (markerHit, matchingDimension ) local driftingMarker=getElementData ( source, "driftingmarker" ) local markerNumb=getElementData ( source, "marker" ) if(markerHit==driftingMarker) then if(markerNumb==1) then setElementData(source, "marker", 2) destroyElement ( driftingMarker ) -- <-- destroys first marker "cylinder" local driftMarker = createMarker ( -2779.9223632813, -491.24954223633, 6.9137630462646, "cylinder", 5, 255, 255, 0, 170, source ) setElementData(source, "driftingmarker", driftMarker) elseif(markerNumb==2) then setElementData(source, "marker", 0) destroyElement( driftingMarker ) -- <-- doesnt destroy second cylinder end end end addEventHandler("onPlayerMarkerHit", getRootElement (), checkMarker) it works with "checkpoint"
-
A ped was sitting near my spawn (SF train station), i punched him and he started to run, then i killed him, but couldnt collect dropped money lol funny bug
-
Don't think so, "checkpoint" is fully working.
-
I have a annoying problem with setting element data like in text displays tutorial http://www.multitheftauto.com/tutorial5.html (Setting up dynamic displays) local myTextDisplay = textCreateDisplay () -- create a text display local myTextItem = textCreateTextItem( "", 0.7, 0.7) -- create a text item for the display textDisplayAddText ( myTextDisplay, myTextItem ) -- add it to the display so it is displayed setElementData ( source, "textItem_myTextItem", myTextItem ) -- <-- problem textDisplayAddObserver ( myTextDisplay, source ) When it tries to setelementdata it prints to console "Couldn't packetsize argument list, invalid element speciefed." , it sets it correctly, but the error.. Can it be fixed somehow, that this error wouldn't show up?
-
not sure, but try to put it onPlayerSpawn;
-
it wont work, cuz we need to wait dp3 for those functions which are used here
-
I made a script with mission markers (cyliners), but there is one bug with them. When i destoyed first cylinder marker, and created another, it didnt pass through onMarkerHit or onPlayerMarkerHit. The first marker passed it succesfully, but after destroyElement() the next one doesnt.
-
It downloads client resources from your pc..
-
0 Like it says, on default it is off, so if you going to download resources you need to make it 1; 1
-
It would be great function getVehicleEngineState as boolean, as now it is just setVehicleEngineState.
