Jump to content

Help me pls


Funny135

Recommended Posts

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

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

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

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
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

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
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

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 by Guest
Link to comment
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...