12.09.2008, 14:13
-=< tAxI's Vehicle Shop/Menu >=-
This system adds a vehicle purchasing system to ur GM:- Fully automated menu construction: simply use CreateBuyableVehicle command to add one to menu
- Permanently saves for each individual player
- Modsaving and personal vehicles spawn with mods applied
- Auto modsave: Mod at a garage and it saves by default
- preview vehicles before you buy
- vehicle parking: save your vehicle where u want it to spawn
- vehicle despawns when you leave the server
- Built in vehicle security systems: good old fashioned lethal and non lethal
- Call your vehicle to you!
- Full Vehicle Control at you fingertips!!
- NEW*** Unlimited choices for vehicles - have anywhere from 5 to 5000 vehicles for sale at any one time on your server!
Essentially it is my XVM system but more universal for all servers and minimises the need for having empty unusable cars all over your server - ie a users car only spawns when they are logged into the system, and hwen they log out it disappears
There are 2 commands built into the system:
/buycar - displays the menu from which a player can buy any of the availlable vehicle selections on the server
/managecar - displays the user's personal vehicle control menu (XVM style)
If you would prefer to use your own commands then simply dont include the TVS_OnPlayerCommandText in your code. All of the other callbacks are 100% necesary though!!!
Add vehicles to your menu via the CreateBuyableVehicle command:
e.g. CreateBuyableVehicle(model,price,color_1,color_2); <><><> NB: Must be used under OnGameModeInit
This adds a vehicle slot to the menu - there is no limit to the amount of buyable cars u can put onto the server.
There are 2 commands to make integration with existing user reg systems possible:
TVS_LoginPlayer and TVS_RegisterPlayer
http://sampstorage.pandosite.co.uk/TVS/TVS.zip <<-- Download HERE - for some reason u need to copy that URL into your address bar for the download to work!
View Readme:
Код:
This system adds a vehicle purchasing system to ur GM: - Fully automated menu construction: simply use CreateBuyableVehicle command to add one to menu - Permanently saves with player username - Modsaving and personal vehicles spawn with mods applied - Auto modsave: Mod at a garage and it saves by default - preview vehicles before you buy - vehicle parking: save your vehicle where u want it - vehicle despawns when you leave the server - Built in vehicle security systems - Call your vehicle to you! - Full Vehicle Control at you fingertips!! Essentially it is my XVM system but more universal for all servers and minimises the need for having empty unusable cars all over your server --------------------=============================-------------------------------------- tAxI's TVS Toolkit - INC Package for SA-MP Multiplayer Modification of Grand Theft Auto - San Andreas. Copyright © 2007 Chris Johnstone (tAxI/Necrioss) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ------------------================================------------------------------------- In Order to get this working you must put All of the files in the include directory of the download into your "pawno/include" folder. --------------=================================---------------- To use you must insert at the top of your script ---> #include <TVS> insert under OnGameModeInit() OR if using in a filterscript OnFilterScriptInit() ---> TVS_OnGameModeInit(); insert under OnVehicleDeath(vehicleid,reason) ---> TVS_OnVehicleDeath(vehicleid); insert under OnVehicleMod(vehicleid,componentid) ---> TVS_OnVehicleMod(vehicleid,componentid); insert under OnVehicleRespray(vehicleid,color1,color2) ---> TVS_OnVehicleRespray(vehicleid,color1,color2); insert under OnVehiclePaintjob(vehicleid,paintjobid) ---> TVS_OnVehiclePaintjob(vehicleid,paintjobid); insert under OnPlayerDisconnect(playerid) ---> TVS_OnPlayerDisconnect(playerid); insert under OnPlayerSelectedMenuRow(playerid,row) ---> TVS_OnPlayerSelectedMenuRow(playerid,row); insert under OnPlayerStateChange(playerid, newstate, oldstate) ---> TVS_OnPlayerStateChange(playerid, newstate, oldstate); insert under OnPlayerExitedMenu(playerid) ---> TVS_OnPlayerExitedMenu(playerid); A list of availlable commands will appear on your commands list on the right hand side of your pawno window If you have any problems Please contact me, <tAxI>, via the SA-MP forums @ http://forum.sa-mp.com Enjoy!!! tAxI/Necrioss <aka> Chris Johnstone. ++++++++++++++++__________________________+++++++++++++++++++ CURRENT COMMANDS LIST: native TVS_OnGameModeInit(); native TVS_OnVehicleDeath(vehicleid); native TVS_OnPlayerSelectedMenuRow(playerid,row); native TVS_OnPlayerDisconnect(playerid); native TVS_OnVehicleMod(vehicleid,componentid); native TVS_OnVehicleRespray(vehicleid,color__1,color__2); native TVS_OnVehiclePaintjob(vehicleid,paintjobid); native TVS_OnPlayerStateChange(playerid, newstate, oldstate); native TVS_OnPlayerCommandText(playerid, cmdtext[]); native TVS_ShowPlayerBuyVehicleMenu(playerid); native TVS_ShowPlayerManageVehicleMenu(playerid); ***commandtext and showplayerbuyvehiclemenu commands are interchangable: e.g. if u want the commands default (/buycar & /managecar) simply use command text where indicated above, however to insert the menu showing routine into your own command etc simply remove the commandtext lines and use the showmenu command included in the code system native TVS_RegisterPlayer(playerid); <<< Must be inserted into whatever register command you have for your server so when people register they are auto registered with the vehicle shop system! native TVS_LoginPlayer(playerid); <<< Must be inserted under whatever login command you use or their vehicle will not spawn at all - note that for easy integration if someone is already registered and the login command is used it will register them automatically! native CreateBuyableVehicle(vehicle_model, vehicle_cost, vehicle_name[20], vehicle_color_1, vehicle_color_2); <<< This adds a vehicle with the selected attributes to the vehicle purchasing menu system. ENJOY!!!