[FS] Its Just Business -
Desert - 03.04.2010
Its Just Business
Basic business generator
What:
Its Just Business(Or IJB) Is a basic made business generator to easily make businesses.
How:
By using the ingame RCON admin only command /createbus you are able to in a instant create new businesses for your server. The command has 3 parametres 'Name' 'Price' 'Payment per 10 minutes' which all will be saved in a dini file named "Business.ini". There is of course more commands to it which is as following
/buybus - Buy the business your standing close to
/sellbus - Sell your business. You need to be near it to sell it
/getprofit - Collect the profit earned from your business
With these commands you have what you need to run a basic business system.
Please note when using createbus you need to be logged in as RCON admin and the parametre 'Name' cannot use spaces.
So creating a business will be like this /createbus TheFourDragons 100000 1000
This will create a business named TheFourDragons which cost 100000 dollars and earns 1000 per 10 minute. The location of the business is the XYZ coordinate of your possition when typing the command.
Please note you must be on foot when using these commands. Will fix this in next version.
What to do:
In the .PWN file you will find a define named MAX_BUSINESS. But this as low as possible without being lower than your ammount of business (Tutorial comment follows in .PWN)
Few Small Downside:
There is a few small downsides of this filterscript which is:
1: Players named NoOwner will be kicked when connecting Only a problem in the first version
2: This filterscript may run alittle slow if MAX_BUSINESS is set too high
3: The Business.ini file will with time become a BIG mess because of it saving both businesses and players.
Please note that this filterscript does not use a register system or money saving. Pro scripters can make it work anyway. I will in time make it better at co-operate with register systems. But a simple system which saves cash should work fine.
Screenshots:
Will add screenshots soon Screenies here
Credits:
Thanks to ****** for sscanf and thanks to DracoBlue for dutils dini and DCMD
Downloading:
PWN and AMX v0.1
![](http://solidfiles.com/info_imgs/p2Rp.jpg)
Not recommended as its an old version
And pastebin
http://pastebin.com/ssKAeMuB Not recommended as its an old version
PWN AMX and INC v0.2
Pastebin v0.2
http://pastebin.com/ErK3Nkvc Note this does not contain the INC code! You can get the include from the download v0.2
Oh and forgot to mention you need the .INC files if you want to compile with no errors. ****** them or search on forum
And remember Its Just Business. Please don't take it personall
New Version!
Whats New:
Created a new major diffrence in the script. The NoOwner problem is no longer a problem as it uses a name
with a space bar which is automatically rejected of SA-MP servers.
I have also made a include file which is to be found in the version 0.2 download. This include file adds some functions to your gamemode which is as following:
LoadBusinesses(); - This function has no parametres. It will create the business pickups and is by default in the OnFilterScriptInnit callback in the FS
UnloadBusinesses(); - Has no parametres. Will destroy the created business pickups. But shouldnt destroy others
DoesPlayerOwnBusiness(playerid); - Has a playerid parametre. This will check if the playerid has a business. Returns 1 if yes and 0 if no
IsPlayerInRangeOfBus(playerid); - Has a playerid parametre. This will check if the playerid is in range of any businesses. Returns businessid if true and -1 if false
IsPlayerInRangeOfOwnedBus(playerid); - Has a playerid parametre. This will check if playerid is in range of hes business. Returns businessid if true and -1 if false
GetBusinessCashAmmount(businessid); - Has a businessid parametre. This will return the ammount of cash the player can recieve with /getprofit
Hope you will enjoy my new version
Regards
Desert
Re: [FS] Its Just Business -
[HUN]Gamestar - 03.04.2010
Nice
Re: [FS] Its Just Business -
Desert - 03.04.2010
Quote:
Originally Posted by Gamestar.
Nice
|
Thanks
Minor change. Big diffrence. New links added
Screenies added
Edit: Yet another minor update. Forgot a few things when editing the buy command so the part taking the money was bugged
![Embarrassed](images/smilies/redface.gif)
New links where it should be fixed
Re: [FS] Its Just Business -
@TheShadow@ - 03.04.2010
one tip^^:
except of using "NoOwner", use "No Owner" so you don't have to do the kick-thing... or use a name like "_" like i did in my house script (lol i'll never release it^^)
Re: [FS] Its Just Business -
Desert - 03.04.2010
Will do when i post update
Re: [FS] Its Just Business -
Pantontini - 04.04.2010
Код:
C:\Users\Alex\Desktop\Gangwars\gamemodes\Business.pwn(621) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
;S
Re: [FS] Its Just Business -
[HiC]TheKiller - 04.04.2010
Quote:
Originally Posted by Pantontini
Код:
C:\Users\Alex\Desktop\Gangwars\gamemodes\Business.pwn(621) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
;S
|
To the top of your script =].
Re: [FS] Its Just Business -
Venzio - 04.04.2010
Hey,
Is it possible to edit this in: "This {Name} business is for sale, it costs ${Price} and earns every 10 minutes ${Earning}.".
I really need this, thanks if anyone could help me.
Re: [FS] Its Just Business -
Desert - 04.04.2010
Yes. You will on line number 118 find this line
format(string,sizeof(string),"You have succesfully bought %s! This business pays %i dollars per 10 minutes",bizname,cash);
Which makes the text. %s is the name and %i is the payment per 10 minutes. Write it as you wish but if you make %i come before %s you will need to set "cash" on "bizname"'s spot and "bizname" on "cash" spot or it will malfunction and probaly give errors
Edit: New version! Check first post
Re: [FS] Its Just Business -
ViruZZzZ_ChiLLL - 08.04.2010
It would be cool though if you changed the icon of the created icon of the business
![rolleyes](images/smilies/rolleyes.gif)
________
[ame="http://www.youtube.com/watch?v=vWdazX4KGzw"]WEED[/ame]
Re: [FS] Its Just Business -
Desert - 08.04.2010
Well just search dcmd_createbus and find the CreatePickup and change the id to what you would like
And also change it in the LoadBusinesses() stock in the include file
Re: [FS] Its Just Business -
ViruZZzZ_ChiLLL - 08.04.2010
Oh, yeah, and another thing. Change the /create,buy,sell (bus) to (biz)
Because, it makes some people think that they will buy a bus
![rolleyes](images/smilies/rolleyes.gif)
________
HERPES ADVICE
Re: [FS] Its Just Business -
[MK]Soprano - 08.04.2010
Very Very nice
Re: [FS] Its Just Business -
Desert - 09.04.2010
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Oh, yeah, and another thing. Change the /create,buy,sell (bus) to (biz)
Because, it makes some people think that they will buy a bus ![rolleyes](images/smilies/rolleyes.gif)
|
I like it as buybus and that. But you can also change that by change the command under "OnPlayerCommand" and the "dcmd_buybus" to "dcmd_buybiz"
Quote:
Originally Posted by [MK
Soprano ]
Very Very nice ![Smiley](images/smilies/smile.png)
|
Thanks
Re: [FS] Its Just Business -
JustinB - 10.04.2010
Hey I got a small error,When I walk into the marker it says this bussiness (name) is for sale it costs $0 but I put it for $500000
Whats wrong here?
Re: [FS] Its Just Business -
Martin1557 - 10.04.2010
That's the best business FS, i like it very much .YHANK YOU. But i have a 1 probleme. how can i upgrade the MAX_BUSINESS ?
Re: [FS] Its Just Business -
Desert - 10.04.2010
Quote:
Originally Posted by JustinB
Hey I got a small error,When I walk into the marker it says this bussiness (name) is for sale it costs $0 but I put it for $500000
Whats wrong here?
|
Quote:
Originally Posted by Martin1557
That's the best business FS, i like it very much .YHANK YOU. But i have a 1 probleme. how can i upgrade the MAX_BUSINESS ?
|
It do loads the price for me. Maybe you have edited the OnPlayerPickupPickup? Or maybe MAX_BUSINESS is too low? It's 10 by default
If you use version 0.1 the MAX_BUSINESS define is near the top in the filterscript. If you use version 0.2 it's in the top line in the IJB include file
Re: [FS] Its Just Business -
[MK]Soprano - 26.04.2010
How much bussines i can create
![Huh?](images/smilies/confused.gif)
?
Maximum ??
Re: [FS] Its Just Business -
KDlivest954 - 26.04.2010
I got a bug. I put one business for 100,000(LSPD) and another one for 30,000(Burgershot). I bought the Burgershot then sold it when i walked into the LSPD business icon. I typed /sellbus and it said I sold LSPD and it gave me 100k. when i bought the Burgershot for 30k. I dnt no why it does this or if you fixed it. but i love the filterscript but thats the one problem i have.
-ACE
Re: [FS] Its Just Business -
Scenario - 27.04.2010
Not bad, nice work.