Jump to content

DiSaMe

Helpers
  • Posts

    1,449
  • Joined

  • Last visited

  • Days Won

    32

Everything posted by DiSaMe

  1. getElementPosition getElementVelocity getElementRotation getVehicleTurnVelocity setElementPosition setElementVelocity setElementRotation setVehicleTurnVelocity setTimer
  2. No shaders are needed. Make a circle from multiple rectangles using dxDrawImageSection.
  3. DiSaMe

    Disabled CJ run

    You need to detect when certain controls are pressed and use setPedAnimation to make the player perform another running animation.
  4. If you want to render the view from all points on the same client, then it will lag because the game can only render one view per frame. Something can be achieved without significant lag. For example, if you update the view of security camera every 30 frames rather than 1 frame, then your own view will only slow down every 30 frames with 1 security camera. With 2 security cameras, it would slow down every 15 frames. But lag isn't the biggest problem. Moving the camera long distances in short time intervals cause sync and LOD visibility problems. There is another way which may look better, but uses more computing power: make a script which keeps taking the screen data of the client and sending it to the server. The server sends that data to all players who are near security monitors. Then players will see the screen of the client. This way uses bandwidth and requires to run a few clients on the server for screen data, but won't have glitches.
  5. DiSaMe

    Some questions...

    I see nothing wrong here.
  6. DiSaMe

    ped in vehicle

    warpPedIntoVehicle
  7. http://bugs.multitheftauto.com/view.php?id=5781 I don't know if that's going to allow us to fully control body parts or just affect them in a limited way. Sure, it would be nice to have a full control.
  8. DiSaMe

    _

    No need to "convert". Implementing the function in MTA will do the trick. function AddStaticVehicle(modelid, spawn_x, spawn_y, spawn_z, angle, color1, color2) local vehicle = createVehicle(modelid, spawn_x, spawn_y, spawn_z, 0, 0, angle) local c1, c2, c3, c4 = getVehicleColor(vehicle) setVehicleColor(vehicle, color1, color2, c3, c4) toggleVehicleRespawn(vehicle, true) setVehicleRespawnDelay(vehicle, 60000) return vehicle end Add this function to the script and then you can call AddStaticVehicle.
  9. You made it? Wow, I thought it was my airbrake script with modified controls... You have to use arctangent function to get the camera rotation angle. Like this: setPedRotation(localPlayer,math.deg(math.atan2(ctx,cty))) You may need to make the angle negative for this to work.
  10. How to get free scripters? Simple. Make a good server and people may want to join you. So if you're a good scripter, you may be able to attract scripters. If you can't, then nobody will want to form a team with you and you either need to learn to script or pay people to make scripts.
  11. DiSaMe

    Why dont work?

    It may look as if you got trolled here, but you see, this is MTA forum. We don't provide support for other multiplayer mods. Anyway, why would anyone want to convert the map from MTA to SA-MP? What's the point of using the worse mod to play the map after putting some work into it?
  12. Does it work fine when you get the same weapons in other servers?
  13. DiSaMe

    Get points

    Because 'acc' is account of 'source' and 'source' is the player who was wasted. Instead, you need to get account of 'player' whom you get from 'alive' table.
  14. Maybe your game is modded or you use the scripts to replace models or something like that? AFAIK, errors in the Lua scripts should never cause MTA to crash, so there must be a problem somewhere else.
  15. Does this happen with any weapon or only with some specific ID?
  16. Because you make the giveMoney function create an infinite timer which calls giveMoney itself. That means, every time a new timer is created. If only want one repeating cycle, either create the timer in another function and attach that function to "onPlayerSpawn" event or simple change the third setTimer argument to 1.
  17. I've thought of making some recording/replaying scripts recently and maybe I will try to make something, but I'm not sure how they will affect memory and CPU usage.
  18. local x1, y1, z = getElementPosition(localPlayer) local r = math.rad(getPedRotation(localPlayer)) local x2, y2 = x1+math.sin(r)*2, y1+math.cos(r)*2 Now x1, y1, z will be player's position and x2, y2, z will be position in front by 2 distance units. You can change the distance by multiplying sin and cos by something else than 2 in line 3. Also, you may need to make r negative (use -r instead of r) to get the correct position.
  19. I don't think it's a good idea to rely on camera to do something like this. Better use: getElementPosition to get player's position and then: getPedRotation math.sin math.cos to get position in front. Then check collision between player and front position.
  20. Usage of root makes the script unfreeze everyone who respawns.
  21. Mainly those, but of course, you can use some others if you want to make it more accurate, such as getPedControlState setPedControlState What's so unclear about those functions?
×
×
  • Create New...