Vehicle Tickets [idea need some help & explain]
#1

hej there.
i was currently looking to make a vehicle ticket system.
What i mean by vehicle ticket system ? well its just simple as in real life a cop can put the ticket on vehicle's window.
Now the problem is that i dont really know where to start, i have an mysql version of gamemode and i was thinking to make a new table for these tickets instant of making it at vehicle.
Can someone help me out to know what Table should i create for example Name Ticket amount or smth.Ty
Reply
#2

You can make a table saving the Name, Amount and getting the car that you are going to put the ticket. It's a bit tricky to get the car and say that this car has a ticket in it. For example I am not sure, but you can loop through all the vehicles on the server and say if they have a ticket.
Reply
#3

Hey, there.

I would start with the mysql database and try and come up with ideas on what you would like to implement.

Код:
- prefix_VehicleTickets
    - ticket_id (int, auto_increment) ( the initial id identifier )
    - ticket_owner (int) ( the player who has received the ticket, Account ID )
    - ticket_issuer (int) ( the officer that issued the ticket )
    - ticket_amount (int) ( the price the ticket was issued for )
    - ticket_expiry (int) ( contains the time() function + amount of added days )
    - ticket_paid (int) ( has the ticket been paid?  )
    - ticket_info (varchar, 128) ( contains extra information like, vehicle, location, what the violation was for, etc )
How I would go about doing this, so lets start off with the officer writing the ticket so he targets a player and does something like /ticket [playerid/name] and lets say he chooses from a menu that you created with a list of offenses, so after he has chosen the offense, he can then enter in a valid charge amount and continue with the process.

Now for the backend, I would probably detect if the player was in a vehicle and get the model and color ( more description is the best ) and the location of the players position, of course you would skip the vehicle step if they are on foot. Now once the ticket has been updated in game and saved in the db, what can happen is every time the player enters that vehicle ( or logs in ) he will be notified that he has an outstanding fine to pay.

Now this is where the time from the table comes in, if the player was not to pay the fine within a certain time, then you could increase the fine amount and issue an arrest warrant for them, if your really going for some good RP, you could even implement a Bounty Hunter class and have them chase down people who do no pay fines.

If you want anymore suggestions I am happy to provide.
Reply
#4

Thank you both for replying.
@azz
You helped me alot with your expain , i think that is all i need thank you.

Repped both.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)