Jump to content

MTA map editor


Fantanic

Recommended Posts

  jonas13362 said:
still need help + i got another question

Is it posible to place a car locked to certain users?

+ is it posible to have a resource that does a command every 15 minutes or so?

I don't know about your map editor and for your excess questions:

1) Yes it is, add a check to see which player is "trying" to enter the vehicle using the event:

onVehicleStartEnter 

for example:

  
function myFunc() 
     if (not getElementData(source, "Occupation") == "Criminal") then 
          outputChatBox("You cannot enter this vehicle, unless you're a criminal", source, 255, 0, 0) 
          return 
     end 
end 
addEventHandler("onVehicleStartEnter", root, myFunc) 
  

2) Using setTimer, yes you can.

setTimer(thingyouwanttocallhere, 900000, howmanytimesyouwanttocallit) 

-- if 1000 = 1 second then 1000*60=1minute, ans*15=15 mins.

Link to comment
  jonas13362 said:
Thank you , i will test it out now.

Edit : i tried it and im getting an error : Warning loading script failed (the respawnscript) : unexpected symbol near ','

I defined "plr" and re-wrote the check to see if the player is not a criminal to be able to enter any vehicle. You can simply change the occupation or change the check, here:

function myFunc(plr) 
     if (getElementData(plr, "Occupation") == "Criminal") then 
          outputChatBox("You cannot enter this vehicle as a criminal", plr, 255, 0, 0) 
          cancelEvent() 
          return 
     end 
end 
addEventHandler("onVehicleStartEnter", root, myFunc) 
  

Link to comment
  jonas13362 said:
I was talking about the 'set timer' thingy.

Anyways about the lock function , doesnt there need to be a car in it?

Unless you want to define it, such as: local vehicle = getPedOccupiedVehicle(localPlayer), then: if (vehicle == "vehicleModel") then. Else this function goes to every single vehicle.

For setTimer it should look like this: setTimer(function, 90000, 1)

Link to comment
  jonas13362 said:
  Ab-47 said:
  jonas13362 said:
Getting another error : '(' expected near ','

Can you please show me the script you're trying to make, where the actual expected bad argument is, thanks.

I will send u the script in pm.

Thats why lol, you were meant to call the function by it's name, replacing "function" in "setTimer(function, 90000, 1)"

What do you want to call? If the respawn script, use

setTimer(respawn, 90000, 1) 

or if it's the check empty function you want to call then:

setTimer(checkEmpty, 90000, 1) 

Link to comment
  Quote

Thats why lol, you were meant to call the function by it's name, replacing "function" in "setTimer(function, 90000, 1)"

What do you want to call? If the respawn script, use

setTimer(respawn, 90000, 1) 

or if it's the check empty function you want to call then:

setTimer(checkEmpty, 90000, 1) 

another error : unexpected symbol near ','

Link to comment

will send tommorow the script here ,

EDIT : its fixed. I rewrite it and now it worked.

All things working , expect locks didnt rlly get it. (maybe i gonna donate for this)

Map Editor doesnt work still. Havent had any responds on it.

So this topic CAN be closed.

Link to comment

First of, it's not 'your' thread you don't decide on it to be closed or not. You're a topic starter. It's better to leave it open if people have similar questions in the future they can find their answers in this topic and reply on it if necessary.

Second, I have a mapping server of my own. What exactly is the error you are getting? Try to delete the editor_dump and editor_test folders in this directory: MTASA\server\mods\deathmatch\resources. Then restart the server or write in the console without the quotation marks: "refresh" and press enter, then write "restart editor" press enter, if it's still bugging try "restart server" again.

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