Jump to content

arezu

Members
  • Posts

    446
  • Joined

  • Last visited

Everything posted by arezu

  1. arezu

    Gui

    like the debug says.. you are missing ")" here: addEventHandler("onPlayerJoin",getRootElement(), function() triggerClientEvent(source,"login",getRootElement()) end --- add ')' after end.
  2. I tried removing attachElements and instead set the ped position over the vehicle so the ped stands on the roof.. but the same problem remains.
  3. Im setting both ped rotation and their aim, and yes, they twist the waist, but that doesn't change the direction the bullets go in.. because if i stay still, then their waist has the same rotation and the mullet has the same position as when accelerating. so the only thing that changes is the direction the bullets goes in when accelerating. (aiming direction is not controllable when i am accelerating)
  4. ok, thanks.. i hope it works well edit: it works perfectly edit2: i attached the ped to the vehicle before triggering the client event, and then also changing rotation of ped onClientRender and setAimTarget(theDude, getPositionOffset(vehicle, 0, 5000, 0)) and getPositionOffset(vehicle, 0, 5000, 0) is a function i made and i get the position 5000 units in front of the vehicle.. it works and it shoots forward.. but when accelerate forwards, then the ped suddenly shoots in the opposite direction.. if i drive backwards then nothing like that happens.. I tried to change the aim target to the opposite direction, and tried driving backwards, but there was no change. (only happens when accelerating forwards..). is there any way around this? i tried in mta 1.05 and 1.1
  5. arezu

    Help!~!

    help with what??
  6. Im pretty sure it works in slothbot...
  7. When i create a ped and give it a weapon, and then i fire it, then it only fires for like 1 second and then it only shows the animation(doesn't give the effects of shooting). --server side addCommandHandler("dude", function(thePlayer) local gunner = createPed(0, 0, 0, 0) giveWeapon(gunner, 31, 999999999, true) local posX, posY, posZ = getElementPosition(thePlayer) setElementPosition(gunner, posX + 2, posY, posZ) triggerClientEvent("onRequestStartBlabla", thePlayer, gunner) outputChatBox("gunner!") end) --client side local theDude = nil function shooter() if(theDude == nil)then return end local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if(vehicle == false)then return end local isShooting = getControlState("vehicle_secondary_fire") if(isShooting)then setPedControlState(theDude, "fire", true) outputChatBox("is shooting!") else setPedControlState(theDude, "fire", false) end end addEvent("onRequestStartBlabla", true) addEventHandler("onRequestStartBlabla", getRootElement(), function(gunner) theDude = gunner addEventHandler("onClientRender", getRootElement(), shooter) end) i dont get any errors and i see the debug text i write in chatbox..
  8. arezu

    screenshot

    edit: nvm didn't work.
  9. oh.. lololo i didn't notice that you actually attached the object to the vehicle and tried to move the object .
  10. error 404 appears when resource folder name contains space or unknown characters... when there is a client sided script in the folder and when its added in meta.
  11. After the moveObject function in your server sided script, add a triggerClientEvent to add onClientRender event for the player, clientsided. also add a setTimer after moveObject servesided to remove the event handler for the player.. so that the vehicle is not attached to the vehicle anymore... example: -- server sided function moveLV ( ) local car = getPedOccupiedVehicle ( source ) local object = createObject ( 980, 0, 0, 3 ) moveObject ( object, 10000, 0, 0, 6 ) triggerClientEvent("onRequestChangeAttachementState", source, true, object) setTimer(removeAttachement, 10000, 1, source) end function removeAttachement(thePlayer) triggerClientEvent("onRequestChangeAttachementState", thePlayer, false) end --client sided local attachSource = nil addEvent("onRequestChangeAttachementState", true) addEventHandler("onRequestChangeAttachementState", getRootElement(), function(attach, theObject) if(source ~= getLocalPlayer())then return end attachSource = theObject if(attach)then addEventHandler("onClientRender", getRootElement(), attach) else removeEventHandler("onClientRender", getRootElement(), attach) end end) function attach() local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if(vehicle == false)then return end local posX, posY, posZ = getElementPosition(attachSource) setElementPosition(vehicle, posX, posY, posZ) end i cant press tab here so it may be hard to read the code..
  12. if you cant move object when its attached, then you can use: addEventHandler("onClientRender", getRootElement(), function() local objX, objY, objZ = getElementPosition(theObject) local vehicle = getPedOccupiedVehicle(theVehicle) setElementPosition(theVehicle, objX, objY, objZ) end) ...instead of attachElements btw, am i the only on who cant tab here?
  13. arezu

    race nametags

    Sorry for late response.. You could either use getScreenFromWorldPosition two times, one for nametags and one for healthbar, or do the same thing i did by using dxGetFontHeight and for healthbar position y, using sy + fontHeight*(anynumber).
  14. arezu

    race nametags

    I checked it fast so i dont really know if its right or not.. but i believe its from the sy-40 + offset in this: dxDrawText ( _getPlayerName(player), sx-30, sy-40 + offset, sx, sy, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false ) so try this: dxDrawText ( _getPlayerName(player), sx, sy, g_screenX, g_screenY, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false ) and see how it works.. and then edit your: local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) to change position of the nametags.
  15. arezu

    how ?

    you could create a marker and attach it to the plane for visual display, and then create an object, setElementCollisionsEnabled to false and setElementAlpha to 0 and attach it to the plane, and then use onClientRender to get distance between player and the object. and if within' range, then setElementInterior.
  16. You can use onVehicleDamage and check like between 100 ms and see if the vehicles that got damaged were within range with getElementBoundingBox and getDistanceBetweenPoints3D.
  17. 1)thanks 2) simon choosed the music, lol. 3) which part is confusing? you just have to drive forward and look at markers.
  18. recorded by |SW|Simon, intro by |SW|Blacktoaster.. One part you didn't see in the video, is that there are 3 ways to go after the first teleport..and that it looks kinda different to the player playing. I dont like to make maps with only loops, wallrides, etc etc.. thats why i make random shietz with scripts.
  19. "Unfortunately this idea won't work since the ball isn't synchronized between players. It will end up in a different place on everyone's screen." written by a super moderator long ago, but its still the same. It doesn't work.
  20. I did that once.. i even completed all the script, BUT because of bad syncronation it doesn't work... (When a player moves the ball, the ball wont move on the screen for every player, it doesn't even look like the player is close to the ball)
×
×
  • Create New...