Funny135 Posted June 12, 2011 Share Posted June 12, 2011 Hello guys, if you can help, help ... I am the main admin server SAS: RPG. I'm not very good scripters, and I need help I wanted to create a gate that will open the skin definitions ... how to do this? pliz write a script, I'll be very grateful Link to comment
Castillo Posted June 12, 2011 Share Posted June 12, 2011 Well, in this forum we don't give out the code, we help you to fix your errors/search them, so you should try to do it by yourself first then come here and ask (with your code of coruse). Functions & Events that you'll need for this: createObject createMarker getElementModel onMarkerHit moveObject There's also the colshape functions instead of markers: https://wiki.multitheftauto.com/wiki/Ser ... _functions Good luck. Link to comment
Funny135 Posted June 12, 2011 Author Share Posted June 12, 2011 puerta = createObject (3000,2313.6872558594, -1221.4028320313, 23.098985671997, 0, 0, 90) function openGate (hitPlayer,matchingDimesion) local skin = getElementModel (hitPlayer) if (getDistanceBetweenPoints3D ( x,y,z, 2309,-1218,24 ) > 7 ) then ((getDistanceBetweenPoints3D ( x,y,z, 2309,-1218,24 ))) if skin == 217 then moveObject (puerta,3000,2313.6872558594, -1221.4028320313, 23.098985671997, 0, 0, 90) else killPed (hitPlayer) end end function closeGate (hitPlayer,matchingDimesion) if (getDistanceBetweenPoints3D ( x,y,z, 2309,-1218,24 ) < 7 ) then ((getDistanceBetweenPoints3D ( x,y,z, 2309,-1218,24 ))) if skin == 217 then moveObject (puerta,3000,2313.6872558594, -1221.4028320313, 23.098985671997, 0, 0, 90) end where my error ?? Link to comment
Castillo Posted June 12, 2011 Share Posted June 12, 2011 This code makes no sense, you didn't read the links I gave you, right? Link to comment
Peacemaker Posted June 13, 2011 Share Posted June 13, 2011 You forgot to createMarker, and addEventHandler("onMarkerHit",markername,functionname) and for x,y,z use local x,y,z = getElementPosition(player). There is end missing for function This code makes no sense, you didn't read the links I gave you, right? lol stop frustating, if u don't know then just tell him that you don't know. This section is to help people not giving link to mtasa wiki. This code makes sense if you have your common sense. Link to comment
CowTurbo Posted June 13, 2011 Share Posted June 13, 2011 local myMarkers = {} myMarkers[1] = createMarker( 2313.6872558594, -1221.4028320313, 22.098985671997, 'cylinder', 5.0, 255, 0, 0, 150 ) puerta = createObject (3000,2313.6872558594, -1221.4028320313, 23.098985671997, 0, 0, 90) function MarkerHit( hitElement, matchingDimension ) for index,markers in pairs(myMarkers) do if (source == markers) then if ( getElementModel ( hitElement ) == 217 ) then moveObject (puerta,3000,2313.6872558594, -1221.4028320313, 23.098985671997, 0, 0, 90) else outputChatBox ( "* ERROR: Your skin isnt 217!", hitElement, 255,0,0 ) end end end end addEventHandler( "onMarkerHit", getRootElement(), MarkerHit ) function MarkerLeave( hitElement, matchingDimension ) for index,markers in pairs(myMarkers) do if (source == markers) then if ( getElementModel ( hitElement ) == 217 ) then moveObject (puerta,3000,2313.6872558594, -1221.4028320313, 23.098985671997, 0, 0, 90) else outputChatBox ( "* ERROR: Your skin isnt 217!", hitElement, 255,0,0 ) end end end end addEventHandler( "onMarkerLeave", getRootElement(), MarkerLeave)) i was just bored.... should work, not tested Link to comment
Peacemaker Posted June 13, 2011 Share Posted June 13, 2011 Nice help cowturbo, atleast you didn't wrote nonsense like castillo Link to comment
CowTurbo Posted June 13, 2011 Share Posted June 13, 2011 lol, cast was trying to make him learn ,.. but, yeah, doesnt matter Link to comment
Castillo Posted June 13, 2011 Share Posted June 13, 2011 Peacemaker, I don't know who you are or what you have againts me, but you are pissing me off badly, I help them to learn. Link to comment
Jaysds1 Posted June 13, 2011 Share Posted June 13, 2011 Peacemaker, Did you ever tried the Left4Dead Server? If you didn't, TRY IT NOW!!!. If you did, then let me ask you something, CAN U MAKE A BETTER SERVER? Link to comment
will briggs Posted June 13, 2011 Share Posted June 13, 2011 Peacemaker, Its a little of topic, but i think the only reason your against castillo is that ur in the CIT Server, He's in the SANL server, (rival servers) Lay off him dude, he's helping... plus SANL generally rules and isnt a rip off server like urs... Link to comment
Castillo Posted June 13, 2011 Share Posted June 13, 2011 I'm not 100% if he's a real CIT member, Arran(CIT owner) said in another topic that he's not from CIT, but he could be lying of course, since I don't remember when this 'Peacemaker' appeared, if I would know the EXACT date it would mean that CIT sent him to piss me off because of joining to SANL. Link to comment
Peacemaker Posted June 14, 2011 Share Posted June 14, 2011 I'm not 100% if he's a real CIT member, Arran(CIT owner) said in another topic that he's not from CIT, but he could be lying of course, since I don't remember when this 'Peacemaker' appeared, if I would know the EXACT date it would mean that CIT sent him to piss me off because of joining to SANL. lol u r just jealous of CIT because we get players and SANL don't. SANL is just a rip-off of SAES. We have the best script and scripters of MTA and so we get players. SANL have scripters like u who are just in for admin rights. Link to comment
Castillo Posted June 14, 2011 Share Posted June 14, 2011 So, Arran sent you to piss me off, right? so inmature I can say...... and... if SANL is a rip-off from SAES, what is CIT? a rip-off from SAES too because most of the scripts are EXACTLY the same. Link to comment
JR10 Posted June 14, 2011 Share Posted June 14, 2011 (edited) I don't think that this should happen , Peacemaker you should stfu. Wether SANL or CIT get more players it doesn't matter. Castillo is just the most active member in this forum he always helps anyone , but like any one would say we dont give out the code you must try , and yes your code makes no sense. Btw if you got the best script and scripters what are you doing here ? Why you are here asking for help?? weird huh? Edited June 14, 2011 by Guest Link to comment
SDK Posted June 14, 2011 Share Posted June 14, 2011 Castillo, he is a troll. Ignore him. Link to comment
JR10 Posted June 14, 2011 Share Posted June 14, 2011 Functions & Events that you'll need for this:There's also the colshape functions instead of markers: Good luck. As you can see he have nothing against you even though you are in CIT Link to comment
Castillo Posted June 14, 2011 Share Posted June 14, 2011 Jaysd1, what are you saying? you are the one that keep's posting stuff like: "OK", "Ya", "You are right", etc, etc. Link to comment
will briggs Posted June 14, 2011 Share Posted June 14, 2011 Castillo has a point, you cant just have 1 RPG server (SAES) You need others, and if you count other rpg servers as Copies then you have somthing wrong with your head, Plus your obvs jealous or you wouldnt keep on replying. You would just take to interest.... Link to comment
meDennis Posted June 18, 2011 Share Posted June 18, 2011 So, Arran sent you to piss me off, right? so inmature I can say...... and... if SANL is a rip-off from SAES, what is CIT? a rip-off from SAES too because most of the scripts are EXACTLY the same. I can assure you that Peacemaker is NOT a CIT member. Once I found out what his serial was he was banned by our staff so he does not even play on our server, he is just pretending to be one and is causing flame wars between SANL and CIT. Link to comment
will briggs Posted June 18, 2011 Share Posted June 18, 2011 Thanks for banning him of CIT, and i belive he is banned of this forum now, Not really a peacemaker. More like a BullSh*tingTroubleCauser... 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