Jump to content

I need a helpwith somethong.


Clydian

Recommended Posts

Hello everyone, so i want to lear the MTA scripting for a while now. All i've been doing is edit scripts so far.

So i thought, maybe i should try to make something easy. So i had an idea. an someone point me thr right way, to start make a script, where i can buy a property, the property gives player money each five minutes. Then the player can sell it, or if player quits, it sells automaticly. I thought it would be fun making it. Any idead where to start? I Also would like to make armor pickups randomly around San Andreas.

Link to comment

Start here:

https://wiki.multitheftauto.com/wiki/Scripting_Introduction

Also take a look at these functions:

setTimer, getPlayerMoney, setPlayerMoney, createMarker

Try how they work and figure out how to put them together and what else you'll need.

GUI would maybe be too hard for you yet, so try using just commands now (addCommandHandler). :)

Don't forget to save your property locations to table, XML, SQL or MySQL.

For saving property ownership use XML, SQL, MySQL or account data.

EDIT: Sorry, I didn't read it properly. If you want it to automatically sell after player's disconnect, then you don't need to save it to external file or something like that, just use tables. :)

Also don't forget to look at these events: onPlayerQuit, onMarkerHit

Link to comment
Start here:

https://wiki.multitheftauto.com/wiki/Scripting_Introduction

Also take a look at these functions:

setTimer, getPlayerMoney, setPlayerMoney, createMarker

Try how they work and figure out how to put them together and what else you'll need.

GUI would maybe be too hard for you yet, so try using just commands now (addCommandHandler). :)

Don't forget to save your property locations to table, XML, SQL or MySQL.

For saving property ownership use XML, SQL, MySQL or account data.

EDIT: Sorry, I didn't read it properly. If you want it to automatically sell after player's disconnect, then you don't need to save it to external file or something like that, just use tables. :)

Also don't forget to look at these events: onPlayerQuit, onMarkerHit

Big thanks to you man, Will take a look at all those things. And one more, should i make an mysql database for the server, or its not needed at all?

Link to comment
Big thanks to you man, Will take a look at all those things.

No problem. :)

And one more, should i make an mysql database for the server, or its not needed at all?

It's not needed, it really depends on you. If you want to (for example) save user's data (money, skin, position, etc.) so they'll got them back, when they login (even after server restart), you can use account data or rather MySQL. :)

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