SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Gamemode Scripts

Reply
 
Thread Tools Display Modes
Old 01/02/2015, 09:04 PM   #5521
malaka
Huge Clucker
 
malaka's Avatar
 
Join Date: Dec 2010
Location: San Andreas ................................... Status: Retired
Posts: 295
Reputation: 35
Default AW: Re: PPC_Trucking V1

Quote:
Originally Posted by PowerPC603 View Post
Unfortunately, he'll also die when the player wants to choose another class using /reclass.[...]
You could check that by making an exception for /reclass. To give the hospital stuff more sense, let the player go there and choose from a menu to change their skin (class) instead of using a simple command - much better gaming experience.

Quote:
Originally Posted by PowerPC603 View Post
[...]
If the medical fee for dying should be based on their money, then the health-restore fee should also be based on their money, otherwise rich players also can afford it more easily when they want to restore their health by picking up the pickup at the hospital.
[...]
Yep, this is a good point. But there should also be limits. And if you want to let the idea of a working economy grow up, add some things like taxes to the script.
For example, make it possible for people to own gas stations and set their own prices for it. The goverment (system) could add taxes to the prices (percentage). And the taxes would go into the public pot. x) You could also collect wealth taxes from very rich people who own a certain amount of money. Then you could use this money for things that helps everyone. Also for nice and popular things like lotto draw. x)

Quote:
Originally Posted by PowerPC603 View Post
[...]
I've got it already in place.
When the player dies, his "PayMedicalFee" variable is set to true and it's also saved in the database.
The variable is also loaded from the database when they login.
[...]
Awesome.


Quote:
Originally Posted by PowerPC603 View Post
[...]
Later on, I could add a command which would allow you to buy medical kits at hospitals when you're standing on the pickup.
I don't have an inventory system yet, so I can't add that yet.
The inventory system would be a huge improvement so that you could also keep keys in there and give it to other player.
malaka is offline   Reply With Quote
Old 01/02/2015, 10:41 PM   #5522
PowerPC603
High-roller
 
Join Date: Nov 2010
Location: Belgium
Posts: 1,740
Reputation: 238
Default Re: AW: Re: PPC_Trucking V1

Quote:
Originally Posted by malaka View Post
You could check that by making an exception for /reclass. To give the hospital stuff more sense, let the player go there and choose from a menu to change their skin (class) instead of using a simple command - much better gaming experience.



Yep, this is a good point. But there should also be limits. And if you want to let the idea of a working economy grow up, add some things like taxes to the script.
For example, make it possible for people to own gas stations and set their own prices for it. The goverment (system) could add taxes to the prices (percentage). And the taxes would go into the public pot. x) You could also collect wealth taxes from very rich people who own a certain amount of money. Then you could use this money for things that helps everyone. Also for nice and popular things like lotto draw. x)



Awesome.




The inventory system would be a huge improvement so that you could also keep keys in there and give it to other player.
1)
Go where to change their class?
At the hospital?
A simple menu to change their class would also make the entire class-selection screen useless.

2)
To make gas-stations ownable, I'll have to rewrite the gas-stations again.
People would immediately go for the gas-stations at airports because planes consume the most fuel and they will be rich in no-time. And they would set ridiculous prices for fuel.

But taxes for fuel to go in a public pot would be a good idea.
Also taxes for players who own a house could go in that pot. Perhaps 1% of the value of the house needs to be paid by the owner every day or every week as tax, to be able to keep the house.
If he can't afford it anymore, the house should automatically become available again to be bought by other players (or through some sort of auction-system for bankrupt players).

Even taxes for companies (probably based on the level of the company) could go in there.
Companies would earn money when members do company-jobs and a small part of this money automatically goes into the public pot as taxes.
Like players doing a job for $1000. The player would earn 80% of this ($800) for himself and $200 goes to the company.
But the taxes substract say 5% of this money as taxes, so the company only earns $190 because $10 goes to the public pot.

Also the price you pay for your fines could go in there.

And eventually players could join the lottery and earn some of this money back when they win.


3)
Which keys do you mean?



I guess I need a bigger database-table for serversettings, because of all the options.
__________________
Gamemode: PPC_Trucking
Extras-file (for PPC_Trucking): /delproperty, /evict, /propertyid, /porthouse, /portbus, /properties
------------------------------------------------------------------------------------
PPC-Trucking-V2 (home-hosted, only open on occasion for testing purposes): ppctruckingv2.no-ip.info:7777
******* channel: https://www.*******.com/channel/UC-4...Mpglma8f0Ld-YQ
------------------------------------------------------------------------------------
Filterscripts: PPC_Speedometer - PPC_Housing - PPC_Business
PowerPC603 is offline   Reply With Quote
Old 01/02/2015, 11:22 PM   #5523
malaka
Huge Clucker
 
malaka's Avatar
 
Join Date: Dec 2010
Location: San Andreas ................................... Status: Retired
Posts: 295
Reputation: 35
Default AW: Re: AW: Re: PPC_Trucking V1

@PowerPC603

1) Yes, they could go to the hospital to change their class instead using a command. The class selection menu stays as it is. For that, you could also disable the option to use F4 (with variables again ).

2.1) But this is the market economy. You could set a limit here as well. You could also let people buy gas cans from gas stations to refuel their vehicle while they are working or just driving / flying around.

2.2) Great idea. The richter the player is, the more he has to pay (without limits). And everything than can be calculated (houses, business, money etc.) should be calculated to determine his very own tax rate. I would just make the house available to everyone if the owner can't afford it or if he didn't join the server for a long time like 1 month or so. You could also allow people to go in debt so they can borrow money from the bank and if they can't pay it back (with interest ), the bank can take over ownership the house / business of the player and sell it to other players. While talking about interest, the banking system could also give interest of the money that people have on their bank account - paid by public pot. In return, the bank can take the money to give loans. x)

2.3) Player who buy goods from the busines pay a tax and the business owner itself pays taxes (see above). This is just like it is in real life. x)

2.4)
  • Medical fees
  • Fines
  • Taxes on goods
  • Taxes for houses
  • Taxes for business
  • ... to be continued

Lotto system should be standalone where player buy a lotto number and everyone pays 1000$ or so for it. But the "goverment" could put some cash into the lotto as well, yea.

3) For vehicles, houses, businesses etc.

Yea, first make it very simple and nice. You can always add those things later on. If we continue to discuss like that, we can fill the whole WikiPedia.
malaka is offline   Reply With Quote
Old 02/02/2015, 11:36 AM   #5524
PowerPC603
High-roller
 
Join Date: Nov 2010
Location: Belgium
Posts: 1,740
Reputation: 238
Default Re: PPC_Trucking V1

Since you said to make gas-stations ownable, I was thinking about hospitals, police stations and ammunations as well.

Perhaps it would be better to turn them all into companies, which players can buy and invite new members.

For gas-stations, everyone who refuels their vehicle will pay for the fuel, but the money won't simply disappear.
If the gas-station isn't owned, it belongs to the government and the total payment (including tax) goes into the public pot.
If the gas-station is owned, the payment goes into the funds of the company and the tax from that money goes into the public pot.

For police-stations, the same applies when players pay their fines or when they're jailed.
For non-owned police-stations, the entire payment (fines, tickets and penalty-payment for jail) go to the public pot.
For owned police stations, the payment (fines, tickets and jail) goes to the company.

Hospitals also get the payment when they're owned.
Even when players buy medical packs at the entrance, the money from those packs also goes into the company's funds.

And of course ammunation would work the same way.
But they would work differently.
When an ammunation isn't owned, nobody can buy weapons.
When someone buys it, it becomes a level 1 company and only melee weapons will be for sale.
Players will need to work together to level the ammunation company and unlock better weapons.
The minigun would only be for sale when it reaches level 10.
And for every sold weapon, the company earns cash and experience.


Of course, since those properties become companies, they would get their own company-jobs as well.

So players can work for their gas-station and transport fuel around, even to refuel houses for the central heating system (if I would take it that far).
And the cost for refuelling is dependant on the level of the company.
So players who want to refuel their vehicle pay different prices at each gas-station and may want to seek out the cheapest gas-company to refuel their vehicle.

Players working for hospitals would need to transport injured people to the hospital to earn money and company-experience.
The higher level a hospital is, the higher anyone restoring their health would need to pay.

The same would apply for police stations.
Players working for these will need to catch criminals to earn experience to level up their company.
And the higher the level of the police station, the more speeders should pay when they are caught by speedcams.
Speedcams would need to be written in such a manner that they link to the closest police-station to determine the fine of the speeder, which will then be based on the nearest police-station's level.
So speedcams automatically adjust their fine as well, making the entire system dynamic.
This in fact creates police-zones, where the nearest police-station decides how high the fine will be in that area for speeding.

The fun part is that players make it dynamic themselves by leveling police-stations.

And ammunations would need to transport weapons around (pick them up at ammunation and bring them to some special locations).

Players decide for themselves if they want weapons or not by buying and leveling ammunations, except when the admin deletes them all, then nobody would have weapons.



In the end, it's all up to the players themselves to decide how cheap/expensive they wanna make their gameplay.
If nobody buys gas-stations, refuelling vehicles will stay cheap.
If all gas-stations are sold out and they're all leveled to max, refuelling will be expensive.

The same goes for restoring health (hospitals) and getting fined for speeding (police-stations).
__________________
Gamemode: PPC_Trucking
Extras-file (for PPC_Trucking): /delproperty, /evict, /propertyid, /porthouse, /portbus, /properties
------------------------------------------------------------------------------------
PPC-Trucking-V2 (home-hosted, only open on occasion for testing purposes): ppctruckingv2.no-ip.info:7777
******* channel: https://www.*******.com/channel/UC-4...Mpglma8f0Ld-YQ
------------------------------------------------------------------------------------
Filterscripts: PPC_Speedometer - PPC_Housing - PPC_Business

Last edited by PowerPC603; 02/02/2015 at 01:50 PM.
PowerPC603 is offline   Reply With Quote
Old 02/02/2015, 08:56 PM   #5525
malaka
Huge Clucker
 
malaka's Avatar
 
Join Date: Dec 2010
Location: San Andreas ................................... Status: Retired
Posts: 295
Reputation: 35
Default AW: Re: PPC_Trucking V1

Quote:
Originally Posted by PowerPC603 View Post
Since you said to make gas-stations ownable, I was thinking about hospitals, police stations and ammunations as well.
[...]
I guess this is too much. Public locations should be owned by goverment (system). Especially police stations.

Quote:
Originally Posted by PowerPC603 View Post
[...]
Perhaps it would be better to turn them all into companies, which players can buy and invite new members.
[...]
Would be cool if player could enter a business and apply for a job!

Quote:
Originally Posted by PowerPC603 View Post
[...]
And of course ammunation would work the same way.
But they would work differently.
When an ammunation isn't owned, nobody can buy weapons.
When someone buys it, it becomes a level 1 company and only melee weapons will be for sale.
Players will need to work together to level the ammunation company and unlock better weapons.
The minigun would only be for sale when it reaches level 10.
And for every sold weapon, the company earns cash and experience.
[...]
Quote:
Originally Posted by PowerPC603 View Post
[...]
And ammunations would need to transport weapons around (pick them up at ammunation and bring them to some special locations).
[...]
This is much better. And if you want to improve that, you could even add a storage system to the ammunation where player can buy weapons from. And if the ammunation is out of stock, no one can buy weapons from there. Truckers and the workers of the ammunation should be able to refill the stock then. For this, they could simply get a certain vehicle and transport the weapons either by truck or heli and drop it at the ammunation.

Or pilots could carry weapons from the airfield next to Area 51 (if they have a special license) and put the delivery into the hangar of the business (ammu nation) where the owner and it's workers can take it then with a van and bring it to their location. x)

Quote:
Originally Posted by PowerPC603 View Post
[...]
In the end, it's all up to the players themselves to decide how cheap/expensive they wanna make their gameplay.
If nobody buys gas-stations, refuelling vehicles will stay cheap.
If all gas-stations are sold out and they're all leveled to max, refuelling will be expensive.
[...]
More realistic and it gives the whole thing a special feature.
malaka is offline   Reply With Quote
Old 02/02/2015, 09:22 PM   #5526
PowerPC603
High-roller
 
Join Date: Nov 2010
Location: Belgium
Posts: 1,740
Reputation: 238
Default Re: PPC_Trucking V1

Even public locations are businesses in real-life.
A hospital is a business, so is a police station.

Or would you like to keep a static fine for every speedcamera on the map like before?
Then it wouldn't be neccessary to link speedcameras to police-stations.
It would be a very nice system to have different fines all over the map (dynamic fines) based on the level of police stations.

Same for healing players at hospitals.
Or keep the idea about richer players paying more for restoring health?

As for the businesses:
Players would in fact be able to apply for a job if the business is active already (owned by players).
They would be able to enter it, buy stuff like a pizza at a pizza-shop, or even apply for a job (send an invite request to the leader).
If the leader comes online, or if any members with sufficient accesslevel are online, they can accept the invitation and the player becomes a member and is able to start doing jobs for the company.

For ammunation, it should be possible to add such a storage system.
There could be special jobs for ammunation to transport weapons all over the place (should these also be taken from the stock?, then players would need to refill the stock constantly), and some jobs to refill the stock (bring weapons from airports to the ammunation).


I've already removed both systems from the script (hospitals and gas-stations).




And I have started on finishing the ban-system.
I had the system in place, but there was no ban-command yet.
But there is now.
It even supports both online and offline banning in the same command.
/ban <playername> <hours> <reason>

If the specified player is online, he's banned with a reason.
Also his bantime is stored in the database as unix timestamp.
If the banned player logs in again, he will see how long his ban remains.

If there is no player online with the specified name, the database is searched automatically and any accounts which have the given name inside it will be displayed (max 25 accounts will be displayed).

So, using
/ban o 1 Test

Would list all accounts where the playername holds an "o" in it (currently myself and my son Jonas).
Then the admin can select one of these and ban him offline.

If there are more than 25 results, the admin is informed to refine his search.
And he's also informed if no accounts could be found with the given text in the account-names.

I'm also going to set if Hours is entered as -1, this would mean a permanent ban.
__________________
Gamemode: PPC_Trucking
Extras-file (for PPC_Trucking): /delproperty, /evict, /propertyid, /porthouse, /portbus, /properties
------------------------------------------------------------------------------------
PPC-Trucking-V2 (home-hosted, only open on occasion for testing purposes): ppctruckingv2.no-ip.info:7777
******* channel: https://www.*******.com/channel/UC-4...Mpglma8f0Ld-YQ
------------------------------------------------------------------------------------
Filterscripts: PPC_Speedometer - PPC_Housing - PPC_Business
PowerPC603 is offline   Reply With Quote
Old 02/02/2015, 09:47 PM   #5527
malaka
Huge Clucker
 
malaka's Avatar
 
Join Date: Dec 2010
Location: San Andreas ................................... Status: Retired
Posts: 295
Reputation: 35
Default AW: Re: PPC_Trucking V1

Quote:
Originally Posted by PowerPC603 View Post
Even public locations are businesses in real-life.
A hospital is a business, so is a police station.

Or would you like to keep a static fine for every speedcamera on the map like before?
[...]
Yes, hospitals mostly owned by private companys and actually you could do this for them. But they should be very expensive (buying and keeping them (eg. running costs). But for the police station, I didn't hear that people like you and me could buy a whole police station in real life.

Let the owner of the server set prices and tax rates. Maybe even through a comand (not sure if this could provocate any bugs).


Quote:
Originally Posted by PowerPC603 View Post
[...]
Players would in fact be able to apply for a job if the business is active already (owned by players).
They would be able to enter it, buy stuff like a pizza at a pizza-shop, or even apply for a job (send an invite request to the leader).
[...]
I wouldn't like that. I think businesses should automatically accept the application and give the player a contract for few in-game days so he can't switch his job every minute. I mean, they do only work, they can't really destroy the business. There is no need to control it, you know? Especially if the owner or his co-owners are offline for a very long time.

Quote:
Originally Posted by PowerPC603 View Post
[...]
I've already removed both systems from the script (hospitals and gas-stations).
[...]
I see. But I still like the idea of owning gas stations.

Quote:
Originally Posted by PowerPC603 View Post
[...]
And I have started on finishing the ban-system.
I had the system in place, but there was no ban-command yet.
But there is now.
It even supports both online and offline banning in the same command.
/ban <playername> <hours> <reason>
[...]
On my server I restricted those commands to specific admin levels. And I also limited the time to ban as I think it shouldn't be possible to ban someone for 5531 days. A permanent ban would be better but this should only be restricted to the owner or to the "head admin" as this is a very big punishment. I don't like the idea of having tons of administration tools while there are almost no benefits for players.

The community ( = players ) should have all the power and not (only) the administration. There are good things you could add to the server that doesn't require an admin to be online all the time. Like commands to vote to kick a player or to punish him or so. Yea this could be abused but you could also only allow player with certain score to use that.

But this is just my opinion. x)
malaka is offline   Reply With Quote
Old 02/02/2015, 10:08 PM   #5528
PowerPC603
High-roller
 
Join Date: Nov 2010
Location: Belgium
Posts: 1,740
Reputation: 238
Default Re: PPC_Trucking V1

I could add a system when someone joins a company, he won't be able to join a new one within 24 hours.
So if he leaves the company right after joining one, he won't be able to join another until his 24 hour waiting time has passed.
This could be implemented to prevent company-hopping.

Of course the ban-command is restricted to admins level 3 and higher.
It would certainly be possible to restrict permanent banning to level 4 or 5 admins.

Businesses cannot be destroyed, but all players could leave, transferring the company back to the government.
Businesses become companies, there won't be businesses left as in V1, where only 1 player owns them and generate money automatically.

So the pizzatent, burger shot and all the others become buyable companies.
The building is there, players only need to buy it to start the company.
The first one to buy the company automatically becomes the company-leader, who can accept new employees.

It would still be possible for unowned companies to sell products (such as hamburgers at burger shot).
Players could still enter unowned companies and buy food or whatever it sells.

Also companies won't automatically fire members out of the company, even if they didn't login for months, unless it goes bankrupt. Then it could everyone out and becomes available to be bought again by other players.
The company always holds it's own funds, earned by the members.
Members can also add funds themselves to the company.
The members should always be able to keep the funds of their company above 0.

Ok, then I just keep static police stations, where players can enter them, but not buy them.
And keep static fines for all speedcams, without connecting them to police stations.
The fine could be edited by lvl 6 admin of course.

And no, this won't introduce bugs if properly written.

For the tax-rate, I'll just use one fixed tax-rate for everything, like 6% as default.
It would be too complex to have different tax-rates for every system.
__________________
Gamemode: PPC_Trucking
Extras-file (for PPC_Trucking): /delproperty, /evict, /propertyid, /porthouse, /portbus, /properties
------------------------------------------------------------------------------------
PPC-Trucking-V2 (home-hosted, only open on occasion for testing purposes): ppctruckingv2.no-ip.info:7777
******* channel: https://www.*******.com/channel/UC-4...Mpglma8f0Ld-YQ
------------------------------------------------------------------------------------
Filterscripts: PPC_Speedometer - PPC_Housing - PPC_Business
PowerPC603 is offline   Reply With Quote
Old 03/02/2015, 09:02 PM   #5529
PowerPC603
High-roller
 
Join Date: Nov 2010
Location: Belgium
Posts: 1,740
Reputation: 238
Default Re: PPC_Trucking V1

I've completed the ban command.

The entire system is quite long: 174 lines of code.
It's been tested and works perfectly.

It also supports offline unbanning by entering a bantime of 0 hours.
You only need a part of their name like:
/ban power 0

This would bring up a list of all registered players which have "power" in their name.
Selecting a name from the list that shows up will unban that player, because the command was given a bantime of "0" hours.
Of course, if there is someone online who's name starts with "power", the ban-command will in this case fail (a proper message is displayed), because "0" hours is used to unban players.
Players who are currently playing aren't banned, so there was no reason to add online unbanning, as they wouldn't been able to play if they were banned.

It can ban online players for maximum 500 hours, or permanently ban them.
It can also ban offline players for maximum 500 hours, permanently ban them, or unban them.



I'm gonna add the reason to the database as well, as this isn't saved yet.
It would be nice to know why you've been offline/online banned when you try to login again.



For the vote-kick system, I'll add a small ban-time as well (max one hour), otherwise kicking a player won't keep them out for long, as they can just re-launch the game and be able to play again, waiting for another vote-kick.
This bantime will be editable by an admin lvl 6, as well as the amount of votes before a player is kicked.
__________________
Gamemode: PPC_Trucking
Extras-file (for PPC_Trucking): /delproperty, /evict, /propertyid, /porthouse, /portbus, /properties
------------------------------------------------------------------------------------
PPC-Trucking-V2 (home-hosted, only open on occasion for testing purposes): ppctruckingv2.no-ip.info:7777
******* channel: https://www.*******.com/channel/UC-4...Mpglma8f0Ld-YQ
------------------------------------------------------------------------------------
Filterscripts: PPC_Speedometer - PPC_Housing - PPC_Business
PowerPC603 is offline   Reply With Quote
Old 04/02/2015, 11:58 AM   #5530
malaka
Huge Clucker
 
malaka's Avatar
 
Join Date: Dec 2010
Location: San Andreas ................................... Status: Retired
Posts: 295
Reputation: 35
Default AW: PPC_Trucking V1

Quote:
Originally Posted by PowerPC603 View Post
I could add a system when someone joins a company, he won't be able to join a new one within 24 hours.
So if he leaves the company right after joining one, he won't be able to join another until his 24 hour waiting time has passed.
This could be implemented to prevent company-hopping.
[...]
Quote:
Originally Posted by PowerPC603 View Post
[...]
Businesses become companies, there won't be businesses left as in V1, where only 1 player owns them and generate money automatically.
[...]


Quote:
Originally Posted by PowerPC603 View Post
[...]
Also companies won't automatically fire members out of the company, even if they didn't login for months, unless it goes bankrupt. Then it could everyone out and becomes available to be bought again by other players.
[...]
Good point and very realistic, go for it!

Quote:
Originally Posted by PowerPC603 View Post
[...]
Ok, then I just keep static police stations, where players can enter them, but not buy them.
And keep static fines for all speedcams, without connecting them to police stations.
The fine could be edited by lvl 6 admin of course.
[...]
For the tax-rate, I'll just use one fixed tax-rate for everything, like 6% as default.
It would be too complex to have different tax-rates for every system.
Nice one. Maybe you should do different tax rates like wealth tax, house tax, tax for business stuff and for public transportation (bus, train and plane (if you think of NPC)) or even the tax for the gas station.

Quote:
Originally Posted by PowerPC603 View Post
I've completed the ban command.
[...]
So, the ban command is the first thing you do when you're working on a new gamemode? Isn't there something more important like the basic stuff? I don't know about you but I would start with the system itself and later on I would add some extras and the administration stuff.

Quote:
Originally Posted by PowerPC603 View Post
[...]
For the vote-kick system, I'll add a small ban-time as well (max one hour), otherwise kicking a player won't keep them out for long, as they can just re-launch the game and be able to play again, waiting for another vote-kick.
This bantime will be editable by an admin lvl 6, as well as the amount of votes before a player is kicked.
You could make it in a way so that if 5 players vote for kick he will be kicked and if 10 people vote for it or if he already got kicked, he will be banned for few hours based on the default settings.
malaka is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] PPC_TRUCKING ThiagoMK PortuguÍs/Portuguese 4 30/07/2013 06:44 PM
Fix id Bug in PPC_Trucking Geeboi_Mehdi Client Support 11 18/05/2013 09:02 PM
PPC_Trucking Baumann Scripting Help 1 07/12/2012 04:28 PM
PPC_Trucking Baumann Scripting Help 1 02/12/2012 03:43 PM
PPC_Trucking help Private200 Scripting Help 1 16/11/2012 09:23 AM


All times are GMT. The time now is 05:17 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.