[FilterScript] PPC_Business
#1

Hi,

I've completed my business script, like it was implemented in the PPC_Trucking gamemode.

The filterscript uses Incognito's streamer for the pickups and 3DText labels, so you need it for this script to work.
https://sampforum.blast.hk/showthread.php?tid=102865
It also uses sscanf (I'm still using an older version, as I still use Samp 0.3c):
https://sampforum.blast.hk/showthread.php?tid=120356
And zcmd is also required:
https://sampforum.blast.hk/showthread.php?tid=91354

NOTE: You need to create a folder "PPC_Business" in your scriptfiles folder, or your server will crash.

Also, when combined with the PPC_Housing script, update the housing script with the latest version which has been uploaded.
This needs to be done because the housing script and the business script both use the /enter command.
If you keep the old housing script, there is a chance you won't be able to enter your business.

Also, do not combine this script with the PPC_Trucking gamemode, as it's built-in.
The only thing that has changed, is the earnings, all the rest is the same.
So no need to use 2 identical systems at once, as they may conflict with eachother.



To create a business, just use the command /createbusiness.
Then you'll be shown a dialog which asks you which type of business you want to create.

They all work the same, the only difference is:
- the buying price (which is also the price to pay for upgrading it, max level is 5)
- the earnings per minute
- the interior shown when you enter it
- the map-icon on your radar

Every business earns a little money every minute.
"Burger Shot" for example costs $700K to buy it. It earns $7 every minute, even when you're offline.
$7 every minute * 60 = $420 every hour. Or $420 * 24 = $10080 every day.
To get your investment back, you'll need about 70 days (the business-system in the gamemode required more than a year, the earnings have been upped because of this).
After that, you've earned your investment back (the buying price of $700K) and you can start making money.



There are a few functions that you need to copy and modify to your gamemode or other filterscripts if you use server-sided money.
The filterscript normally has no access to your account-data that your gamemode might hold, but these functions allow the business script to get data from your gamemode if you copy them to your gamemode.
They are near the bottom of the filterscript.
If you don't copy and edit them, the script will automatically use client-sided money.

Screenshot (a few businesses together):


Screenshot (inside the business, showing the businessmenu):


Download it here:
http://users.telenet.be/vge/download...C_Business.pwn
Reply
#2

Wow good job, but its too late
I stopped making my own server, and playing SA-MP lol.
But its great!
Reply
#3

Thank you. Good Job.
Reply
#4

Good Job Power.Keep it up!!!..
Reply
#5

Nice Release it will be useful.
Reply
#6

Is there a way to make it so other people can enter your business?
Reply
#7

Quote:
Originally Posted by --tiny--
Посмотреть сообщение
Is there a way to make it so other people can enter your business?
Currently, no.
But that can be added if needed.
This script will get updates soon too when gamemode PPC_Trucking V2 gets a new class that uses businesses.
Reply
#8

ok thank you ill be looking forward to it
Reply
#9

Good Job ! I will translate it in french =P
Reply
#10

Quote:
Originally Posted by --tiny--
Посмотреть сообщение
ok thank you ill be looking forward to it
But it will take time.
I've just completed the trucker class, which was the biggest class.
I've got 7 more classes to re-write, then new classes will come.
Reply
#11

Awesome, mate. Could you help me installing this into my Script? Thanks a lot!

P.S. Can you make interiors to these businesses?
Reply
#12

Quote:
Originally Posted by Ehab1911
View Post
Awesome, mate. Could you help me installing this into my Script? Thanks a lot!

P.S. Can you make interiors to these businesses?
All businesses already have interiors.
You see them when you /enter them.


Just add the filterscript to your server.cfg file:
Code:
filterscripts PPC_Business
You need to copy the commented functions at the bottom of the script to your gamemode/admin script, which holds your server-sided money.
It will still work if you don't, but if you use server-sided money (antihack system), the money won't be taken away from the player if he buys a business, as the script will automatically use client-sided money if those functions are not present.
Reply
#13

Damn this is nice.
Reply
#14

Great Script, I will test it out as soon as possible. I run an RP server so this will make a great contribution to my server. If you could possible make a "PPC_Fuel" and/or a "PPC_Engine" that would be amazing. I have yet to find a good engine script that uses "/engine" to turn off and on and a good fuel system were you have to be directy parralel to the fuel tanks and type "/refuel" and have the fuel slowly rise. If you could give me a pm if any of these suggestions will exist in the near future that would be wonderful.

Thanks,
Greg_Masterson
Reply
#15

Looks good! But will it blend?

Ps:
To bad the buisnesses aren't enterable yet(I guess from what i've seen:3)

EDIT:
2000TH post!
Reply
#16

Quote:
Originally Posted by Greg_Masterson
View Post
Great Script, I will test it out as soon as possible. I run an RP server so this will make a great contribution to my server. If you could possible make a "PPC_Fuel" and/or a "PPC_Engine" that would be amazing. I have yet to find a good engine script that uses "/engine" to turn off and on and a good fuel system were you have to be directy parralel to the fuel tanks and type "/refuel" and have the fuel slowly rise. If you could give me a pm if any of these suggestions will exist in the near future that would be wonderful.

Thanks,
Greg_Masterson
I have released my speedometer script, it has a refuel system.
You have to drive your vehicle towards a gasstation, and when you're parked on a refuel-pickup, you have to honk the horn to refuel your vehicle.
It won't slowly rise, but it will freeze you for a few seconds and you pay for the fuel you needed.
If you still have a tank that's half-full, you only pay half of what it would cost you for a complete refuel.



Quote:
Originally Posted by justsomeguy
View Post
Looks good! But will it blend?

Ps:
To bad the buisnesses aren't enterable yet(I guess from what i've seen:3)

EDIT:
2000TH post!
Blend? What do you mean by that?
Businesses can only be entered by the owner (currently).
A future version will be enterable by anyone (if you select it).
Reply
#17

Great FS!
Reply
#18

I cant Make this work on my server? Dose it only work with your trucking one I'm new to samp server creating
it all says it had loaded.


[20:08:22] Loading filterscript 'PPC_Business.amx'...
[20:08:22] -------------------------------------
[20:08:22] PPC Business filterscript initialized
[20:08:22] Businesses loaded: 0
[20:08:22] -------------------------------------
[20:08:22] Loading filterscript 'PPC_Housing.amx'...
[20:08:22] ----------------------------------------
[20:08:22] PPC Housing filterscript initialized
[20:08:22] Houses loaded: 0
[20:08:22] ----------------------------------------
[20:08:22] Loading filterscript 'PPC_Speedo.amx'...
[20:08:22]
----------------------------------------
[20:08:22] PPC Speedometer filterscript initialized
[20:08:22] Gas-stations created: 22
[20:08:22] Speedcamera's loaded: 0
[20:08:22] ----------------------------------------

Plug-ins

[20:08:22]
[20:08:22] Server Plugins
[20:08:22] --------------
[20:08:22] Loading plugin: Whirlpool
[20:08:22]
[20:08:22] ==================
[20:08:22]
[20:08:22] Whirlpool loaded
[20:08:22]
[20:08:22] ==================
[20:08:22]
[20:08:22] Loaded.
[20:08:22] Loading plugin: sscanf
[20:08:22]

[20:08:22] ===============================

[20:08:22] sscanf plugin loaded.

[20:08:22] © 2009 Alex "Y_Less" Cole

[20:08:22] 0.3d-R2 500 Players "dnee"

[20:08:22] ===============================

[20:08:22] Loaded.
[20:08:22] Loading plugin: streamer
[20:08:22]

*** Streamer Plugin v2.5.2 R2 by Incognito loaded ***

[20:08:22] Loaded.
[20:08:22] Loaded 3 plugins.

But when i do /createbusiness or /createhouse Nothing happen's ? not even server unknown command..

It look's spot-on but I need some help..
Reply
#19

do you create the folders in scriptfiles ?
Reply
#20

Yes I did..

/busmenu works
/createbusiness Don't work ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)