Jump to content

How create this script?


VeTaL

Recommended Posts

Posted

i am want this script for my rpg server, but idk how made this, who can help me?

Bro I think here no one will make that for you, because people already are very busy on their projects, and well its the rulles you see? first you need to do something, and then show to us, and people will help more!

But I can give you some ideas.

I think you need to use:

https://wiki.multitheftauto.com/wiki/CreateProjectile

And on hit of projectile you make a explosion with

https://wiki.multitheftauto.com/wiki/CreateExplosion

Well I am not that such a pro, but I think you can make that way.

Sorry if I am not right :S

By the way, if you are new to lua I advice you to read this:

https://wiki.multitheftauto.com/wiki/Scr ... troduction

From here you can have a quickly introduce to lua on mta, and will start to learn how this works :)

If you wanna go more deep, learn scripting guis, those windows you know? here is the tutorial:

https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI

I guess its everything ,

Good luck bro ;)

Posted

Vetal, here we don't give out scripts like that, we try to help you, we explain how things works, and for that is the wiki, there's where you should look at when you don't understand a function, i.e a event.

  • MTA Team
Posted

It's very simple (for me atleast)

  
createObject() 
attachElements() 
guiGetScreenSize() 
triggerServerEvent() 
triggerClientEvent() 
addEvent() 
addEventHandler() 
createProjectile() 
  

Posted

I am noob in scripting, and don't want know all in this, but i am want this script in server, and i think all admins will like that...

and i have 1 question, how made the time start script || i am want, what zombie going after 18:00 to server time, and all zombie die in 6:00 :P

=====

sry for bad english((

i am russian

Posted

=_=

oh, made this script for all, not for only me, i think...not, im know, many people want this scripts, but all scripters very miser and don't want made this for all people, all like money =_\\

Posted

I don't know what is miser, but well, as you may know, we're busy here.

P.S: We don't like to help someone who doesn't want to learn.

  • MTA Team
Posted

This is not a ;o russian forum, go to the subforums to speak this .. russian language.

  • 2 weeks later...
Posted

Try this =D

SERVER SIDE

car = createVehicle( 600, 0, 0, 2 ) 
setElementData(car,"rocket",true) 
object = createObject(3884, 2530.621, -1715.385, 12.489) 
attachElements(object, car, 0,-1.8,-0.5) 
  
function bindKeyStartFire() 
bindKey(source,"i","down",rocketfire) 
end 
addEventHandler("onPlayerJoin", getRootElement(),bindKeyStartFire) 
  
function rocketfire(source) 
 if isPedInVehicle(source) then 
  local vehicle = getPedOccupiedVehicle(source) 
  if getElementData(vehicle,"rocket") == true then 
   if getVehicleController(vehicle) == source then 
    local x,y,z = getElementPosition(vehicle) 
    local rx,ry,rz = getVehicleRotation(vehicle)     
      triggerClientEvent("fireRocket", getRootElement(), source, x, y, z, rz,vehicle)  
     end 
   end   
  end  
 end 

Client side!

function fireRocket(source,x, y, z, rz,vehicle) 
if source == getLocalPlayer() then 
 createProjectile(source, 19, x, y-1, z+3, 900, nil, 0,-15,-(rz+180),0,0,0) 
  createProjectile(source, 19, x, y+1, z+3, 900, nil, 0,-15,-(rz+180),0,0,0) 
 car = vehicle 
  
end 
end 
addEvent("fireRocket", true) 
addEventHandler("fireRocket", getRootElement(), fireRocket) 
  

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