Jump to content

albers14

Members
  • Posts

    73
  • Joined

  • Last visited

Everything posted by albers14

  1. Are they placed in the same script. If so rename gate1 gate2 gatecol on one of them, so its not named the same. and rename the functions name.
  2. Whats the full name of the team? And where do the element data get attached to the player?
  3. What are you using the table on the clientside for, and why not creating one at the serverside too?
  4. Because i have been told that you can't cancel onPlayerDamage event . But if you meant any other way, Then make your code and lay it for us so we can learn marker = createMarker(x,y,z,"cylinder") function hitMarker(hitElement) if getElementType(hitElement) == "player" then setElementData(hitElement, "godmode", true) end end addEventHandler('onMarkerHit', marker, hitMarker) function leaveMarker(hitElement) if getElementType(hitElement) == "player" then removeElementData(hitElement, "godmode") end end addEventHandler('onMarkerLeave', marker, leaveMarker) client:: function onDamage() if getElementData(source, "godmode") then cancelEvent() end end addEventHandler('onClientPlayerDamage', getLocalPlayer, onDamage)
  5. albers14

    Question

    I would rather say setAccountData as setElementData get removed as soon as the player leaves the server.
  6. Confuses me why you guys dont do it all serversided? Giving the element a data when he hits the marker and when he leave the marker removes it. Use onPlayerDamage and getElementData to check if the player should be hurt or not, if not then cancelEvent() Done.
  7. Nvm tested it on my private server and it worked fine, theres no probs with the post, posted above mine
  8. Use a table. Let us say as an example we are using a table named playerObjects playerObjects = {} function createWorldObject ( thePlayer,objectID,objectPosX,objectPosY,objectPosZ) local rx,ry,rz = getElementRotation ( source ) obj = createObject(thePlayer,objectID,objectPosX,objectPosY,objectPosZ) setElementDoubleSided (obj,true) setElementRotation(obj,rx,ry,rz) if not playerObjects[thePlayer] then playerObjects[thePlayer] = {} end table.insert(playerObjects[thePlayer], obj) function removeAllObjects (thePlayer) -- You need to send an argument to here including the player element. if playerObjects[thePlayer] then for k,v in ipairs(playerObjects[thePlayer]) do destroyElement (v) end playerObjects[thePlayer] = nil -- Clear the table for the roadblocks end end addEvent("onRemoveAll",true) addEventHandler("onRemoveAll",root,removeAllObjects) Should work good luck Your first functions misses an event to trigger from clientside and a end.
  9. You better just stop trying. You cant edit the handling on a plane. MTA do not support that yet.
  10. albers14

    MTA SA wont start

    No more working anymore http://pastebin.com/g9muySYk EDIT :: Working sometimes.
  11. albers14

    MTA SA wont start

    Thank you Well seems to be a problem with my gt 540m somestimes. But I can atleast play MTA now, will look into downgrading my graphic card to the second latest version Thanks again
  12. albers14

    MTA SA wont start

    Graphics driver could not be installed, not supported? I updated my GT540m instead. Audio driver probaly outdated, error from Dolby audio system. Storage, USB3 and Touchpad driver succesfully installed. The MTADIAG http://pastebin.com/sLbZasAG Cant still open the game. gta_sa.exe and multitheftauto.exe running in task processors.
  13. albers14

    MTA SA wont start

    My mta wont start, the tasks multi theft auto.exe and gta_sa.exe is running but the program is not starting The pastebin generated from mtadiag: http://pastebin.com/HDpkAexk
  14. like this ? function ghost() local localplayer = getLocalPlayer(source) for index,player in ipairs(getElementsByType("player")) do if setElementCollidableWith(player, localplayer, false) then outputChatBox("Server: Ghostmod: on", source, 0, 255, 0 ) else setElementCollidableWith(player, localplayer, true) outputChatBox("Server: Ghostmode: off", source, 0, 255, 0 ) end end end addCommandHandler("Ghost", ghost) but i got another error WARNING:playerghost/ghost.lua:13: attempt to call global 'addCommandHandler' (a nil value) EDIT: Sorry, its working but how can i make it for vehicles too. i mean i can go thourgh vehicles too 1. Narh not really, use isElementCollidableWith instead. So if isElementCollidableWith(theElement, withElement) then you code.. 2. Seems like you fixed the one by yourself 3. Right now you can only go through players as you say then use. for index, vehicle in ipairs(getElementsByType("vehicle")) do You should understand it now
  15. mgate1 = createObject ( 989, 864.5, -3973, 2.2999999523163, 0, 0, 267.99499511719 ) function opengate(thePlayer) local id = getElementModel (thePlayer) moveObject ( mgate1, 1000, 859.79998779297, -3972.6000976563, 2.0999999046326 ) end addCommandHandler("mopen", opengate) function closegate(thePlayer) -- thePlayer not theplayer local id = getElementModel (thePlayer) moveObject ( mgate1, 1000, 864.5, -3973, 2.2999999523163 ) end addCommandHandler("mclose", closegate) Script should work and had no problem unless that it couldnt gain the element model in the last function because you used theplayer in function and thePlayer in model.
  16. Anyways is it a blip you had created with a script, or the normal blip attached to you player?
  17. LVgateL = createObject ( 986, 2497.3999023438, 2769.1999511719, 11.5, 0, 0, 90 ) LVgateR = createObject ( 985, 2497.3999023438, 2777.1000976563, 11.5, 0, 0, 90 ) LVsensor = createColRectangle(2471.5, 2763.2, 50, 20) function LVgate(theColShape) if theColShape == LVsensor then if getElementType(source) == "player" then -- To avoid bugs, you aren't able to get a teamname from a vehicle. local LVTeam = getPlayerTeam(source) if ( LVTeam ) then -- Checks if player have a team if LVTeam == getTeamFromName('LV') then -- Check if teamname is LV moveObject(LVgateL, 2000, 2497.3999023438, 2760, 11.5) end end end end end addEventHandler( "onElementColShapeHit", getRootElement(), LVgate )
  18. You fix it with removing it. If you create the marker clientside then its only the guy that can see it (:
  19. As far I know, then no.
  20. albers14

    Please help

    Actually you just need to use setElementModel serverside, that would say you are in need of using triggerEvent. And you are also in need of sending the information about who the ped is that should get the skin changed. Try to take a look at triggerEvent and addEvent
  21. albers14

    Help plz

    Why are you using onClientRender? Is there something there needs to be updated all the time nearly or? And in the end it will bug since you have added the event handler when its open and when you want to close it. And where is the function HideWindow? Please full code so we can help you.
  22. Who is source when its not putted in a function that is triggered of a player ? Line 13 is getRootElement() not Elements
  23. The clan is based on ACL or setElementData?
×
×
  • Create New...