unknooooown Posted June 16, 2011 Share Posted June 16, 2011 Hi. I hope you guys dont mind that I make a new topic every day.. Lol! Spending a lot of time with Lua these days, so I got a lot of questions. I try to find an answer for most of them myself, but I really need you guys on this one I am trying to make a Snake game in MTA, where CJ collects markers. When he hits a marker, a new CJ is added behind the player. I can add the first one without any problems, but when I want to add more peds to the new ped, thats where the problems start to happen. All the new peds are spawned on eachother, even if I add a little offset to the new spawn. I am sure the problem is how I call my peds, but I am not 100% sure how the correct way of doing this is. Hope you guys can guide me in the right direction. Here is my script: local snakeAppels = { {-720,961,11}, {-705,968,11}, {-698,954,11}, {-711,960,11}, {-722,950,11}, {-720,977,11}, {-687,965,11}, {-678,949,11}, {-664,951,11}, {-711,942,11} } -- cjSnake Marker & ColShape controller (Should only fire ONCE) -- function cjFirstSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelFirstHit ) end -- cjSnake Marker & ColShape controller (Should fire after the first PED is attached to CJ(thePlayer)) -- function cjSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelHit ) end addCommandHandler("cj-snake", cjFirstSnake) addEvent ( "loopCjSnake", true ) -- Should only fire ONCE! -- function appelFirstHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) local pX, pY, pZ = getElementPosition( thePlayer ) local prX, prY, prZ = getElementRotation( thePlayer ) newPed1 = createPed ( 0, pX + 1, pY, pZ, prZ ) if(detection) then outputChatBox( "You found the APPLE and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) attachElements ( newPed1, thePlayer, 0, -0.2, 0) triggerEvent ( "loopCjSnake", getRootElement(), "" ) end end -- Should fire after the first PED is attached to CJ(thePlayer) -- function appelHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) newPed = createPed ( 0, 0, 0, 0, 0 ) local npX, npY, npZ = getElementPosition (newPed) if(detection) then -- outputChatBox( "You found the apple and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) setElementPosition ( newPed, npX, npY + 0.1, npZ ) attachElements ( newPed, newPed1, npX, npY + 0.1, npZ) triggerEvent ( "loopCjSnake", getRootElement(), "" ) if(newPed) then outputChatBox ( "The new PED was created!") else outputChatBox ( "Failed to create the new PED!") end end end addEventHandler ( "loopCjSnake", getRootElement(), cjSnake ) Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 (edited) triggerEvent ( "loopCjSnake", getRootElement(), "" ) It should be a player element. triggerEvent ( "loopCjSnake", getRootElement(), thePlayer ) Edited June 16, 2011 by Guest Link to comment
unknooooown Posted June 16, 2011 Author Share Posted June 16, 2011 @JR10 - Ty, but that doesnt really change anything. Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 You can use this function to get the players back position function getPlayerBackPos(player) local rotz = getPedRotation(player) local x, y, z = getElementPosition(player) x = x + ( math.cos ( math.rad ( rotz-90 ) ) * 2) -- you can increase 2 to increase the space y = y + ( math.sin ( math.rad ( rotz-90 ) ) * 2) -- here too return x, y, z end Link to comment
unknooooown Posted June 16, 2011 Author Share Posted June 16, 2011 @JR10 - My real question is. Is it possible to spawn the next "joint/link" of the "Cj-snake" the way that I do it? I keep calling newPed, but will the engine know to look for the latest Ped, or doest it look for all newPed ? Link to comment
Castillo Posted June 16, 2011 Share Posted June 16, 2011 Make a table with them? local snakeAppels = { {-720,961,11}, {-705,968,11}, {-698,954,11}, {-711,960,11}, {-722,950,11}, {-720,977,11}, {-687,965,11}, {-678,949,11}, {-664,951,11}, {-711,942,11} } peds = {} -- cjSnake Marker & ColShape controller (Should only fire ONCE) -- function cjFirstSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelFirstHit ) end -- cjSnake Marker & ColShape controller (Should fire after the first PED is attached to CJ(thePlayer)) -- function cjSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelHit ) end addCommandHandler("cj-snake", cjFirstSnake) addEvent ( "loopCjSnake", true ) -- Should only fire ONCE! -- function appelFirstHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) local pX, pY, pZ = getElementPosition( thePlayer ) local prX, prY, prZ = getElementRotation( thePlayer ) newPed1 = createPed ( 0, pX + 1, pY, pZ, prZ ) if(detection) then outputChatBox( "You found the APPLE and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) attachElements ( newPed1, thePlayer, 0, -0.2, 0) triggerEvent ( "loopCjSnake", getRootElement(), "" ) end end -- Should fire after the first PED is attached to CJ(thePlayer) -- function appelHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) peds[#peds + 1] = createPed ( 0, 0, 0, 0, 0 ) local npX, npY, npZ = getElementPosition (peds[#peds + 1]) if(detection) then -- outputChatBox( "You found the apple and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) setElementPosition ( peds[#peds + 1], npX, npY + 0.1, npZ ) attachElements ( peds[#peds + 1], newPed1, npX, npY + 0.1, npZ) triggerEvent ( "loopCjSnake", getRootElement(), thePlayer ) if(peds[#peds + 1]) then outputChatBox ( "The new PED was created!") else outputChatBox ( "Failed to create the new PED!") end end end addEventHandler ( "loopCjSnake", getRootElement(), cjSnake ) Not tested. Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 (edited) on The apple first hit you create a ped and store it in newPed1 and then in appleHit you create a ped and attach it to newPed1 so it get attached to the first ped "newPed1" and you want it to get attached to the last created ped before it right? You can create a table and do this local newPed = {} function appelHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) local newPedCounter = #newPed + 1 newPed[newPedCounter] = createPed ( 0, 0, 0, 0, 0 ) local npX, npY, npZ = getElementPosition (newPed) if(detection) then -- outputChatBox( "You found the apple and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) setElementPosition ( newPed[newPedCounter], npX, npY + 0.1, npZ ) attachElements ( newPed[newPedCounter], newPed[#newPed - 1], npX, npY + 0.1, npZ) triggerEvent ( "loopCjSnake", getRootElement(), "" ) if(newPed) then outputChatBox ( "The new PED was created!") else outputChatBox ( "Failed to create the new PED!") end end end I think this will work. Edited June 16, 2011 by Guest Link to comment
Peacemaker Posted June 16, 2011 Share Posted June 16, 2011 Make a table with them? local snakeAppels = { {-720,961,11}, {-705,968,11}, {-698,954,11}, {-711,960,11}, {-722,950,11}, {-720,977,11}, {-687,965,11}, {-678,949,11}, {-664,951,11}, {-711,942,11} } peds = {} -- cjSnake Marker & ColShape controller (Should only fire ONCE) -- function cjFirstSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelFirstHit ) end -- cjSnake Marker & ColShape controller (Should fire after the first PED is attached to CJ(thePlayer)) -- function cjSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelHit ) end addCommandHandler("cj-snake", cjFirstSnake) addEvent ( "loopCjSnake", true ) -- Should only fire ONCE! -- function appelFirstHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) local pX, pY, pZ = getElementPosition( thePlayer ) local prX, prY, prZ = getElementRotation( thePlayer ) newPed1 = createPed ( 0, pX + 1, pY, pZ, prZ ) if(detection) then outputChatBox( "You found the APPLE and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) attachElements ( newPed1, thePlayer, 0, -0.2, 0) triggerEvent ( "loopCjSnake", getRootElement(), "" ) end end -- Should fire after the first PED is attached to CJ(thePlayer) -- function appelHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) peds[#peds + 1] = createPed ( 0, 0, 0, 0, 0 ) local npX, npY, npZ = getElementPosition (peds[#peds + 1]) if(detection) then -- outputChatBox( "You found the apple and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) setElementPosition ( peds[#peds + 1], npX, npY + 0.1, npZ ) attachElements ( peds[#peds + 1], newPed1, npX, npY + 0.1, npZ) triggerEvent ( "loopCjSnake", getRootElement(), thePlayer ) if(peds[#peds + 1]) then outputChatBox ( "The new PED was created!") else outputChatBox ( "Failed to create the new PED!") end end end addEventHandler ( "loopCjSnake", getRootElement(), cjSnake ) Not tested. it dont work errors Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 You are really pathetic, How the hell did you test it so fast? I bet you didn't even test it, get the f*ck off castillo. If you really tested it post the errors Link to comment
unknooooown Posted June 16, 2011 Author Share Posted June 16, 2011 I just tried the script that you posted, and Peacemaker is right, there are some errors in the I have to deliver a phone to someone now, but I will be back in abour half an hour for further testing Thanks for helping me JR Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 (edited) No problem. Edited June 16, 2011 by Guest Link to comment
Castillo Posted June 16, 2011 Share Posted June 16, 2011 I haven't tested it, so maybe there are errors indeed, but Peacemaker doesn't even know what he's talking about. Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 I haven't tested it, so maybe there are errors indeed, but Peacemaker doesn't even know what he's talking about. Also he posted that 5 minutes later how did he test it in 5 minutes that's without taking in consideration the time he took to see the post so obviously he is just trying to piss you off. Link to comment
unknooooown Posted June 16, 2011 Author Share Posted June 16, 2011 Finally back. I just tested the script again JR10, and for some reason it fails to create the new Peds. ( peds[#peds + 1] ) Does the script even know that it should store the new Peds in the table we created? Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 that way it's already storing them ,hmm, it should work. Link to comment
unknooooown Posted June 16, 2011 Author Share Posted June 16, 2011 that way it's already storing them ,hmm, it should work. Weird.. I am new to Lua and all, but I just cant see what the problem is. I will just have to look harder I guess Link to comment
unknooooown Posted June 16, 2011 Author Share Posted June 16, 2011 Hmm.. Here is the script as it looks like to me now: local snakeAppels = { {-720,961,11}, {-705,968,11}, {-698,954,11}, {-711,960,11}, {-722,950,11}, {-720,977,11}, {-687,965,11}, {-678,949,11}, {-664,951,11}, {-711,942,11} } peds = {} -- cjSnake Marker & ColShape controller (Should only fire ONCE) -- function cjFirstSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelFirstHit ) end -- cjSnake Marker & ColShape controller (Should fire after the first PED is attached to CJ(thePlayer)) -- function cjSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelHit ) end addCommandHandler("cj-snake", cjFirstSnake) addEvent ( "loopCjSnake", true ) -- Should only fire ONCE! -- function appelFirstHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) local pX, pY, pZ = getElementPosition( thePlayer ) local prX, prY, prZ = getElementRotation( thePlayer ) newPed1 = createPed ( 0, pX + 1, pY, pZ, prZ ) if(detection) then outputChatBox( "You found the APPLE and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) attachElements ( newPed1, thePlayer, 0, -0.2, 0) triggerEvent ( "loopCjSnake", getRootElement(), "" ) end end -- Should fire after the first PED is attached to CJ(thePlayer) -- function appelHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) peds[#peds + 1] = createPed ( 0, 0, 0, 0, 0 ) local npX, npY, npZ = getElementPosition (peds[#peds + 1]) if(detection) then -- outputChatBox( "You found the apple and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) setElementPosition ( peds[#peds + 1], npX, npY, npZ ) attachElements ( peds[#peds + 1], newPed1, npX, npY, npZ) triggerEvent ( "loopCjSnake", getRootElement(), thePlayer ) if(peds[#peds + 1]) then outputChatBox ( "The new PED was created!!") else outputChatBox ( "Failed to create the new PED!") end end end addEventHandler ( "loopCjSnake", getRootElement(), cjSnake ) When I upgrade the server I don't get any errors, but when I try to enter a marker after the first ped has been attached, I get these errors: WARNING: blahblah\cjSnake.lua:60: Bad argument @ getElementPositionWARNING: blahblah\cjSnake.lua:67: Bad argument @ setElementPosition WARNING: blahblah\cjSnake.lua:68: Bad argument @ attachElements Link to comment
Castillo Posted June 16, 2011 Share Posted June 16, 2011 Here (tested). local snakeAppels = { {-720,961,11}, {-705,968,11}, {-698,954,11}, {-711,960,11}, {-722,950,11}, {-720,977,11}, {-687,965,11}, {-678,949,11}, {-664,951,11}, {-711,942,11} } peds = {} -- cjSnake Marker & ColShape controller (Should only fire ONCE) -- function cjFirstSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelFirstHit ) end -- cjSnake Marker & ColShape controller (Should fire after the first PED is attached to CJ(thePlayer)) -- function cjSnake (thePlayer, command) local rX, rY, rZ = unpack(snakeAppels[math.random(#snakeAppels)]) theAppleMarker = createMarker ( rX, rY, rZ, "cylinder", 1.5, 255, 255, 0, 170 ) theAppleMarkerCol = createColCircle ( rX, rY, 3.0) appleBlip = createBlipAttachedTo ( theAppleMarker, 56 ) addEventHandler ( "onColShapeHit", theAppleMarkerCol, appelHit ) end addCommandHandler("cj-snake", cjFirstSnake) -- Should only fire ONCE! -- function appelFirstHit ( thePlayer ) local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) local pX, pY, pZ = getElementPosition( thePlayer ) local prX, prY, prZ = getElementRotation( thePlayer ) newPed1 = createPed ( 0, pX + 1, pY, pZ, prZ ) if(detection) then outputChatBox( "You found the APPLE and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) attachElements ( newPed1, thePlayer, 0, -0.2, 0) triggerEvent ( "loopCjSnake", getRootElement(), "" ) end end -- Should fire after the first PED is attached to CJ(thePlayer) -- function appelHit ( thePlayer ) if getElementType(thePlayer) ~= "player" then return end local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) local newPed = #peds +1 peds[newPed] = createPed ( 0, 0, 0, 0, 0 ) local npX, npY, npZ = getElementPosition (peds[newPed]) if(detection) then -- outputChatBox( "You found the apple and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) setElementPosition ( peds[newPed], npX, npY + 0.1, npZ ) attachElements ( peds[newPed], newPed1, npX, npY + 0.1, npZ) triggerEvent ( "loopCjSnake", getRootElement(), thePlayer ) if(peds[newPed]) then outputChatBox ( "The new PED was created!") else outputChatBox ( "Failed to create the new PED!") end end end addEvent ( "loopCjSnake", true ) addEventHandler ( "loopCjSnake", getRootElement(), cjSnake ) This creates one CJ ped every time I hit one of these 'apple' marker. Link to comment
unknooooown Posted June 16, 2011 Author Share Posted June 16, 2011 Thank you both. - Now that we have them stored in the table, how would I be able to have each newPed spawn behind the latest? Right now, they still spawn ontop of eachother, which is wrong. What I am looking for is to create a "Cj tail" behind the player, as any snakegame does I have tried a few things myself, but when I add some offset to the newPed, its the same offset for all the newPeds created. Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 attachElements ( peds[newPed], peds[#peds - 1], npX, npY + 0.1, npZ) Try it. Link to comment
unknooooown Posted June 16, 2011 Author Share Posted June 16, 2011 Bad argument on Line 68. I am getting more and more confused at this point. Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 Is it the line with the attachElements or another one. Link to comment
JR10 Posted June 16, 2011 Share Posted June 16, 2011 (edited) local lastPed = #peds - 1 attachElements ( peds[newPed], peds[lastPed], npX, npY + 0.1, npZ) Try this or try this: function appelHit ( thePlayer ) if getElementType(thePlayer) ~= "player" then return end local detection = isElementWithinColShape ( thePlayer, theAppleMarkerCol ) local randomMoney = math.random(50,500) local lastPed = #peds local newPed = #peds +1 peds[newPed] = createPed ( 0, 0, 0, 0, 0 ) local npX, npY, npZ = getElementPosition (peds[newPed]) if(detection) then -- outputChatBox( "You found the apple and got $" ..randomMoney ) givePlayerMoney ( thePlayer, randomMoney ) destroyElement ( theAppleMarkerCol ) destroyElement ( theAppleMarker ) destroyElement ( appleBlip ) setElementPosition ( peds[newPed], npX, npY + 0.1, npZ ) attachElements ( peds[newPed], newPed1, npX, npY + 0.1, npZ) triggerEvent ( "loopCjSnake", getRootElement(), thePlayer ) if(peds[newPed]) then outputChatBox ( "The new PED was created!") else outputChatBox ( "Failed to create the new PED!") end end end Edited June 16, 2011 by Guest Link to comment
unknooooown Posted June 16, 2011 Author Share Posted June 16, 2011 (edited) If we use: attachElements ( peds[newPed], peds[#peds - 1], npX, npY + 0.1, npZ) There is really no way for the peds[newPed] to know that it should be attached to newPed1 is there? Also tested: local lastPed = #peds - 1 attachElements ( peds[newPed], peds[lastPed], npX, npY + 0.1, npZ) But I still get the bad argument. Think thats the same problem as I asked above. Edited June 16, 2011 by Guest Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now