Categories
Software

Last Bed Standing – Bedwars in SA-MP!

 

[pastacode lang=”markdown” manual=”%23%23%20%5B0.1b%5D%20-%202017-03-21%0A%23%23%23%20Added%0A-%20Added%20weather%20system%20for%20random%20weather.%0A-%20Weather%20can%20be%20set%20by%20admins%2C%20using%20%2Fweather%20ID%0A-%20%2Fdropmoney%20uses%20GenerateRandomPickup%20function%20now%2C%20to%20create%20money%20pickups.%0A-%20system%20to%20check%20if%20a%20team%20has%20won%20the%20game.%20(if%20other%20teams%20are%20empty)%0A-%20Improved%20several%20minor%20bugs.%0A-%20Major%20changes%20in%20score%20system.%0A-%20The%20winner%20of%20the%20team%20will%20now%20be%20determined%20if%20there%20is%20no%20player%20left%20in%20other%20teams%0A-%20Recursive%20function%20will%20be%20called%20in%20OnPlayerDeath%20instead%20of%20OnPlayerSpawn%20now.%0A-%20Dead%20player%20will%20be%20thrown%20into%20TEAM_SPECTATOR%20after%20death%20now%20if%20the%20bed%20is%20missing.%0A-%20GetPlayerCount()%20function%20added%20to%20count%20amount%20of%20players%20for%20use%20in%20TeamsAlive(bool%3Avalue)%20function.%0A-%20Recursive%20function%20TeamsAlive(bool%3Avalue)%20function%20(false%2Ftrue)%20to%20count%20teams%20alive%20or%20check%20if%20there%20is%20only%20one%20team%20left.%0A-%20Fighting%20Style%20menu%20to%20purchase%20different%20fightstyles.%0A%0A%23%23%23%20Fix%0A-%20Increased%20weapon%20prices%20due%20to%20balancing%20reasons.%0A-%20Changed%20bomb%20activation%20radius%20to%20150m%20instead%20of%20100m.%0A%0A%23%23%20%5B0.1b%5D%20-%202017-03-28%0A%23%23%23%20Added%0A-%20Function%20GivePlayerMoneyText%20to%20give%20or%20remove%20money%20from%20a%20player%20and%20display%20gametext.%0A-%20%23define%20to%20change%20the%20value%20of%20Money%20Pickups.%0A%0A%23%23%20%5B0.1b%5D%20-%202017-03-28%0A%23%23%23%20Added%0A-%20Function%20GivePlayerMoneyText%20to%20give%20or%20remove%20money%20from%20a%20player%20and%20display%20gametext.%0A-%20%23define%20to%20change%20the%20value%20of%20Money%20Pickups.%0A%0A%23%23%20%5B0.1.3a%5D%20-%202018-03-02%0A%23%23%23%20Fix%0A-%20Fixed%20major%20bugs.%0A-%20Fixed%20y_ini%20problems.%0A-%20Fixed%20a%20huge%20amount%20of%20bugs.%0A-%20Code%20optimization%0A%0A%23%23%5B1.0.0%5D%20-%202018-03-02%0A%23%23%23%20Added%0A-%20Fixed%20major%20bugs.%0A-%20Removed%20y_ini%0A-%20Fixed%20a%20huge%20amount%20of%20bugs.%0A-%20Code%20optimization%0A-%20Added%20Login%2FRegister%20system%20using%20MySQL%0A-%20Added%20Salt%20%2B%20AES-256%20support%20for%20security%20matters%0A-%20MySQL%20table%20will%20be%20altered%20if%20rows%20do%20not%20exist%0A-%20Added%20round%20system%2C%20deathmatch%20like%20to%20get%20a%20real%20game%20running%0A-%20Added%20MySQL%20support%20using%20the%20newest%20plugin%20and%20include%0A-%20Added%20a%20scoreboard%20shown%20at%20the%20end%20of%20a%20game%0A-%20Gamemode%20will%20now%20restart%20automatically%20to%20change%20a%20map%20after%20a%20team%20has%20won%0A-%20First%20stable%20gamemode%2C%20has%20been%20tested%20for%20a%20while%20right%20now.%20Please%20report%20any%20bugs%0A-%20Added%2060%20seconds%20countdown%20when%20there%20is%20a%20sufficient%20amount%20of%20players.%0A-%20Players%20are%20invincible%20during%20the%20countdown%20phase.%0A-%20Started%20the%20use%20of%20arrays%20to%20declare%20various%20team%20states.” message=”” highlight=”” provider=”manual”/]

 

 

Hereby i want to publish my latest work and project Last Bed Standing – Bedwars, based on SA-MP’s Grand Larceny

Reasons why..

Goal of this project is to

port Minecraft’s famous Bedwars gamemode into SA-MP. SA-MP is awesome, isnt it? So why not keeping it
Unfortunately the most SA-MP projects in progress, are roleplay or reallife servers so nothing special. So one of the reasons for the creation of this mode is to recreate Bedwars in SA-MP set in the GTA world, with money instead of bronze, explosions instead of break blocks in Minecraft.
Due to my university study i have to program a lot of stuff in C language, so why not practice a bit by using a C-Like language like PAWN? The result of alle these reasons is this project.. the time to creation of this mode took 2 weeks, so whats better than a selfmade mode instead of Godfather?
So why do you publish this work Knogle? Heh im addicted to free and open source software so i put this creation under GNU GPL Public License so anyone can redistribute, modify or improve it.
SA-MP is free, right? So this should be free as well, heh!

Finally this project has been created just for some fun and practice of my C skills for my uni course, but i

will keep updating this gamemode in future!

Currently this Gamemode Last Bed Standing is in alpha state currently but will be updated frequently every week if possible.

The only left piece of Grand Larceny is the city, or in this case the team selection.
In my opinion its multiple

times better than the simple skin selection, realised with menus on most servers, not this default crap.

Currently there are 3 Teams available, similar to real Bedwars.
Team RED is located inside of the Sherman Damn, so you have to travel westbound of El Castillo Del Diablo to get there. Team GREYs spot is Area 51 and Team BLUEs shed is Torenos Airport located in Ver

dant Meadows!

All the teams have got a shop inside the base, close to the spawn to purchase weapons, armour, skills or a bomb which is needed to destroy an enemies bed.
The teams also have vehicles available scattered around in area of their bases, like tanks or seasparrows to improve their defence against invadors.

The 3 teams are in posession of a “bronze” spawnpoint. But the way its made is GTA style so instead of “bronze” spawnpoints we have random money pickups scattered inside of a small 2D zone inside of any base.
You have to use the money to purchase weapons and miscellaneous stuff.

Goal of the game is to destroy the enemies bed, and wipe out all the other players ( except your own team obviously), like bedwars..

 

You can only respawn after death if your bed is still not broken, otherwise you are so dead bro.
This mode actually contains 2400 lines of code, its obviously a lot more than Grand Larceny has, with 500 lines only!

I tried this with 4 players only, and usually a game takes 10 up to 15 minutes.
Its simple

but we had a lot of fun by playing this! Maybe just try it out..

The gamemode is written in ENGLISH completely, forgive me if there are any German or Portuguese comments left. (Im German and also Brazilian..)

This project is running @knogleinsi.de currently with 32 Slots and will keep running, so please keep developing and redistributing this mode and create some forks! Why not?

If you want to test this mode get some mates together and send me a pm.

I wont add a huge amount of features, it should be simple like the genuine Bedwars!

The source, check it out!

To the script itself..

You need sscanf2 Include and Plugin to run it.
You have to crea

te 2 files:

vehiclebedwars.tx

t in /pawno/includes
customvehicles.txt in scriptfiles folder.

Commands available:

[pastacode lang=”markdown” manual=”%2Fdropmoney%20(To%20drop%20a%20specific%20amount%20of%20money%20close%20to%20the%20player)%0A%2Fspec%20ID%20(you%20can%20spectate%20a%20player%20if%20your%20team%20has%20been%20wiped%20out)%0A%2Fblowup%20(Type%20this%20if%20you%20are%20close%20to%20an%20enemies%20bed%20to%20blow%20it%20up!)%0A%2Fpm%20(simple..)%0A%2Fgetplayerteam%0A%2Fstealth%0A%2Fwarp%0A%2Facmds%0A%2Fdropbomb%0A%2Fdetonate%0A%2Fstats%0A%2Fr%20(team%20radio)%0A%2Freport%20(to%20report%20players%20and%20ask%20questions)%0A%2Fstats%0A%2Fkill%20(when%20the%20game%20didnt%20start)%0A%2Fhelp%20(to%20know%20how%20the%20game%20works)%0A%2Fdropmoney%20(to%20dropmoney%20for%20other%20players)%0Asince%201.0.0%0A…%20and%20more%0A%0A” message=”” highlight=”” provider=”manual”/]

 

Easy to handle modular map system.

[pastacode lang=”c” manual=”%0A%2F%2FColor%20tags%20for%20textdraw%20use%0A%23define%20FIRST_TEAM_COLOR_TAG%20%22%7BAFAFAF%7DGREY%22%0A%23define%20SECOND_TEAM_COLOR_TAG%20%22%7BAA3333%7DRED%22%0A%23define%20THIRD_TEAM_COLOR_TAG%20%22%7B0000BB%7DBLUE%22%0A%0A%23define%20FIRST_TEAM_NAME_TAG%20%22GREY%22%0A%23define%20SECOND_TEAM_NAME_TAG%20%22RED%22%0A%23define%20THIRD_TEAM_NAME_TAG%20%22BLUE%22%0A%0A%0A%23define%20TEAM_ONE_SEL_INTERIOR%200%0A%23define%20TEAM_TWO_SEL_INTERIOR%200%0A%23define%20TEAM_THREE_SEL_INTERIOR%200%0A%0A%23define%20TEAM_ONE_INTERIOR%200%0A%23define%20TEAM_TWO_INTERIOR%2017%0A%23define%20TEAM_THREE_INTERIOR%200%0A%0A%0A%2F%2F%20Team%20colors%0A%23define%20COLOR_TEAM_ONE%200xAFAFAF55%20%2F%2FGrey%0A%23define%20COLOR_TEAM_TWO%200xAA333355%20%2F%2FRed%0A%23define%20COLOR_TEAM_THREE%200x0000BB55%20%2F%2FBlue%0A%0A%2F%2F%20TD%20Colors%0A%23define%20COLOR_TEAM_ONE_TD%200xAFAFAFFF%20%2F%2FGrey%0A%23define%20COLOR_TEAM_TWO_TD%200xAA3333FF%20%2F%2FRed%0A%23define%20COLOR_TEAM_THREE_TD%200x0000BBFF%20%2F%2FBlue%0A%0A%0A%2F%2FWhere%20the%20teams%20are%20located..%0A%23define%20FIRST_TEAM_LOCATION%20%22Area%2051%22%0A%23define%20SECOND_TEAM_LOCATION%20%22The%20Sherman%20Damn%22%0A%23define%20THIRD_TEAM_LOCATION%20%22Verdant%20Meadows%22%0A%0A%23define%20TEAMSIZE%203%0A%0A%0Astock%20const%20Float%3ACenter%5B%5D%5B%5D%3D%7B%0A%7B-326.9609%2C2229.9983%2C43.4798%7D%09%0A%7D%3B%0A%0Astock%20const%20Float%3AGlobalActors%5B%5D%5B%5D%3D%7B%0A%09%7B275.1789%2C1857.4131%2C8.7578%2C%20357.9678%7D%2C%2F%2FGrey%0A%09%7B-957.0817%2C1931.4672%2C5.0000%2C265.5104%7D%2C%2F%2FRed%0A%09%7B417.8459%2C2540.2747%2C10.0000%2C269.3721%7D%2F%2FBlue%0A%7D%3B%0A%0Astock%20const%20Float%3AGlobalZones%5B%5D%5B%5D%3D%7B%0A%09%7B-70.06725%2C%201658.258%2C%20385.3699%2C%202125.373%7D%2C%2F%2FGrey%0A%09%7B-934.23%2C%201868.46%2C%20-478.7929%2C%202148.729%7D%2C%2F%2FRed%0A%09%7B-58.38938%2C%202370.609%2C%20455.4371%2C%202674.233%7D%2F%2FBlue%0A%7D%3B%0A%0Astock%20const%20Float%3APlayerInfoPickups%5B%5D%5B%5D%3D%7B%0A%09%7B0.0%2C0.0%2C0.0%7D%0A%0A%7D%3B%0A%0Astock%20const%20Float%3AMoneySpawns%5B%5D%5B%5D%3D%7B%09%0A%09%7B253.7534%2C239.1062%2C1805.2826%2C1797.3673%2C7.9141%2C7.4141%7D%2C%2F%2FGrey%0A%09%7B-949.3178%2C-958.2505%2C1914.4623%2C1907.0569%2C5.0000%2C4.7000%7D%2C%2F%2FRed%0A%09%7B416.3385%2C412.4385%2C2536.9675%2C2530.5198%2C19.5839%2C19.3839%7D%2C%2F%2FBlue%0A%09%7B-328.7060%2C-332.9677%2C2230.9785%2C2211.9797%2C42.4844%2C42.2844%7D%2F%2FMain%0A%7D%3B%0A%0A%0Astock%20const%20Float%3AMAP_WORLDBOUNDS%5B%5D%5B%5D%3D%7B%0A%09%7B%20700.6725%2C%20-875.8406%2C%202849.402%2C%201284.566%7D%0A%7D%3B%0A%0A%0Astock%20const%20Float%3AClassSel_SetupTeamTEAM_POS%5B%5D%5B%5D%3D%7B%0A%09%7B136.5640%2C1937.6123%2C68.7587%7D%2C%2F%2FGrey%0A%09%7B-761.1128%2C2108.5681%2C120.9924%7D%2C%2F%2FRed%0A%09%7B264.1714%2C2442.7229%2C58.8193%7D%2F%2FBlue%0A%7D%3B%0A%0Astock%20const%20Float%3AClassSel_SetupTeamTEAM_LOOK_AT%5B%5D%5B%5D%3D%7B%0A%09%7B227.9328%2C1860.6154%2C20.6406%7D%2C%2F%2FGrey%0A%09%7B-579.4916%2C1931.1588%2C34.3891%7D%2C%2F%2FRed%0A%09%7B371.2788%2C2536.0828%2C16.6359%7D%2F%2FBlue%0A%7D%3B%0A%0Astock%20const%20Float%3Abeds%5B%5D%5B%5D%20%3D%20%7B%0A%09%7B268.1000100%2C1881.5000000%2C-31.4000000%7D%2C%2F%2FGrey%0A%09%7B-955.2665%2C1867.7350%2C5.6661%7D%2C%2F%2FRed%0A%09%7B417.6000100%2C2536.2000000%2C8.9000000%7D%2F%2FBlue%0A%7D%3B%0A%0Astock%20const%20Float%3AgSpawnsTeam_TEAM_ONE%5B%5D%5B%5D%20%3D%20%7B%2F%2FGrey%0A%09%7B176.9377%2C1842.0581%2C17.6406%2C348.2309%7D%2C%0A%09%7B134.4745%2C1841.0414%2C17.6406%2C82.5685%7D%2C%0A%09%7B185.5383%2C1925.9650%2C17.7767%2C184.0660%7D%2C%0A%09%7B262.1147%2C1807.6191%2C25.4985%2C269.8967%7D%2C%0A%09%7B201.9949%2C1870.0468%2C13.1406%2C275.8736%7D%2C%0A%09%7B246.7988%2C1859.1957%2C14.0840%2C87.5818%7D%2C%0A%09%7B244.9222%2C1830.5947%2C7.5547%2C271.1736%7D%2C%0A%09%7B254.0137%2C1803.0964%2C7.4141%2C98.2354%7D%2C%0A%09%7B235.9334%2C1829.6948%2C7.4141%2C186.2829%7D%2C%0A%09%7B298.9872%2C1815.8099%2C4.7109%2C95.7521%7D%2C%0A%09%7B298.4415%2C1845.9108%2C7.7266%2C359.2679%7D%2C%0A%09%7B278.0970%2C1862.2509%2C8.7578%2C92.3521%7D%2C%0A%09%7B268.4646%2C1879.8407%2C-30.3906%2C272.2072%7D%2C%0A%09%7B275.2321%2C1963.1943%2C17.6406%2C265.3138%7D%2C%0A%09%7B293.7956%2C1830.1534%2C17.6481%2C179.7730%7D%0A%7D%3B%0A%0Astock%20const%20Float%3AgSpawnsTeam_TEAM_TWO%5B%5D%5B%5D%20%3D%20%7B%2F%2FRed%0A%09%7B-944.7980%2C1915.1990%2C5.0000%2C181.6165%7D%2C%20%0A%09%7B-938.5313%2C1874.5580%2C5.0000%2C76.3355%7D%2C%20%0A%09%7B-957.5322%2C1866.9474%2C5.0000%2C272.1472%7D%2C%20%0A%09%7B-961.6938%2C1868.2571%2C9.0000%2C359.8580%7D%2C%20%0A%09%7B-946.0905%2C1922.2120%2C9.0061%2C3.3046%7D%2C%20%0A%09%7B-961.4773%2C1946.1267%2C9.0000%2C267.1337%7D%20%0A%7D%3B%0A%0Astock%20const%20Float%3AgSpawnsTeam_TEAM_THREE%5B%5D%5B%5D%20%3D%20%7B%2F%2FBlue%0A%09%7B414.0306%2C2534.3665%2C19.1484%2C183.3928%7D%2C%20%0A%09%7B347.8530%2C2548.9377%2C16.6874%2C181.8028%7D%2C%20%0A%09%7B381.9026%2C2602.8035%2C16.4844%2C191.5162%7D%2C%20%0A%09%7B293.0901%2C2557.3284%2C16.4630%2C183.6828%7D%2C%20%0A%09%7B319.3600%2C2440.8088%2C16.4864%2C348.4977%7D%2C%20%0A%09%7B400.2691%2C2452.9202%2C16.5000%2C358.2111%7D%2C%20%0A%09%7B426.2568%2C2530.7734%2C16.6257%2C92.2120%7D%20%0A%7D%3B” message=”” highlight=”” provider=”manual”/]

 

A little overview of the teams and their spots:

 

 

Download:

Latest stable version 1.0.0

 

https://github.com/Knogle/LastBedStanding

 

Don’t forget to check out our server running this mode down here.

openknogle.eu:7777

By Knogle

I am a passionate individual who has been a dedicated user of Linux operating systems since 2014. My Linux journey began with FreeBSD, and I later transitioned to Debian, appreciating the flexibility and power that Linux offers.

To further enhance my skills, I undertook a preparatory course for the Red Hat Certified System Administrator (RHCSA) certificate, highlighting my commitment to continuous learning and professional development in the field of Linux system administration.

As the founder of Unix-Supremacy (formerly known as OpenKnogle Solutions or Knogle Industries), I have embarked on entrepreneurial endeavors in the realm of Unix-based systems. My expertise extends to programming in C and PAWN, allowing me to develop software solutions and contribute to the open-source community.

In addition to my technical pursuits, I am currently studying at RWTH Aachen University, majoring in Computer Science and Electrical Engineering. This academic background allows me to gain a comprehensive understanding of both software and hardware aspects in the field of computing.

Beyond my professional and academic endeavors, I am a curious individual who loves to explore and try out new technologies and innovative concepts. I am particularly passionate about supporting causes related to software freedom, the right to repair, and advocating for open-source software. I actively contribute to organizations such as the Software Freedom Conservancy, aiming to promote and protect these fundamental principles.

Overall, my journey as a Linux enthusiast, entrepreneur, programmer, and student has shaped my passion for technology and my commitment to making meaningful contributions to the open-source community.

Leave a Reply

Your email address will not be published. Required fields are marked *