Welcome to our official forums, we provide weekly streaming of premium WWE content, and have a Marketplace for general Accounts/Keys/Items.


You are not connected. Please login or register

1.2vBusiness System [MySQL\R39] multi-dialogs for data storage, items, drugs, warehouses, biz's vehicles and more..

View previous topic View next topic Go down  Message [Page 1 of 1]

Galletziz


1.2vBusiness System [MySQL\R39]
multi-dialogs for data storage, items, drugs, warehouses, biz's vehicles and more..

Features:

Evening boyz, this is the last release for the moment, i have really completed this filterscript, i hope you choise this for your DM's or RPG's GMs, becouse i have worked on it much and revised the code several times for delete al bugs, and finally this Business Systema has reached a stable version. It comunicate with a database, all times that some admin create or delete a business, when some player buy or sell a biz, etc.. All comunications with the database were revised to ensure safety against sql injection.

How to install:

The installation is very simple, just download a file .rar that will contain the file .amx, and the file .sql (for import into your phpmyadmin page, the structure of FS's database), and you are ready for usage (if you don't know how to import file .sql in your own phpmyadmin page, search on google for it, google is your friend too).

Commands:



  1. /create_biz [interior id] [ammount]: (for the moment are avaibles only ids 6 and 7) Just admin's command that allow to create a biz .
  2. /destroy_biz: Just admin's command that allow to destroy a biz, if you are in range of point of its enter.
  3. /create_biz_exit: Another admin's command that allow to create a biz exit wherever you want inside of interior.
  4. /buy_biz: Command that allow at all players to buy business if you haven't reached MAX_BUSINESS_PER_PLAYER (that you can edit whenever you want).
  5. /sell_biz: Command that allow at all players to sell a own business.
  6. /enter: Command that allow at all players of to join in a business if this isn't closed or buyable.
  7. /exit: Same of enter but, that allow at all player of to exit from all business.
  8. /create_biz_wh: This is a command that allow at all player of to create a enter for illegal warehouse inside own business then buy illegal items ( drugs: weed, cocaine, heroine, hashish ).
  9. /manage_biz or PRESS Y key: This is a command that allow at all players to manage the own biz.
  10. /shop: This is a command that allow at all players to buy items in any biz.


Business Managment:

Whenever that a player buy a business he will have a opportunity of manage his own business. The entire system works on this part of FS because the player will can to do:


  • To Open\To Close the doors of his business.
  • Depending of which interior the player had bought he can refill legal items (if the business is a 24/7) or ammunation's items (if the business is a ammunation), if he had does a cargo with a burrito.
  • In any case if the players had bought a illegal warehouse (with Upgrade Selection on Manage Business Dialog) he can refill illegal items (weed, cocaine, heroine, hashish).
  • Depending of which interior the player had bought he can see the legal item list (if the business is a 24/7) or ammunation's items list (if the business is a ammunation).
  • In any case the player can see the illegal's items list even if he haven't upgrade his own biz.
  • Depending of which interior the player had bought he can set price of legal items (if the business is a 24/7) or set price of ammunation items(if the business is a ammunation), MIN 500$ - MAX 2000$.
  • In any case the player can set price of the illegal's items even if he havenìt upgrade his own biz.
  • Each player that have a business will have a safety deposit box where he can deposit or withdraw money deposited or earned with sales.
  • Finally the player can upgrade the own business for to have a enter to illegal warehouse that he will set one time only wherever he wants inside business and nobody know where is it, just only he knows where is this enter.


Refill Business:

For to refill your business you must to have a burrito (for legal and ammunation items) and a linerunner (for illegal items). If the player have a burrito can to go at discharge place for fill his burrito with the items, dependig of which business he had bought. When he arrived to destination (for the moment, for legal and ammunation items, to go at OCEAN DOKS, for illegal to go at DRUG FACTORY near LS AIRPORT) if he is in a right vehicle the checkpoint toggle on and if the player enter on it with a vehicle the script will return a dialog with 2 options, Legal or Ammu items (At OCEAN DOKS), and 1 option, illegal items (At DRUG FACTORY).

Configurations:

you can change this values at top of FS whenever you want.

Code:

// total max business.
#define MAX_BUSINESS 100
// total max business per player.
#define MAX_BUSINESS_PER_PLAYER 3
// total max drug per player.
#define MAX_DRUG_PER_PLAYER 1000

Testing Commands:

I have do this test commands for spawn vehicles for refill biz, and set player pos on cp of refill biz (legal, ammu and illegal), and command for see your stats and return fast at yours business:

Code:

//TESTING COMMANS

CMD:test_stats(playerid,params[]){
   new tmp_str[200];
   format(tmp_str,sizeof(tmp_str),"TESTING** - admin level:%i - vip level:%i - money:%i - kills:%i - deaths:%i - credits:%i - business's IDs: %i, %i, %i.",pinfo[playerid][admin_level],pinfo[playerid][vip_level],pinfo[playerid][money],pinfo[playerid][kills],pinfo[playerid][deaths],pinfo[playerid][credits],pinfo[playerid][business][0],pinfo[playerid][business][1],pinfo[playerid][business][2]);
SendClientMessage(playerid,-1,tmp_str);
format(tmp_str,sizeof(tmp_str),"TESTING** - marijuana:%i - cocaine:%i - heroine:%i - hashish:%i",pinfo[playerid][weed],pinfo[playerid][cocaine],pinfo[playerid][heroine],pinfo[playerid][hashish]);
SendClientMessage(playerid,-1,tmp_str);
return 1;
}

CMD:test_biz_cp(playerid,params[]){
SetPlayerPos(playerid,2788,-2417.6001,13.7);
return 1;
}

CMD:test_biz_cp_1(playerid,params[]){
SetPlayerPos(playerid,2152.7,-2288.6001,12.3);
return 1;
}

CMD:test_burrito(playerid,params[]){
   new Float:tmp_x, Float:tmp_y, Float:tmp_z;
GetPlayerPos(playerid,tmp_x,tmp_y,tmp_z);
AddStaticVehicleEx(482,tmp_x+3,tmp_y,tmp_z,211.9980000,124,27,15);
return 1;
}

CMD:test_linerunner(playerid,params[]){
   new Float:tmp_x, Float:tmp_y, Float:tmp_z;
GetPlayerPos(playerid,tmp_x,tmp_y,tmp_z);
AddStaticVehicleEx(403,tmp_x+3,tmp_y,tmp_z,211.9980000,124,27,15);
return 1;
}

CMD:test_biz_return(playerid,params[]){

for(new i =0; i < MAX_BUSINESS_PER_PLAYER; i++){
if(pinfo[playerid][business][i] <= 0)continue;
SetSpawnInfo(playerid,0,0,binfo[pinfo[playerid][business][i]][enter_pos_x],binfo[pinfo[playerid][business][i]][enter_pos_y],binfo[pinfo[playerid][business][i]][enter_pos_z],0.0,0,0,0,0,0,0);
SpawnPlayer(playerid);
break;
}
return 1;
}

Video:

https://www.youtube.com/watch?v=0Fw6zIms7ms

Images:



Pastebin:
http://pastebin.com/Ajhn7sNT

Download:
http://forum.sa-mp.com/showthread.php?p=3279033#post3279033

And this is all, i hope that my works will be useful and will like.
Enjoy (y)

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum