Jump to content

pa3ck

Members
  • Posts

    1,141
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by pa3ck

  1. pa3ck

    ColRadar

    When I needed a colshape I used cuboid instead of rectangle. Try the cuboid one. createColCuboid ( float fX, float fY, float fZ, float fWidth, float fDepth, float fHeight ) fX, fY, fZ = positions Width = width of the cuboid Depth = the size of the cuboid from the position Z going downwards Height = the size of the cuboid from the position Z going upwards ( For the rectangle you can not specify its height and its depth, its going all the way up... )
  2. pa3ck

    ColRadar

    If you want to see the colshapes then set this to 'true' in your script : setDevelopmentMode(true) Then use the command "/showcol"
  3. pa3ck

    Help Please

    You just have to copy and paste the whole thing I guess, then call the smothMoveCamera and set its arguments. Try it.
  4. pa3ck

    A Little help

    As far as I know, no, there's no such function.
  5. getPedOccupiedVehicle(getLocalPlayer())
  6. Mine was not an attempt, its working, i tried it. He just never said he wants the player to spawn to a random position. Yours is just full of stupid things like repeat until, you have not specified any arguments for spawnPlayer, you have restartMapInfo() I dont even know why etc... No offense tho... The code is: function randomSpawn() local tplayer = source spawnPlaces = { {10, 10, 10 }, -- Change them, you can also add more if you want to {20, 20, 10 }, {30, 30, 10 }, } local randomPlace = math.random(1, #spawnPlaces) setTimer( function() spawnPlayer(tplayer, spawnPlaces[randomPlace][1],spawnPlaces[randomPlace][2], spawnPlaces[randomPlace][3]) end, 5000, 1) end addEventHandler('onPlayerWasted', getRootElement(), randomSpawn)
  7. pa3ck

    Help Please

    setCameraMatrix ( player thePlayer, float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] ) https://wiki.multitheftauto.com/wiki/SetCameraMatrix setCameraMatrix is not the one you need ( it wont move ), you can set its position and the position you want to be looking at.
  8. BTW I think wiki is always up-to-date.
  9. Ohh, okay, thank you. Can I set one of them invisible ( actually the one that fires )? Is there any function for that? And I used onClientRender to check if the key is pressed down this was the simpliest solution I thought of
  10. addEventHandler("onPlayerWasted",root,function () saveWeaponStats(source) end) -- saves it when he dies addEventHandler("onPlayerSpawn",root,function () loadWeaponStats(source) end) -- loads it when he spawns
  11. This is a server side code, do you have that in meta.xml? Like : <meta> <script src="s_name.lua" type="server"/> </meta>
  12. Is it working properly? You just want to add a function which saves then loads the stats when someone dies? Right?
  13. I made this little code, but the minigun's fire is a bit weird. Its not shooting straight... Here's the pic of it: http://s8.postimg.org/gdg1sstlv/gta_sa_ ... _00_34.png The code is the following: addEventHandler('onClientResourceStart', getResourceRootElement(getThisResource()), function() local tp = getLocalPlayer() local veh = getPedOccupiedVehicle(tp) local vx, vy, vz = getElementPosition(veh) local x, y, z = getElementPosition(tp) local minigun1 = createWeapon('minigun', vx, vy, vz) local minigun2 = createWeapon('minigun', vx, vy, vz) attachElements(minigun1, veh, 0.8, 1.3, 0.7, 20, 30, 90) attachElements(minigun2, veh, -0.57, 1.3, 0.7, 20, 30, 90) function fire() if getKeyState("num_6") == true then fireWeapon(minigun1) elseif getKeyState("num_4") == true then fireWeapon(minigun2) end end addEventHandler('onClientRender', getRootElement(), fire) end)
  14. Like you give a good number number of co-ordinates then spawn a player to one of them?
  15. pa3ck

    About functions

    I think he wants this: https://wiki.multitheftauto.com/wiki/StartResource
  16. I dont get what youre tryna say there... What do you want now?
  17. Then you gotta edit the freeroam resource itself.
  18. I think he wants the colors of the rainbow, like FFS has, not math.random. Thats why he would need timers.
  19. pa3ck

    about ped

    You dont need to change anything. This is the full code. Just put it into you resources folder. I'm not sure now, as far as I know you have to retrieve a bot with a command then it will spawn to your position. About LUA, I used this website: http://lua-users.org/wiki/LuaTutorial
  20. addEventHandler ( "onViolate", secu, secuServer ) change to: addEventHandler ( "onViolate", getRootElement(), secuServer ) And outputChatBox ( "No Perteneces a Este Clan", player, 255, 0, 0, true ) to: outputChatBox ( "No Perteneces a Este Clan", source, 255, 0, 0, true )
  21. Wouldn't it make more sense to use onClientRender? It would be much smoother. You would still need timers...
×
×
  • Create New...