triplesnake Posted September 3, 2011 Share Posted September 3, 2011 {lua/code]local marker = createMarker ( x, y, z, "cylinder", 1.5, 255, 255, 0, 170 ) local blip = createBlip ( x, y, z, icon=33, int size=2, r=255, int g=15, b=75, a=255, ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] local ped = createPed local pname = getPlayerFromName("x-Racer") i get an error on debug in second line it says ) expexted near "=" Link to comment
Castillo Posted September 3, 2011 Share Posted September 3, 2011 (edited) Firstly, try not to create two topics with the same question. local marker = createMarker ( x, y, z, "cylinder", 1.5, 255, 255, 0, 170 ) local blip = createBlip ( x, y, z, 33, 2, 255, 15, 75, 255, 0, 99999.0, getRootElement()) local ped = createPed( skin, x, y, z ) local pname = getPlayerFromName("x-Racer") Edited September 3, 2011 by Guest Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 thank you and sorry for making two topics Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 soto get the name of the player who hits the marker i do like function onPedHitMarker(getPlayerFromName(thePlayer)) and like onPedHitmarker(givevehcile,id) ?? Link to comment
Castillo Posted September 3, 2011 Share Posted September 3, 2011 No, to get a player name you do getPlayerName(playerElement). getPlayerFromName returns a player element from a player name. Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 i still get that error ) expexted near "=" on second line and btw is onPedHitMarker(giveVehicle,341) correct? Link to comment
Castillo Posted September 3, 2011 Share Posted September 3, 2011 Copy the code again, I forgot something. P.S: What are you trying to achieve? Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 i am trying to make 2 things First:this one is for dragracing its like a small gamemode in fr and and i downloaded that manuel gearbox (still sort of hard since i am still learning) Second:destuction derby its mostly like a ring only and there is a marker that warp you and give u a car so its sort of still based on the first one Link to comment
Castillo Posted September 3, 2011 Share Posted September 3, 2011 addEventHandler("onMarkerHit",marker, function (hitElement, matchingDim) if isPedInVehicle(hitElement) then return end if not matchingDim then return end local vehicle = createVehicle(411, x, y, z) warpPedIntoVehicle(hitElement, vehicle) end) Change x, y, z to the position where you want the vehicle to be created. Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 thank you a lot i really appreciate it bec learning is sort of hard but u are helping me in it Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 local marker = createMarker ( 0, 0, 2, "cylinder", 1.5, 255, 255, 0, 170 ) local blip = createBlip ( 0, 0, 7, 33, 2, 255, 15, 75, 255, 0, 99999.0, getRootElement()) local ped = createPed( 29, 4, 4, 7 ) local pname = getPlayerFromName("x-Racer") doorcreateObject(doorid, x, y, z not sure about rotation) addEventHandler("onMarkerHit",marker, function (hitElement, matchingDim) if isPedInVehicle(hitElement) then return end if not matchingDim then return end local vehicle = createVehicle(411, 2, 2, 14) warpPedIntoVehicle(hitElement, vehicle) setTimer (moveObject(door, x, y ,z),3000) end) thats supposed to make a door and make it move when a player hit the marker right or is it all messsed up P.S:i know this is prob asking for too much but i like get lost in wiki pages so can u help me like send me a page or two link everyday in orded i need to learn it in pm or something like that it would be great help but i know u prob dont ahve time for that but i will really appreciate it Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 sorry because i ask about lots of stuff Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 local marker = createMarker ( 0, 0, 2, "cylinder", 1.5, 255, 255, 0, 170 ) local blip = createBlip ( 0, 0, 7, 33, 2, 255, 15, 75, 255, 0, 99999.0, getRootElement()) local ped = createPed( 29, 4, 4, 7 ) --local door = createObject(doorid, x, y, z not sure about rotation) addEventHandler("onMarkerHit",marker, function (hitElement, matchingDim) if getElementType ( hitElement ) ~= "player" then return end if isPedInVehicle(hitElement) then return end if not matchingDim then return end local vehicle = createVehicle(411, 2, 2, 14) warpPedIntoVehicle(hitElement, vehicle) setTimer (moveObject , 3000 , 1 , door, x, y ,z) end) EDIT: don't double post, edit your post instead. EDIT: where is doorid defined? And createObject is fucked up, you are not commenting it. Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 i can edit the codes too???? and thank you guys that was great help EDIT: errmmm i dunno how to make the object rotation an ermmm its not supposed to be up? where is it supposed to be? Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 Of course you can edit it. You welcome. Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 quote so its not suppoed to be up? "--local door = createObject(doorid, x, y, z not sure about rotation)" and for rotation i do like createObject(doorid, x, y, z, 0, 0, 90) is that right? i feel its missing something in the middle Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 I commented it because, it's not correct. doorid is not defined, in the posZ argument, "not sure about rotation", so... Do you expect the script, to find the doorID itself? Specify it, and the x,y,z Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 yes i am still looking for that moving gate id it looks cool and about x y z i am making the pos later but how to make rotations is it like how i wrote above of is it wrong Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 What you wrote above, is correct. You can specify the rotation, after the position. Link to comment
triplesnake Posted September 3, 2011 Author Share Posted September 3, 2011 thx again and sorry for wasting your time you and solidsnake are really awesome 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