Jump to content

DiSaMe

Helpers
  • Posts

    1,461
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by DiSaMe

  1. I agree with you about the first suggestion. The same argument for removePedFromVehicle would be nice too. If getting into/out of a vehicle becomes possible for peds, I see nothing else about them what should be implemented. I think client-side function is enough as scripting makes it possible to trigger the function from the server. For example, you can make something like this: server: setElementData(ped,"lookat",{x,y,z}) client: setPedLookAt(ped,unpack(getElementData(ped,"lookat"))) This is the point: if the function for peds is unavailable in server side, you can make the server set task and client to execute it. That's the way I make peds walk to certain position as setPedControlState is a client-side only function.
  2. Is that needed? Do object elements have syncers at all? As far as I know, setting dimension of server-side object in a client-side script only changes the dimension locally.
  3. Server: object = createObject(...) setElementID(object,"alldim") Client: object = getElementByID("alldim") addEventHandler("onClientRender",getRootElement(), function() setElementDimension(object,getElementDimension(getLocalPlayer())) end ) If you want to make this work with multiple objects, you can create an abstract element and make it a parent of objects.
  4. You can round decimals in this way: rounded_value = math.floor(unrounded_value*100)/100
  5. Actually, onClientPlayerJoin isn't triggered by local player because client-side scripts start after player has already joined the server. Use onClientResourceStart attached to getResourceRootElement(getThisResource()) instead.
  6. DiSaMe

    Is this a bug?

    I don't know exactly how it is, but I think setWeatherBlended works 60 times slower because weather changes depend on time.
  7. Did you test onClientPlayerJoin with remote player? It doesn't work with local player as the script is downloaded when the player has already joined.
  8. DiSaMe

    Im a idiot?

    From script.lua file it looks like the extensions for known file types are hidden, but meta.xml has a visible extension, so maybe it's actually meta.xml.xml, what means that you have to rename the file so that you see meta, not meta.xml.
  9. Actually it is possible. You can use velocity functions to script that.
  10. Actually it is possible. You can use velocity functions to script that.
  11. That function would be useful because you can't calculate rotation in all three axes from two points.
  12. You can use dxDrawLine3D, but you have to script physics yourself.
  13. DiSaMe

    Player Limit

    I know that, but from the view of MTA they still won't be players.
  14. I meant using setCarVelocity for limiting the car speed we don't want to see them driving @ 250kmh in a downtown street... You can toggle control state depending on the velocity.
  15. DiSaMe

    Player Limit

    Well then, for example a player is getting out of the "Downtown Los Santos" server area and comes to another area, could the server change without the player actually seeing he changed of server? For example he's driving a car from a server 1 area to server 2 area, will he stay in the car without seeing anything? It would be like a kind of streaming. To make the player stay in the car, something more should be scripted. But I have another idea (however, I don't know if trying to do that would be useful): using peds as copies of some players. Let's say there are some servers joined into a group. You can connect to any of them. MTA does its work to make you see other players in the same server. That server could use bots to represent players who are in other server. I think it's not difficult to make bots in one server copy players who are in another. But it would need more work to make the gameplay smooth. Elements of other types should have their copies too. So I think that may be inefficient.
  16. DiSaMe

    Peds...

    Did you set ped's target position with setPedAimTarget? About server-side setPedControlState: if you really need this function, you can script it.
  17. dxDrawText("a",100-1,100-1,100-1,100-1,tocolor(0,0,0,255)) dxDrawText("a",100+1,100-1,100+1,100-1,tocolor(0,0,0,255)) dxDrawText("a",100-1,100+1,100-1,100+1,tocolor(0,0,0,255)) dxDrawText("a",100+1,100+1,100+1,100+1,tocolor(0,0,0,255)) dxDrawText("a",100-1,100,100-1,100,tocolor(0,0,0,255)) dxDrawText("a",100+1,100,100+1,100,tocolor(0,0,0,255)) dxDrawText("a",100,100-1,100,100-1,tocolor(0,0,0,255)) dxDrawText("a",100,100+1,100,100+1,tocolor(0,0,0,255)) dxDrawText("a",100,100,100,100,tocolor(255,255,255,255)) This draws white "a" with a black 1 pixel outline.
  18. DiSaMe

    MTA and SAMP

    This is what I often talk about in a short way: SA-MP players hate MTA because they don't play it On the other hand, this seems to be an advantage of MTA because that makes it have players who have their personal opinion.
  19. This must be a client-side script.
  20. I remember some time ago on MTA SA DM DP1 or DP2 I created a resource and used it to get maximum number of elements in the server. It was 65536. Now I tried to get it again with runcode. I executed these commands: run car=true run while car do car=createVehicle(400,0,0,0) end I had to wait a few minutes. run outputServerLog(tostring(#getElementsByType("vehicle"))) The result was 99781. However, to me it doesn't look like it's near any "smooth" number. So what is the exact limit of elements in MTA SA 1.0.1?
  21. I don't like this problem either. This happens not only with big numbers. For example, if you divide 256 by 10, you get 25.60000038147.
  22. It would be nice to have functions like setVehicleVariation and getVehicleVariation
  23. DiSaMe

    i need help

    https://wiki.multitheftauto.com/index.ph ... CreateBlip
  24. DiSaMe

    Animation

    Many peds functions can be used on players. Try this: function makePlayerSitDown(player,cmdname) setPedAnimation(player,"ped","SEAT_idle",-1,true,false,true) end addCommandHandler("sit",makePlayerSitDown)
  25. I have tried my CLEO mod that blocks most of the bullets. It worked perfectly on SA-MP and nobody caught me cheating
×
×
  • Create New...