Jump to content

Thivenin

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Thivenin

  1. hai all, this is the third time I ask help in 3 day x) but as I always say I started lua only since thursday platformKillerofNoobObject = createObject ( 8661, -15, 95, 100 ) setElementInterior ( platformKillerofNoobObject, 901 ) function platformKillerofNoob ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) == "Object" ) then targetPlayer = getPlayerFromName setElementHealth ( targetPlayer, - 100 ) end end addEventHandler ( "onPlayerHit", getRootElement(), platformKillerofNoob ) here is the script I want that the platform kill the player when he hit the object (platform) there is not any error, idk what is wrong ^^ and it's not killing the player
  2. what you mean ? give the script pls ^^ edit : Solved, I just forgot to put the marker size x))), sorry for loosing your time for shitty fail ^^
  3. bump firstMarker = createMarker ( -35, 35, 121.5, "arrow", 250, 0, 250, 255 ) setElementInterior ( firstMarker, 900 ) function firstTP ( markerhit, matchingDimension ) if ( markerhit == firstMarker ) then hitplayer = source setElementInterior ( hitplayer, 901, -214, 16, 197 ) end end addEventHandler ( "onPlayerMarkerHit", firstMarker, firstTP ) with it, it's TPing me well to interior 900, but I can't see the marker if I put "getRootElement()" or "root" at EventHandler, it's making the script bugged
  4. yes, lol but I should first enter in the interior 900 to take the marker to go to the interior 901, but when I take the marker to go to the interior 900 it's directly TPing me at the interior 901 so when I wanna go to the interior 900, I can't because of that part of the script is bugged and TPing me directly at interior 901
  5. that doesn't work, now it's TPing me again at the interior 901
  6. I have another problem now, this one is very weird firstMarker = createMarker ( -35, 35, 121.5, "arrow", 250, 0, 250, 255 ) setElementInterior ( firstMarker, 900 ) function firstTP ( markerhit, matchingDimension ) if ( markerhit == firstMarker ) then hitplayer = source setElementInterior ( hitplayer, 901, -214, 16, 197 ) end end addEventHandler ( "onPlayerMarkerHit", firstMarker, firstTP ) the marker should be at the interior "900" and I should take the marker for being TP at the interior 901, but when I get in the interior 900, it's directly TPing le at the interior 901, I tried alot of thing but nothing help me pls ^^ (again sorry for all thse ask, I started the script yesterday edit : now as I removed "getRootElement()" and added "firstMarker" at the event, it's not TPing me directly at the interior 901, it's TPing correctly at the interrior 900, but I don't see the marker to go at the interior 901
  7. ty both, I luf you, it's working ^^ I learn more and more about the scripting (I started yesterday ^^)
  8. awww right ty, but now it's saying Bad argument @ 'takeWeapon' [Expected element at argument 1, go nil ] in every line of takeWeapon and when I take the marker
  9. hai all I wanted to do : when a player pass the marker "outOneVSOneMarkertoPrincipalInterior" his melee weapon got removed but it's not removing and it's not giving any error message here the script function removeOneVSOneWeapon ( markerhit, takeweapon ) if ( markerHit == outOneVSOneMarkertoPrincipalInterior ) then takeWeapon ( thePlayer, 2 ) takeWeapon ( thePlayer, 4 ) takeWeapon ( thePlayer, 5 ) takeWeapon ( thePlayer, 6 ) takeWeapon ( thePlayer, 8 ) takeWeapon ( thePlayer, 9 ) takeWeapon ( thePlayer, 10 ) end end addEventHandler ( "onPlayerMarkerHit", getRootElement(), removeOneVSOneWeapon ) the createMarker "outOneVSOneMarkertoPrincipalInterior " is more up on the script page (there is 202 line so I won't give you all the script if everything is working except this part) and I didn't remove other melee weapon cus on the script there is only "pickup" these weapon help me pls if you have time ^^
  10. that is working, thanks you very much
  11. Im actualy not on the computer, I will try when Im back
  12. Erm Im teleported to mymapping with the 900
  13. The 900 is an interior so it's not really changing the dimension I want to have a marker wich is teleporting you to the normal dimension/world
  14. I added your last "end" that you forgot still not working, not any error
  15. This time I tried it : outMarker = createMarker ( 24, 42, 122.5, "arrow", 1.5, 250, 0, 0, 255 ) setElementInterior(outMarker,900) function outTeleport ( hitElement, matchingDimension, player ) if (hitElement == "player") then setElementDimension ( source, 0 ) setElementPosition ( player, 1155, -1770, 18 ) end end The marker is here, there is no any error message but when I take the marker it's not teleporting and there is still no error
  16. hai, I'm learning the script and I start with the teleporting with marker But when I come in my interior I have the marker to get out, when I take it but it's doing nothing so my first function is working well but not the secound for get back to normal dimension I have the error, line 12 : 'then' excepted near 'hitElement' here the script : intoMarker = createMarker ( 1153, -1770, 18, "arrow", 1.5, 250, 0, 0, 250 ) function intoTeleport ( player ) setElementInterior ( player, 900, 26, 42, 121 ) end addEventHandler ( "onMarkerHit", intoMarker, intoTeleport ) outMarker = createMarker ( 24, 42, 122.5, "arrow", 1.5, 250, 0, 0, 255 ) setElementInterior(outMarker,900) function outTeleport( hitElement, matchingDimension ) if ( "thePlayer" ) hitElement ( hitMarker ) then local elementType = getElementType( hitElement )type setElementDimension ( source, 0 ) end end addEventHandler( "onMarkerHit", outMarker, outTeleport ) IntoMarker and the function intoTeleport is the function for get in the interior, that is working the problem is the outMarker and the function outTeleport so my problem is : I can't get my ass back to the normal dimension, can ya all help me pls ?
×
×
  • Create New...