[FilterScript] SF Vehicle Shop - Buy/Sell
#1

Vehicle Shop - Buying/Selling.
Hey this is my vehicle shop system, its my first release so please dont comment on my awfull pawno scripting knowledge lol im still new :P
anyways i hope you like it

**** Credits ****

[03]Garsino - I learnt how to use Dialogs from his Car Spawn Filterscript
-zriptarusk - For his Checkpoint Manager

If i missed any credits out and you spot them lemme know lol

**********

Ok to start this is just a place in SF to purchase vehicles and a seperate place to sell vehicles.

Purchasing Vehicles :

Each vehicle has its own price.
There are 3 different type of vehicles available.
Once you have bought a vehicle you get the option to choose your vehicles color.


Selling Vehicles :

Only vehicles that can be found in the vehicle shop can be sold.
All vehicles that can be sold have there own price.
Depending on Vehicle damage you will be given a different amount for example:

If you sell your vehicle with 100% health you will get half of what the vehicle cost in the shop
if you sell your vehicle with between say 50 - 79 the amount will be dropped
Any vehicle below 9 damage can not be sold so be carefull when driving it back :P


Screen Shots

/imageshack/gal.php?g=samp002f.png

Downloads

http://solidfiles.com/d/7f52/

I was planning on posting a pastebin link but because i made this for the pawno "newbies" it has alot of commenting that just got ruined lol so i decided not to.


Thanks - Barney Stinson
Reply
#2

Nice one dude, this works a treat...... i will try it tomorrow :P
Reply
#3

Lol thanks i guess
Reply
#4

Nice Job
It is my car after left the server?
I can Buy Truck's and Trailer's?
Reply
#5

Untill i update this script to actually save vehicles when a players exits your server no it will not be your own vehicle for now it simply spawns you a vehicle anyone can use.

Now to buy trucks and trailers you would need to add that in go under
Quote:

if(dialogid == CARMENU+3)

and just add Under if(listitem == 7 )

Quote:

if(listitem == 8 )
{
if(GetPlayerMoney(playerid) > YourAmountGoesHere)
{
new CarOne;
new CarOwnerName[24];
GetPlayerName(playerid,CarOwnerName,24);
CarOne = CreateVehicle(YourVehicleIDHere, -1637.3981, 1211.3069, 6.8102, 225.1162, -1, -1, -1);
GivePlayerMoney(playerid, -YourAmountGoesHere);
PutPlayerInVehicle(playerid,CarOne,0);
DialogActive[playerid]=0;
ShowVehicleColor1(playerid);
PurchasedCar[CarOne] = 999;
}
if (GetPlayerMoney(playerid) < YourAmountGoesHere)
{
SendClientMessage(playerid, 0xFF9900AA, "You Do Not Have Enough Money.");
}

And change "YourVehicleIDHere" to what ever vehicle you want to spawn.
And change "YourAmountGoesHEre" to set the price of the vehicle.


Once you have done that underneath the code you added is..

Quote:

if(listitem == 8 )
{
ShowPlayerDialog(playerid,CARMENU,DIALOG_STYLE_LIS T, "Special Vehicle Showroom","Buy a Car\nBuy a Bike\nBuy a Special Vehicle","Select","exit");
}

Now just change this
"if(listitem == 8 )" to "if(listitem == 9)"
This will put "back" at the bottom of the list and whatever vehicle you want above it.



Last thing is press (CTRL + F) and search for

Quote:

\nQuad Bike\nVortex\nBack",

After

Quote:

\nVortex\nBack",

put

Quote:

\nVortex\n"YourVehicleName"\nBack",

And just replace "YourVehicleName" With the vehicle you want.

That should work if it doesnt let me know.
Reply
#6

please need#include <CheckpointManager> to add more cars and get it on my gm
Reply
#7

Checkpoint manager is already included just put it in your pawno/include folder
Reply
#8

Nice job, thanks for share it.
Reply
#9

Can you make one in LV E.G Autobahn
Reply
#10

Thats not working in my gamemode i go to buy a car nothing is doing...
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)