Author Topic: Weapon Shop  (Read 9818 times)

0 Members and 1 Guest are viewing this topic.

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Weapon Shop
« on: January 16, 2009, 06:05:39 pm »
Script Name: Weapon Shop
Script Description: Allows users to buy weapons with money, you earn money by killing people.
Original Author(s): Corl45 (aka Tyler Wight)
Core Version: 263
Code:

Code: [Select]
procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
  begin
    if Killer = Victim then
      begin
         writeConsole(Killer, 'you cant kill yourself for money you silly bear', RGB(0, 255, 255));
      end else
      begin
        money[Killer] := money[Killer]+100;
        writeConsole(Killer, 'You just got $100 your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
      end;
  end;

 if you use this with SimpleZombie By: JFK http://forums.soldat.pl/index.php?topic=32103.0    it makes a nice zombie server.


Image: http://www.4shared.com/file/81023418/5cd47f55/Weapon_shop.html

UPDATE 1/18/09 7:11 PM, Fixed "Money Giving"

README:

=====================
=====Weapon shop=====
=========BY:=========
=====Tyler Wight=====
==== (AKA Corl45)====
=====================


  I made this script orginaly for personal use, for my localzombie server, so i cleaned it up a bit and decided to upload it.  This script makes it so you earn money for each kill ($100) and you can buy your weapons.  When you spawn, you choose one of the secondary weapon, and when you kill someone you earn money, and each of the primary guns, and powerups (plus stat gun) cost a certain amount of money, then you can buy them. if you open up the script in notepad, you can change the value of each gun. you can buy all powerups (flame god, preditor, ect..) all guns, except for secondary weapons (LAW, chainsaw, USSOCOM, Knife) and you can also buy a Stationary gun. in order to use this, make sure you disable all weapons execpt for secondary, and turn Disable_AntiCheat_Kick to 1 in soldat.ini, because when you buy weapons it will think your cheating. supports 32 players.

Just extract it to your   <server>/scripts/     folder




COMMAND LIST:

/money - shows how much money you currently have

/shop - opens shop to see how much guns cost and gun commands

/give [Ammount | Player Name] -gives [player name] $[Ammount] of your money. (palyer name MUST be exact, it is case sensitive.)

example /give 100 Corl45   that would give Corl45 $100 of your money.









DOWNLOAD: http://soldatcentral.com/index.php?page=script&f=90




« Last Edit: January 21, 2009, 06:12:17 pm by corl45 »
BE AWESOME!

Offline daphenomena

  • Major
  • *
  • Posts: 72
  • -wP- DaPhenomena
    • FPSBanana
Re: Weapon Shop
« Reply #1 on: January 18, 2009, 11:50:07 am »
Awsome, just added it to my server
Thanks for releasing it  ;D

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: Weapon Shop
« Reply #2 on: January 18, 2009, 02:16:30 pm »
your welcome =)
BE AWESOME!

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: Weapon Shop
« Reply #3 on: January 18, 2009, 08:07:54 pm »
You could just have a /give x instead of /give 100 and all that stuff just by adding 1 variable and setting that variable GetPiece(Text, ' ', 1);

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: Weapon Shop
« Reply #4 on: January 18, 2009, 08:24:16 pm »
You could just have a /give x instead of /give 100 and all that stuff just by adding 1 variable and setting that variable GetPiece(Text, ' ', 1);

but how would i set who i want to send it to? because if i have more that 3 digits in the number im sending them, i would have somthing like <Get so because its 1 more space over? right?

EDIT:
 lol nvm, i was thinking of the copy function... lol :P thanks, ill start working on that
« Last Edit: January 18, 2009, 08:34:25 pm by corl45 »
BE AWESOME!

Offline scarface09

  • Veteran
  • *****
  • Posts: 1153
  • Arsenal Supporter For Life
Re: Weapon Shop
« Reply #5 on: January 25, 2009, 09:38:14 pm »
nice! Reminds me of cs, and how you buy your weapons, despite this feature will not be added into soldat :(
Football is the other face of the world. If you don't like it, then you can get the hell out!

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: Weapon Shop
« Reply #6 on: March 14, 2009, 12:34:43 pm »
has anyone found any bugs?
BE AWESOME!

Offline head20shot

  • Major(1)
  • Posts: 6
Re: Weapon Shop
« Reply #7 on: April 08, 2009, 05:30:55 am »
awesome i got a server too and now i saw that and i add it =) nice thank you!

Offline Mr. Head

  • Major(1)
  • Posts: 1
Re: Weapon Shop
« Reply #8 on: April 15, 2009, 02:56:56 pm »
In my local server the script works. But in my 24/7 server not. Why?

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Weapon Shop
« Reply #9 on: April 16, 2009, 10:10:10 am »
We can't help you when you don't show us the Error Message, you find these normally in the logs Folder in the latest Console.log.

Offline AlterEgo

  • Major(1)
  • Posts: 33
  • Alter Ego of Dman Pwning Sns
Re: Weapon Shop
« Reply #10 on: May 11, 2009, 03:24:09 am »
corl45 , u shood think about relasing some login system so the money can be saved when u come back, also, u can make your account when u feel free and set password withouth any problem, and then the script would be GREAT, now is just AWESOME

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: Weapon Shop
« Reply #11 on: May 19, 2009, 10:07:34 pm »
corl45 , u shood think about relasing some login system so the money can be saved when u come back, also, u can make your account when u feel free and set password withouth any problem, and then the script would be GREAT, now is just AWESOME

I've been thinking about it, if I get time I'll work on it.  Thanks for the idea!  Sounds pretty good.
BE AWESOME!

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: Weapon Shop
« Reply #12 on: July 06, 2009, 06:21:23 pm »
I found bug, teamkilling for money xD

btw nice script i use this in my serwer but only in powerup shop

Offline Shard

  • Camper
  • ***
  • Posts: 449
  • yeet
Re: Weapon Shop
« Reply #13 on: July 07, 2009, 07:20:54 am »
Yea it makes my dedicated server crash when i buy guns

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: Weapon Shop
« Reply #14 on: July 07, 2009, 08:47:23 am »
I use this:
Code: [Select]
procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
  begin
    if  Killer = Victim then
      begin
         writeConsole(Killer, 'Your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
      end else
if (Killer <>Victim) and (GetPlayerStat(Killer,'team') <> GetPlayerStat(Victim,'team')) then
      begin
        money[Killer] := money[Killer]+300;
        writeConsole(Killer, 'You just got $300 your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
      end;
  end;

Teamkilling for money eliminated xD

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: Weapon Shop
« Reply #15 on: July 27, 2009, 11:37:12 pm »
thanks guys =) I haven't been on in a while, sorry about that, I think I'll start working on your guyz's Ideas! thanks for the feed back!
BE AWESOME!

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: Weapon Shop
« Reply #16 on: July 30, 2009, 05:17:21 am »
I use your script on my server xD

http://forums.soldat.pl/index.php?topic=35486.0

Offline heywood

  • Major(1)
  • Posts: 3
Re: Weapon Shop
« Reply #17 on: August 31, 2009, 07:32:07 am »
i modded the design because the old one doesn't looked very good
so i changed the shop list, removed the message that you earn 100$ if you make a kill and i also changed the messages if you buy weapons or dont have enough money

but still all the rest of the script belongs to corl45
so you can just call this a fanmod version
heres an example


sorry for my bad English
In violation with the signature rules. Read'em through.

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Weapon Shop
« Reply #18 on: September 02, 2009, 01:00:44 am »
dam those colours look hot. GJ!

Offline heywood

  • Major(1)
  • Posts: 3
Re: Weapon Shop
« Reply #19 on: September 04, 2009, 02:23:55 pm »
thanks much dude  :D
In violation with the signature rules. Read'em through.

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: Weapon Shop
« Reply #20 on: August 25, 2010, 03:31:53 am »
Well, I know I've said it before, but this time I'm actually contemplating it. haha. I'm thinking about going back and writing a save/load (or account system) for the script.  Probably won't be too soon, but it'll give me something to do.

« Last Edit: September 05, 2010, 07:15:04 pm by corl45 »
BE AWESOME!

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: Weapon Shop
« Reply #21 on: September 05, 2010, 07:16:09 pm »
I have finished a rough working beta of the login system. It is very simple, as I did not have a whole lot of time to work on it.  It uses your IP adress for storing information, so if you play from a different IP, you will not have your money anymore.  I know I could make a "username/password" system, but, like I said, it's a rough working beta, things are subject to change. Use command "/reg" to register your ip adress, and "/log" to log back in when you join again.  If someone wants to test it, reply and I'll put it up, otherwise, I'm going to clean it up a bit, and release it later
BE AWESOME!