Jump to content

Help me pls


Funny135

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted
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

Posted

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?

Posted

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

Posted

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.

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

Posted

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.

Posted (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 by Guest
Posted
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

Posted

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

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

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