[GameMode] Team Fortress 2
#1

Team Fortress 2
(For SA:MP)

[MYSQL, ZCMD, SSCANF, WHIRLPOOL, STREAMER]

__________________________________________________ _______________________________________________

General Information

The script is made from the scratch solely by myself. The intention is to emulate the TF2 Gameplay at it finest, whilist trying to get past the SA:MP limits by using workarounds. The following are all the general features the script haves:

Quote:

Beta V2

Script Technical Features

• Full SQL
One of the main improvements from the first version to the second is the injection of SQL enviroment on the server files. No files are requiered anymore. Everything is stored in the database and taken from it. Since SQL is completely flexible with it's managment many new features are introduced thanks to it.
Speaking of flexibility, there are dynamic listings in the code. Commands such as /accounts, or /punishments that will always result in long results of rows from the DB are formatted in dynamic listing format. No matter how many rows you get from a query, they will always be sorted in pages. They are not that hard to script either if you look at the code. For example, /bans has a listing max of 10 records per page. If you have 20 bans in your database, there'll be two pages. If you have 200, there'll be 20, and so on.

• Main Account System
Account system was completelly scrapped and replaced with a main account system. Players no longer register the character they are playing in, rather they now register a main account. The main account can have multiple characters attached to it, which are fully customizable while in game (create/rename/remove/swap). Stats have been changed to be saved per character and not per account. To avoid database unneeded stats, three new player levels have been introduced.
These levels are Active Player, Regular Player and VIP. The first one is achieved by playing for two full hours and will unlock stats saving for your account and characters. The second one is achieved by playing for two full weeks and will unlock a character slot for your account (meaning they can have two characters) and finally the VIP is only settable by the managers+ and will unlock yet another character slot (three characters). Moderators and higher can have four characters.
Characters can be swapped while playing, their stats are not shared between other characters (meaning anything you do in your character will only affect it).
Every account's passwords are saved with Whirlpool hashing.

• Ban system
Ban system has been reworked from the scratch mostly, so it could be added into the SQL system. Admins now have four different bans: CHARACTER BAN, ACCOUNT BAN, IP BAN & FULL BAN. The first one can be issued on any character and will restrict the account owner from using that character, though the account owner will still be allowed to play on the server. (Banned characters cannot be recreated). The second ban will ban a player's account, they will still be able to play on the server but they wont be able to access their account. The final one bans the player's ip and they wont be allowed to access the server at all on that IP.
Banning IP doesn't issue an account/char ban so it is recommended to scale the punishment in an order. If really needed the admin can fully ban a player which will ban all their current character, ip and account. Expiration parameter was added to every kind of bans (including route), there for the /tempban command was removed.
Managers can also ban route IPS; /routeban command allows them to ban a different route of ips. On connection your ip will be checked against those routes and the ban information will be displayed like it was a normal ban.
Managers are still allowed to remove bans but the system was reworked, now they will have to input the ban id they wish to remove. A list of all active bans can be obtained via /bans while In game.
** Due to database issues, an admin cannot char-ban a player who hasn't chosen a character; acc-ban a player who hasn't logged in. If /fullban is used in such players, the thing that they don't have (account and/or char) will get a "virtual" ban. Those players will still be able to get ip banned.

• Administrative system
There are lots and lots of commands for each different level of administrator rights. The levels are: Moderator, Administrator, Manager & Developer. Each set of privilieges has enough commands to make their work. There are no game breaking commands that will unbalance the game, since admins are supposed to be players too. Only managers and developers have a few commands that can interrupt the game but those are the higher levels which a normal admin is not supposed to have access to.
Administrative system counts with punishment tracks, complex ban system, SQL saving, anticheat features and mode managment commands (reset round, change map, etc..)
For security reasons, the developer rank (highest one) can only be set via the database (editting account_level to 7).
IMPORTANT: RCON admins have access to ALL administrative commands including setting managers (which can only be done by developers). Use with caution and insert secure RCON passwords!

• Damage system
Custom damages for most of the weapons. Each player class haves different resistances (if any) to different sources of damages. Most of the playable weapons damages have been reduced/increased to fit the gameplay of the mode and classes healths.
There are some sort of advanced damage calculation algorithims to reduce the damage depending the distance between who issues it and who takes it.
There are also critical hits with different types. (3.5x, 1.5x, etc.)

• Serverside health.
Native GTA SA health is not calculated. It is even set to infinite to avoid player uncontrolled deaths. Players have instead a serverside controlled HP which is controlled via player damages. It is impossible to evade with hacks, since health is tracked and forced upon each hit. The hacker could have his HP frozen to 100 and still would get killed if received enough damage.

• Serverside nametags
Native SA:MP nametags were disabled and replaced by custom nametags created by the server. These fit the different health values (ranging from 150 to 375) by calcualting percentages of health to determine the bar. This also was introduced so the SPY class could disguise himself and use other's names.

• Anticheat
Airbreak can often fail, the rest works perfectly fine. Anticheat will detect money,armor,jetpack (things that are not actually in the gamemode...) very easily. Weapons and ammos are tracked internally and the anticheat will check these things too. Each class has a max ammo variable for each weapon and the anticheat will detect if it's more than that. It will not affect admin granted weapons. The anticheat brings back the suspicious list that I used in the raven's roleplay gamemode. (Just as an easter egg! )

• Different chats
While this is not impressive it is worth mentioning. Teams have their own private chat (! at the start of the message); VIPS also have a private chat (which can be read by admins) by adding '@' at the start of the message. Admins still have their private chat by adding '#' at the start of the message.

• Vote system
Players can vote most of the stuff by themselves and don't need admin interference to change a mode, kick an annoying player, etcetera. Bans issued have expiration.

• Stats very specific
After reaching Active player status your stats will begin to save on the main database. These stats are very specific and you have LOTS of them. There are three types of stats: GLOBAL, LIVE & CLASS. Global ones are the stats of what you do since you register your account. These are accumulative and can reach very high values. Live stats are your best live performances. Each live has individual stats which you can try to surprass every live, and class stats are stats saved per class (what you do while scout, pyro, etc).

• Logs
Very specific logs, separated by type of log (account-related, punishment-related and rest) and date of log. You can't miss anything. These are one of the very few files left on the server since the SQL addon.

• Dynamic Gameplay
There's no need for a server restart for changing modes, ending a round, scrambling teams, etcterera. All is done while the server is running in one instance and all the variables are set and reset accordingly the mode correctly.

• Dynamic Gameplay Settings
Things such as damage, critical chances, critical damage, etc., get a modifier in the server which directly affects gameplay (amount of damage done, chance to do critical hits, etc.), and it can be changed while in game by any admin with developer level.

• Dynamic setup
There's sort of a dynamic setup for creating more maps that i've added while on the debug stages. It has everything needed to simplify your work by A LOT providing you know how to use it. I recommend this only for experienced scripters who know how a script works by reading the lines.

• Minimal player commands
Players are not requiered to learn any command. They can simply register, login and play with dialogs. Commands availble for players are /help, /classhelp, /stats, /report, /account, /vote, /pm and /info, nothing else. This way players don't need to memorize a full set of commands in order to be able to play.




Script Gameplay Features

• Classes Mechanics
Nine different classes all with different perks and abilities completely custom and built from scratch. They are all like the original TF2 and most of the features you can see on the game itself.

-> Scout Mechanics
Scouts have double jumps and extra jump height.

-> Soldier Mechanics
RPG contains four rockets.
RPG must be reloaded when emptied.
Reloading RPG can be interrupted at any given time.

-> Pyro Mechanics
They are immune to fire damage.

-> Demoman mechanics
They can swap between grenades & satchels at any given time.
The ammo for both is saved. And refilling ammo actually refills both weapons.

-> Heavy Mechanics
Very slow skin.

-> Engineer Mechanics
They can build all the four buildings given in TF2 at cost of metal.
They can upgrade their buildings up to level 3 at cost of metal.
The turret is manually controlled (due to limitations) and weapons and appearance change when leveled up.
The dispenser heals anyone (and disguised spies) within a certain range. It also refills metal and ammo (1/4 each tick).
Both teleporters share HP and upgrade points. If either are damaged, both will suffer the damage.

-> Sniper Mechanics
Headshots with sniper rifle are enabled.
They can jarate with spray can.

-> Spy Mechanics
They can actually disguise in others.
One hit kill backstab on any class.
Can go invisible and take damage from melee/explosions (due to limitation)
Can sap engineer's buildings.

-> Medic Mechanics
They can heal other players with their medigun.
They can cast ubercharge after healing enough.
Ubercharge renders them and whoever they are healing invencible.
They can overcharge someone's HP.
Overcharged HP will decrease periodically until the actual max HP is reached.


• Dynamic pickups
There are dynamically generated pickups in each map, they are randomly chosen. They can either refill ammo or health. Players also drop their weapons to the ground and can be picked up for refilling (work as a small ammo briefcase). Pickups will respawn after being used again in a random type.

• Spawn zones
Since It would work of a mapper to emulate TF2 spawn zones, I've decided to make players invulnerable while inside the spawn zone (marked in map for each player's team). Players can still give damage from inside of it; Full refill box also added on each spawn: they will completely refill your ammo, hp and metal if you're missing any of it.

Script Design/Misc Features

• Visual / sound effects
Refilling ammo has a custom sound played on the position. It also works with refilling metal and dispensers. There are also visual effects (smoke) for teleporting, damaged buildings, repairing/upgrading buildings, sapping buildings, going invisible and disguising.

• Individual clothing
Each class has a different set of clothes that have the color of their team. This is incredibly useful at the distance when the nametag isn't rendered.

Gamemode Specific Features

• Special Delivery
Special delivery counts with two maps. (sd_area69 & sd_carrier).
Australium spawns after 30 seconds in the middle of each map.
Players who pick it up will get it on their hand, colored with their team.
Dropping it to the ground (dieing) will create a normal pickup.
Getting into the delivery zone will activate a timer.
If that timer reaches to 25 the australium will be delivered.

• Capture the Flag
Capture the flag counts with three maps (ctf_golfclub, ctf_drugfactory, ctf_airport)
Each team haves a flag in an area near their spawn point.
Flag is a dynamic object colored with the team's colors.
Players must steal the flag of their contrary team.
Upon picking up the flag, it is added to the players' hand colored with the other's team color.
Upon dieing, the flag is dropped back again as a dynamic object.
The flag can be sent back to the base by a player of the flag's team.
The flag can be repicked by a player of the contrary's team and be carried to their base.
The contrary's flag must be carried to the own's flag base.
Flag delivery wont happen if your flag is being captured.

• Checkpoints
Checkpoints have several maps (cp_panopticon, cp_factory, cp_sfairport, cp_waterplant, cp_quarry, cp_golfclub)
Checkpoints mode counts with two variants: checkpoints and Attack/defense
In checkpoints variant, all checkpoints are neutral and both teams must try to capture them all, defending and attacking at the same time.
In attack/defense variant, red team defends their checkpoints while blu team attacks them.
Capturing occurs by entering in a range of the marked checkpoint.
The more people capturing, the faster it'll be.
Scouts count as two persons.
You can block an enemy team's capture by standing on the capture area with them.
If you are surprassed on numbers, the capture will still happen.
Checkpoints are dynamically handled by the script.

• King of the hill
KOTH haves three maps (koth_blueberty, koth_palomino, koth_area69); it was a planned mode for the V1
Both teams have a timer and it will only go down by having captured the only point in the map.
A team wins when their timer reaches zero. The capture will get blocked if there's more than one team in the checkpoint.
The capture will resume when the checkpoint has been cleared from enemies.

__________________________________________________ _______________________________________________

Account System Information

The account system has been totally revamped. It now features a more complex account system thanks to the great flexibility of the SQL (and it could have done even better, but I didn't want to use advanced JOIN queries and etcetera..)

Players no longer register their name but an account. Inside that account they might have different characters according to their level. A Player logins to the server not with their name, but their account. The account name might be different to the character name and viceversa.

The whole system would come in great for a roleplaying script, so I've decided to include it for future reference. Accounts are stored in the "accounts" table. Auto login is also included if the player sets it on at their account panel.

The command /account now lists more options, such as enabling auto logging and character managment.

What are the player levels?
0 - Normal User
Requeriments: None. Default rank when joining for the first time.
- His stats wont be saved in the database.
- Can only create one character.

1 - Active Player
Requeriments: Playing two full hours on the server.
+ His stats will be saved in the database.
- Can only create one character.

2 - Regular Player
Requeriments: Playing two full weeks on the server
+ His stats will be saved in the database.
+ Can create up to two different characters.

3 - VIP Player
Requeriments: Admin defined.
+ His stats will be saved in the database.
+ Can create up to three different characters.
+ Can access the VIP chat. ('@' in front of their message)

4 - Moderator
5 - Administrator
6 - Manager
7 - Developer
All of these are the administrator levels. Moderators and administrators can be set by managers. Managers can only be set by developers. Developers are only manually setted (via database). All of them can create up to four characters.


ALL of the commands in the script

Level 0-3
Code:
• /kill
- Suicides.

• /info
- Displays the script information helper.

• /stats
- Displays the stats to your current char.

• /vote
- Opens up the votation menu.

• /account
- Opens up the account panel.

• /pm
- Private Messages another player.

• /report
- Reports a player to the administrators.

• /classhelp
- Displays the class help for the picked class. Shown for the first time when using a class.
Moderators
Code:
• /scramble
- Scrambles both teams.

• /swapteams
- Swaps red for blu and blu for red. Scores change too.

• /resetmatch
- Resets score to 0 and resets the match.

• /cancelvote
- Cancels current vote.

• /warn
- Warns a player. (Automatic kick on fourth warning)

• /unwarn
- Clears the player's warnings.

• /freeze
- Freezes a player.

• /punishments
- Displays a list of the players lifetime account punishments.

• /unfreeze
- Unfreezes a player.

• /mute
- Mutes a player.
* NOTE: player will still send default gamemode voice messages.

• /unmute
- Unmutes a player.

• /weapons
- Displays a players' weapons and source.
* NOTE: Hacked, Admin Granted or Gamemode weapons are detected.

• /stats
- Displays the stats of the selected player.

• /kick
- Kicks a player.

• /apm
- Send a private message with the admin tag.

• /spectate
- Spectates a player.

• /goto
- Teleport to a player.

• /gethere
- Teleport a player to himself.

• /asay
- Display a global message with the level tag.

• /suspplayers
- List players suspected of cheating.

• /clear
- Remove a player from the cheating list.

• /accname
- Returns the name of the players' account.
Administrators
Code:
• /changemode
- Allows the admin to change the mode and select map (and special mode if applies)

• /endmatch
- Ends the current match and forces a new mode.

• /endround
- Ends the current round, forces a team swap.

• /accban
- Bans the account of the inputted player.

• /chars
- List the chars of the inputted player's account.

• /msgplayer
- Send a gametext message to a player.

• /alias
- Displays all the accounts on the same players' IP.

• /blind
- Turns a player blind or returns a players' vision.

• /slap
- Slaps a player.

• /die
- Kills a player.

• /cc
- Clears the chat (clearchat).

• /msgteam
- Sends a game text message to a team.

• /msgall
- Sends a game text message to everyone.

• /ips
- Lists all ips used by an account (playerid).

• /trackips
- List all ips used by an offline account.

• /trackaccounts
- List all accounts within the typed IP range.

• /comparepass
- Compares two accounts passwords.

• /charban
- Bans the current character of the player inputted.

• /ipban
- Bans the current IP of the player inputted.

• /charnames
- Lists all characters of an offline account.

• /fullban
- Bans all the three: IP, current account and current char (both if applies) of the selected player.

• /reports
- Lists all reports filtered by the date and/or the time inputted by the admin
*NOTE: not listed at /ahelp, this was a very recent addition which I forgot to list.
*NOTE: Filtering uses YYYY-MM-DD HH:MM:SS, you can filter by typing "2014" on the filter, or even "02-12"

• /bans
- Displays all active bans on the server.
Manager
Code:
• /routeban
- Bans a full route (up to two routes)

• /resetpass
- Resets the password of an account and sets it to a random number.

• /remban
- Removes an active ban from the database.

• /setlevel
- Sets a player level.

• /giveweapon
- Gives a weapon to a player.

• /giveallweapon
- Gives everyone a weapon.

• /charlist
- Lists all characters.

• /acclist
- Lists all accounts.

• /remchar
- Removes a character (and it's stats)

• /remacc
- Removes an account (and it's characters with their stats)
Developer
Code:
• /mapcreaton
- Brings up the map creation panel

• /gmx
- Restarts server.

• /sethp
- Set someone's HP.

• /explode
- Explode someone.

• /dieall
- Kill everyone.

• /server
- Bring up the server variables panel.
__________________________________________________ _______________________________________________


Gameplay Information

• There are five different gamemodes. The TF2 general rule still aplies: red defends, blu attacks. At least for attack/defense maps.
- Attack & Defend.
- Capture the checkpoints.
- Special Delivery.
- King of the Hill.
- Capture the Flag.

• The native GTA:SA / SA:MP's HP & nametag system have been removed and replaced with an exclusive scriptsided HP and nametags.
- Each class has different MAX HP values.
- The HP can be overcharged by the medic up to 150% of the max value.
- The spy can adopt anyone's name and skin. It's nametag and color will change too, along with it a virtual health which can be overhealed by the medics.

• The native GTA:SA damages have also been removed and replaced.
- All weapons have different damage values.
- Damage is reduced by distance.
- There are random critical hits which may occur at any time.
- Certain classes can boost up their crits and receive full mini crits for a period of time.
- Sniper can do headshoots criticals.
- Spy instantly kills anyone he hits in the back with the knife.
- Fire damage wont affect the Pyro.
- Fall damage was greatly reduced for the Scout.
- Blast damages were reduced for Soldier and Demoman.
- Medics heal their teammates when shooting them with the minigun.

• Exact weapon modifiers:
* NOTE: all of the values can be modified in game via modifying the CritChanceMultiplier, DamageMultiplier or the CritChance values dynamically.
- All meles weapons have 40+ Damage.
- Pistol does 50% more of damage.
- Deagle has had it's damage reduced by 50%.
- Shotgun has had an increment of 25% on it's damage.
- Minigun (for Heavy) has had a decreasment of 95% on it's damage.
- Explosions do 20% more of damage.
- Minigun (for engineer) has had a decreasment of 95% on it's damage, and to the resultant damage another reduction of 25%.
- RPG has had a decreasment of 50% on it's damage for engineers.
- Sawn off has it's damage decreased by 5%.
- Sniper rifle has it's damage increased by 110%.
- Silenced pistol has a fixed damage of 35.
- Flame thrower does 5% more of damage.
- Molotovs have had their damage reduced by 90%.
- M4 does 25% more of damage.
- Fire extinguisher does 40% less of damage.
- Katana (for demoman) does twice as much as damage.
- Medic has 10% reduction on fire damage.
- Soldier and demoman have 66% damage reduction on explosions.
- Scout haves 66% damage reduction on fall damage.

- There's a default 5% chance of full crit on each damage calculation.
- Full crits triplicate the original damage and ignore distance reduction.
- Minicrits increase the damage by 35% and wont ignore distance reduction.
- Damage is reduced for miniguns: 7.5% every 5 units.
- Damage is reduced for other weapons: 10% every 10 units.

- Medics heal 1.25 of HP every minigun shoot. This goes up to 3 points if healing while active uber.
- Snipers actually do 250% of additional damage on headshoot. An overhealed heavy can survive.
- Backstabs actually do eight times the players' max HP as damage.

• Soldiers must reload the rocket launcher.
- After four shoots the soldier must actually reload their rocket launcher (so it's not an overpowered machine).

• Spies are fully working like the TF2 original game.
- They can disguise in others, go invisble, perform backstabs and sap engineers' building.
- Spies cannot capture or be a carrier while disguised or invisible.

• Engineers can construct, move and upgrade buildings.
- Just like the TF2 engineers can build manual turrets, dispensers and teleports. They can be all individually upgraded.
- Dispenser refills 1/4 of the player's max ammo each tick.
- Dispenser heal rate and metal refilling rate depends on it's level.
- Buildings can also be repaired and unsapped.

• Scouts have twice the capture rate
- Scouts count as two persons in the capture point.
- They can also perform double jumps.

• All classes have taunts
- By pressing default GTA SA Keys 'h' the taunt will be activated.
- Soldier, Scout & Heavy have a mini crits boosting taunt.
- Soldier's mini crits taunt affects all nearby team mates.

• Dynamic pickups
- Pickups are not always the same.
- Pickups respawn after 30 seconds and get a random type assigned to it.
- You wont pickup a health / ammo pickup if you're full on it's type, unless you're a disguised spy.
- Health pickups vary: big, medium and small. Big ones completely refill your health, medium ones refill 66% of your max health and small ones 33% of your max health.
- Ammo pickups vary: Big and medium. Big ones completely refill your ammo and/or metal. Medium ones refill half of your ammo and/or metal.
- Players drop their current weapon into the ground when dieing. This can be picked up and works as a medium ammo kit.

• Voice Events
- There are random events which get called upon completition which trigger a voice response that changes depending the class you are.
- The following events trigger a response: Killing a player (25%); Assiting on a death (25%); Being on fire (%1); Being healed (50%); Being ubercharged (100%); Capturing a point (100%/capturing people); Defending a point (40%); Destructing a building (60%); Double jumping (%5); Sentry kills (20%); Headshoots (75%); Backstabs (75%); Using an engineer's building (2-5%).

__________________________________________________ _______________________________________________

Specific Class Information

Scout
"Grass grows, birds fly, sun shines, and brother, I hurt people! Minor league baseball player." Yes, tha means you get a shiny bat. The scout is the fatest and most agile class, with the special ability of double jump. Whenever you need speed, the scout's your guy, even for capturing. While capturing the scout is counted as two persons.

+ Double Capture Rate.
+ Incredibly fast speed.
+ Very high jumps and double jumping.

Weapon Loadout
75x Sawn off;
120x Pistol;
1x Baseball bat.


Soldier
"If fighting is sure to result in victory, then you must fight!" Attention! Stand up! Now DIE! The general is here. The soldier is one of the best classes, dealing a lot of damage both in close and ranged. He is a very easy target for spies though, and also, he runs out of ammo very fastly. Him, along with the demoman, share a very high blast resistance.

+ 66% blast resistance.
+ High base max HP.
+ Ranged mini-crits taunts.
- Must reload rocket launcher.

Weapon loadout:
16x RPG;
64x Shotgun;
1x Golfclub;


Pyro
"I fear no man. But that thing... it scares me." }One does not imagine what kind of human thoughts hide behind that mask. Fire? FIRE? Who says fire? He says 'mpmhmpgmph'. The pyro is a great spy detector, spies will get affected by his fire. The pyro comes along with a full fire invulnerability & a lot of crazy thoughts.

+ Complete fire damage invulnerability.
+ Great against both visible and invisible spies.
+ Explosive & regenerative taunts.
- Fire affects allies preventing them from shooting.

Weapon loadout:
75x Flamethrower;
64x Shotgun;
14x Molotovs;
1x Shovel;
200x Extinguisher;


Demoman
"A scrumpy-swilling demolitions expert." The drunk person, the guy who supports the pain, the sheep lover scottish. The demoman is an explosive expert, capable of blowing an entire place (or person) up. Demoman not only can mine a place but also explode it or collect heads. Equipped with a sword and high rentable explosives, the demoman is an awesome defensive class. Both grenades and satchels can be used by switching them thru needs.

+ Can place satchels in surfaces.
+ Can use grenades at long distances.
+ Twice the damage with the katana.
+ Regenerative (but disabling) taunt.
- Cannot use both grenades and satchels at once.

Weapon loadout:
32x Grenades;
16x Satchels;
1x Katana;
1x Detonator;


Heavy
"I have yet to meet one that can outsmart bullet." He is the heavy weapons guy, literally a heavy person. The only thing is that his speed is inversely proportional to the firing speed of his minigun. Heavy deals a lot of damage (which lowers on distance) and haves a lot of HP. He makes a great pair with a medic, who heals him while getting shoot at. The heavy haves an special taunt that grants him 100% critical chance on hit.

+ Incredibly high rate of fire.
+ Incredibly high max HP amount.
+ Mini-crits taunt with the brass knuckles.
- Very slow class.
- Almost zero damage on medium-high distances.

Weapon loadout:
500x Minigun;
64x Shotgun;
1x Brass Knuckles;


Engineer
"I solve practical problems." Why defending with guns when you can put buildings to defend yourself? The engineer job is to assist his team by building strategical constructions for his team. Sentry, Dispenser & Teleporters can be built in order to assist the attack or defense. The engineer must upgrade all of his buildings to increase their effectiveness. Counts with a shovel able to repair & upgrade buildings at cost of metal.

+ Can construct four different buildings to assist their team.
+ Can heal other players or refill their ammo with a dispenser.
+ Can repair/upgrade friendly engineer's buildings.
+ Can refill his own/other engineers' metal with dispensers.
+ Can issue a great amount of damage with their sentries.
+ Can teleport other players with their teleporters.
- Buildings cost metal. Upgrading and/or repairing them does so too.
- Buildings are destroyable at a fixed amount of damage.
- HP/Ammo regeneration affects disguised spies.

Weapon loadout:
64x Shotgun;
70x Deagle;
1x Construction PDA;
1x Destruction PDA;
1x Shovel;


Medic
"Let's go practice medicine." No team is complete without a medic, or atleast, someone that can heal others. The medic's job is to assist their teammates by healing them. The medic is a very weak but effective class. Medic works very well joint with a heavy, especially with ьber. Your job as medic is being as supportive as you can. The medic haves a special called the ЬberCharge.

+ Passive health regeneration, dependant on your weapons.
+ Can heal other friendly players with their medigun.
+ Can cast the ubercharge which renders them and their target invulnerable.
- Ubercharge requieres long amounts of healing in order to charge up.
- Can also ubercharge and/or heal/overheal disguised spies.

Weapon loadout;
200x M4;
1x Katana;
1x Medigun;

Sniper
He is a tough and ready crack shot. The sniper, the guy who collects heads and puts them in his backpack, the australian.The sniper's a very silent but powerful person. He is a very weak class however very strong when used properly. The sniper is a hunter, it must approach slowly and silenty into his victims, once then he is able to attack. The sniper is able to perform (almost) instant kill headshoots on his victims.

+ 250% damage on headshoots with sniper rifle.
+ Sprayed players with jarate receive 15 seconds of mini-crits from any source of damage.
+ 100% mini-crit chance on spies with the katana.
- Vulnerable to spies when aiming.

Weapon loadout:
30x Sniper Rifle;
80x SMG Uzi;
1x Katana;
1x Jarate;


Spy
"He could be any one of us." This class is unique in terms of abilities. The spy is able to disguise in others, go invisible, kill in one hit and destroy constructions easily. The spy, is a very weak but powerful and strategic class. A team will not succeed against a well organized team without a spy. Your job as spy is being as supportive as you can. You are not a soldier, you don't seek, you hide.

+ Can adopt other's skins and name tags.
+ Can go completely invisible from the game.
+ Can perform one hit kills by backstabbing with the knife.
+ Can sap enemy engineer's constructions and disable them.
+ Can leech off the enemy constructions dispensers / teleporters.
- Cannot be the team carrier or capture while disguised/invisible.
- Will pickup health pickups regardless of HP while disguised.
- Disguising / going invisible will trigger a smoke effect clearly visible.
- Can be killed while invisible by fire, explosions or melee weapons.
- Invisibility has an energy and will drain out.

Weapon loadout:
24x Silenced pistol;
1x Butterfly knife;
1x Electro sapper;
1x Invis watch;
1x Disguise kit;

__________________________________________________ _______________________________________________

Download & Instructions

Active Link: V2
http://www.solidfiles.com/d/99eb0921...z_-_Upload.rar

Instructions
The following gamemode makes use of the following plugins which you should have listed in your 'plugins' folder AND your server.cfg 'plugins' line:

MySQL Plugin (R37) https://sampforum.blast.hk/showthread.php?tid=56564
sscanf Plugin (2.8.1) https://sampforum.blast.hk/showthread.php?tid=120356
Streamer Plugin (2.7) https://sampforum.blast.hk/showthread.php?tid=102865
Whirlpool Plugin https://sampforum.blast.hk/showthread.php?tid=65290

The following gamemode also has a custom MySQL database. The structure for the database can be found in the main file under the name "sa-mp.sql". That's the script you're gonna have to run in your database in order for the script to work.

pawn Code:
#define MYSQL_HOST  "localhost"
#define MYSQL_USER  "root"
#define MYSQL_UPASS ""
#define MYSQL_DB    "sa-mp"
Change the previous one to fit your database. You can find those at the tf2.pwn at lines 37-40. If the database is not able to load, the gamemode will not load.

Do you want to modify the scripts?
You'll need the following includes:

pawn Code:
#include <streamer>
#include <sscanf2>
#include <zcmd>
#include <a_mysql>
#include <timerfix>

Previous Versions:
Release Beta Version 1 (Full Package 0.3x)

Release Version (.pwn & .amx)
Release Version (Full package)

Release Version
Release Version (Full package)

__________________________________________________ _______________________________________________

Changelogs

Alpha
Quote:

• All classes fully functional with all their taunts, abilities, HUDs, etc.
-Scout: Faster than all the other classes; Extra height on jump; Double Jump; Double capture; Sawnoff/pistol/baseball bat; 5 Secs Critics Taunt
-Soldier: Rocket Launcher; Blast Resistance; 15 Secs Critics Taunt; Shotgun/RPG/Golfclub; Haves to reload RPG after 5 shoots
-Pyro: Fire invulnerability; Molotovs Cocktail taunt; Explosive Taunt; Flamethrower/Molotovs/Fire Ex/Shotgun;
-Heavy: Slower than all other classes; Minigun/Shotgun/Brass Knuckles; Really high HP; Criticals Taunt
-Demoman: Grenades / Satchels; Whisky Taunt; Katana Extra Damage; Blast Resistance
-Engineer: Building Abilities: Able to build and upgrade up to level 3 four different constructions at expense of metal; Defensive sentry; HP/Metal/Ammo Dispenser; Teleporters for the team; Crits to Spies with the shovel; Deagle/Shotgun/Shovel/Construction PDA
-Sniper: Headshoots; Sniper/Katana/UZI/Jarate; Crits to spies with katana; Able to spray people with jarate
-Medic: Heals Others; HP Self Regeneration; Healing others & Self Taunt; Chainsaw/Medi Gun/M4; Able to cast the Ьbercharge for invulnerability to damage for a short period
-Spy: Can disguise in others; Can cast invisibility for a period of time; One hit kill backstabs; Can sap enemy buildings; Silenced/Knife/Camera/Sapper

• Three full modes fully functional
-Checkpoints (CPS): Two teams begin in each side of the map and must either defend or attack the checkpoints in the map. Two sub modes appear here: Attack/Defend, where the RED team will hold all the checkpoints on the start and the BLU Team must attack those; Checkpoints, where both teams begin without any checkpoint and must capture the next one to advance.
-Capture the Flag (CTF): Each team begin at each sides of the map and must defend their briefcase while attempting to steal the other team's briefcase and bring it to their own base.
-Special Delivery (SD): Each teams begin in different points of the map and after a period of time the Australium will appear, the first team that picks the australium up and delivers it in a deliver area wins.

• Damage system fully corrected
-All damages balanced & Corrected; Distance Calculation Formula Added (-15% of damage every 5 Meters for Heavy's Minigun / -8% of damage every 10 meters for every other weapon)

• Vote system finished
-Registered players are able to vote another's player dismissal, to change mode, map, reset current match, scramble teams, etc.

• Stats system finished
-All the stats of a registered players are saved in three ways: Global Stats, Live Stats & Class Stats.
Global Stats: All the ever made stuff is stored in the global stats, every kill, every headshoot, every destruction, etc. ever since the time you registered will be stored on the global Stats.
Live Stats: This stores the best records you could break in one live. This will record how many victims, how many headshoots, how much did you play, etc. you had in one live then store it. You can always try to beat your own records.
Class Stats: This is the same as the global stats but it's separated by class.

• Player accounts system finished
-Registering is now an option and will save all your stats and your internal configuration (Such as admin level). Ban system has also been introduced.

• Base administrative system

Beta:
Quote:

• Particle effects:
-When spy disguises/goes invisible/is hit when invisible; On critical/explosive death; Buildings damages & etc.
• Admin System fully working:
-Including four levels, each with an specific set of commands to protect the server; two reserved slots goes for admins. Includes anticheat that will alert players in case of hacker alerts.

Version 2
Quote:

Technical/General:

• [NEW] SQL support; everything has been moved to SQL and files are no longer required apart from logs. Whirlpool hashed passwords are also added along with this system. Most of user inputted strings (account, password, character name, etc.) are escaped preventing any SQL injection.
• [NEW] Completely new account system:
each player is now entitled to an account and not a character. Players must create an account with any name they want and then they'll be able to create characters on that account. Characters do not share any of the stats, each stat is tracked individually to each character, including global stats. You can change characters while in mid game. Characters name can be repeated, you'll get an addition to your name if someone already is using it (sort of like source engine games). The higher your account level is, the more characters you can create.
• [NEW] Command to compare two player's passwords. It wont tell you the actual passwords, only if they are the same (Can be used on offline accounts, ban evading checking porpuses)
• [NEW] Ban system:
There are now five types of banning: character, account, ip, full and route. Any admin can ban characters individually and that wont affect the main account of the banned player, allowing him to create other characters (if he has the level) or remove more. Banned characters cannot be removed. Admins can also ban accounts, which will kick the player who is on it and in addition any attempt at logging in with that account will result in also a kick. If all else fails admins can still ban the IP of the players forbidding any access whatsoever to the server. Admins can also fully ban a player which will ban their current character, account and IP. Managers can add routeblocks by banning entire ranges (127.0. , as an example). Managers can also remove any kind of ban by using /remban. The updated commands are: /charban, /accban, /ipban, /routeban & /remban. Active bans will be listed with the /bans command. To routeban ranges of ips must be done in the following format: /routeban a.b.c. OR a.b. OR a. ; The dot at the end will be automatically added to the IP if you type things such as 192.168 or 168.67.24
• [NEW] /info command which provides information and hints on classes/gamemodes/rules/etc..
• [NEW] Auto login into accounts. It will work as long as the player has enabled auto login in his /account panel. It will work up to five different accounts (If more than one account is detected, it will list them by last used time on descendant order).
• [NEW] Anti command & chat spam. (500 accumulative MS check from command to command / message to message)
• [NEW] Account punishment tracking system. All punishments will be tracked into the `punishments` table and will list punishment issued, issuer name (admin), date/time of issual, affected account id, affected account name, affected character id (if any), affected char name (if any) and reason (if any)
• [NEW] /charlist (list ALL characters created ordered by last connection), /accountlist (lists ALL accounts ordered by last connection), /remacc (removes an account from the DB and their characters (and stats) if applies), /remchar (removes any char from the db and their stats if applies) commands for manager.
• [NEW] /reports, it will list the reports filtered by the date and/or time the admin choses. Reports are now stored in the database.

• [UPDATED] 0.3z compilation.
• [UPDATED] Alias system; It is now properly done with SQL queries. All existing commands have been modified. There are new commands too; /chars (will list a connected player characters), /charnames (will list a disconnected account characters), /trackaccounts (Will list all the accounts that have been used with an IP similar to the inputted one, allowing to do range checks (for example, accounts that begin with 195.167) on ips), /alias (will list a connected players accounts on his current ip), /trackips (will list all the ips used for a disconnected account), /ips (will list ips used for a connected player's account). In addition to this, any result will display a (b) if the found account/char/ip is banned.
• [UPDATED] New player levels: Active Player (Will get their stats saved on the server); it is achieved after playing for two hours. Regular Player (able to create two characters); it is achieved after playing for two weeks. VIP (able to create three characters); it is only settable with admin commands. Moderators+ are able to create up to four characters.
• [UPDATED] Damage detection moved to receiver (previously was sent by the damager).
• [UPDATED] Scrambling teams rewritten: It now kills all players, unassigns their team and then makes them pick a random team. Updated the code for all functions that involve changing a player's team. (SwapTeams, EndMatch, ResetMatch, EndRound)
• [UPDATED] Battle cries/spy advises/medic advises now use a sizeof to determine the length of the message arrays, meaning you can add more/remove any of the messages.
• [UPDATED] Commands syntax to ZCMD.
• [UPDATED] Added pause detection since being paused triggered the anticheat player variables. Anticheat will ignore any paused player/not being updated.
• [UPDATED] RenderMessage(ToAll) function will now carry the last color used ({FFFFFF}) to the next line. It works like a charm and the maximum message string for one message was increased to 356 (was 256). It will work perfectly without flaws with single or at most three colors; if more colors are used it will work correctly but the lines will not be even (one line may contain 100 letters while the other 110) since the maximum length for each line is 100 characters PLUS 8 for each color code used, and with different colors in each line the maximum length can vary, and sometimes the result can be higher than the 144 characters limit that can be displayed in one line, resulting in no message sent. This will only happen for long rainbow messages but it will work for all other common uses. The function is pretty slow so use with caution (27 seconds for 100k renderings)
• [UPDATED] /changemode command no longer admits invalid mode-map combinations.
• [UPDATED] /set renamed to /mapcreation; /editvars renamed to /server for higher comprension of commands.
• [UPDATED] Cleaner code for building damage checking.

• [FIXED] Playing times not properly saving when restarting/changing teams. This should work now.
• [FIXED] Random team selection has been fixed. There's a 50% chance for both teams to be picked. If the team that is picked is full or will disbalance the game the player will be assigned to the other team instead.
• [FIXED] Total current live time no longer gets bugged if you change classes/teams while spawning multiple times.


Gameplay/balance

• [NEW] Mini crits added; Taunting, Jarate & Special hitting now does mini crits (35% additional damage) instead of a full crit. Full crits now ignore distance damage reduction. Mini crit added to player nametags in yellow, full criticals are displayed in green.

• [UPDATED] Dispenser now refills 1/4 of the player current weapons' ammo. Increased the delay on which a dispenser refills ammo/metal. They also regenerate metal at a slower rate.
• [UPDATED] Melee weapons now have a 25% chance (not counting server modifiers) to perform a full critical hit.
• [UPDATED] Medic now has katana instead of chainsaw.
• [UPDATED] Teleporters; they now have a completely shared level & upgrade progress. In addition both share the same HP. If either is destroyed by the engineer the remaining one returns to level 1 and loses it's upgrade progress. Sapping/shooting either will mean sapping both.
• [UPDATED] You will no longer trigger weapon refilling (pickups, dispenser, base box) if you already have your max ammo values. This still works for engineers who have max ammo but don't have full metal.
• [UPDATED] Sapper now applies the damage at a slower rate. Increased the damage a bit to even it out.
• [UPDATED] Players are no longer healed instantly when entering a spawn zone. They will still be immune to damage while in it.
• [UPDATED] Demoman's swap between Satchels and grenades are no longer a taunt. Ammo is kept for both separately, you can still swap them at any time with the taunt key but it will make no taunt/animation. Satchels ammo reduced to 16 and grenades ammo reduced to 32.
• [UPDATED] Medic uber has been reworked. Uber still lasts 15 seconds. It is a bit easier to get it fully charged. Anyone ubercharged will be healed three times faster than normally, instead of completely being fully healed. Medics still get immediatelly healed up after activating ubercharge. Ubercharge will get removed away from player that is not being healed with the charged medigun.
• [UPDATED] CTF (Capture the flag) flag can now be returned back to it's spawn if a team meber picks up his flag that had been dropped by a carrying enemy in any point of the map.
• [UPDATED] Soldier now haves 16 max ammo at the rocket launcher (previously 30).

• [FIXED] Soldier RPG ammo discounts are now 100% accurate, now using OnPlayerUpdate to check if there was any ammo change.
• [FIXED] Headshots completely fixed on chrouched players.
• [FIXED] Damage distance calculations. I've changed the algorithim (though it's practically the same), it now works the following way: For the minigun, damage is reduced by 7.5% every 5 meters of distance between shoter and victim; And for the other weapons the damage is reduced by 10% every 10 meters of distance between both players. Percentages were previously rounded down to the nearest 10 multiple, now they are rounded down to the nearest 5 multiple. Distance calculations are subject to change and by following the format you can modify each's weapon different algorithms.
• [FIXED] Spy's disguise HP is now correctly increased when healed by enemy medics and correctly decreases if it gets overhealed.

• [REMOVED] Due to technical issues coming with new 0.3z features spy can no longer be damaged while invisible with fire arms. It will still work with melee/fire/explosions/etc..


Other/Design:

• [NEW] Effects (Visual & Audio) when teleporting from entrance to exit on both sides.
• [NEW] Dispenser model changed; sounds when refilling metal & ammo via dispenser added.
• [NEW] Engineer's buildings now make a sound when damaged, are sapped, and level up.
• [NEW] New textdraws for class selection, team selection, disguise selector and construction PDA. They are now all more informative and easier to get. They all now use preview models.
• [NEW] Spawns zones are shown on the map for each player's team spawn respectively.
• [NEW] Medigun (minigun) has been altered to not to affect the healing player with animation or blood, instead the bullets will tresspass the receiver ID and the effect will still be applied.
• [NEW] All classes (except heavy) now have custom team colored objects.
• [NEW] Voice Events: they get called whenever an event happens and triggers a voice message for that varies for each class. Voice lines taken from TF2 text files (not the sound files). Added event triggers for: Kill, Assist, OnFire, Heal, Ubercharge, Capture, Defense, Destruction, DoubleJump, SentryKill, Backstab, Headshoot & Engineer, & they are easily modificable.
• [NEW] New responses added to engineer when building/losing a building.
• [NEW] KOTH (King of the hill) gamemode. Both teams must hold the point for a total of 5 minutes of gameplay. The first one that reaches that limit wins. This brings three new maps for this mode.
• [NEW] Maps: ctf_airport; koth_panopticon; koth_blueberry; koth_area69; sd_carrier;
• [NEW] Pause detection; if a player pauses it's added to the right of their name as a black label.

• [UPDATED] CTF (Capture the flag) flag has been changed to be a dynamic object instead of a pickup in order to avoid confusion with the actual ammo briefcases. The flag is now team colored and will be added to the carriers' hand whenever he takes it.
• [UPDATED] SD (Special Delivery) australium are now added to the carriers' hand with the color of their team.
• [UPDATED] Turrets now have a team color. Double turrets added when turret reaches level two. Changed turret messages.
• [UPDATED] Sounds when refilling ammo with any method added. Sounds for dispenser metal regeneration/giving out area also added. Damaging/sapping an engineer's building will also trigger a new sound.

• [FIXED] Most of building's particle effects; smoke/sparks will get correctly applied most of the times, and in case they don't, they wont overlay with other objects.

__________________________________________________ _______________________________________________

Pictures

View in gallery (150+ photos):
http://imgur.com/a/0EWKP


__________________________________________________ _______________________________________________


F.A.Q

How to make myself admin?
You can either login to rcon (which gives you access to all admin commands), set your level to manager (after logging to record) or editting manually the database to set yourself as a developer (account_level = 7).

How to change class?
Press KEY_NO (Default 'N')

How to change team?
Press KEY_YES (Default 'Y')

How to disguise as spy?
While having the camera on your hands press KEY_WALK (Default 'Alt') and KEY_FIRE (Default 'LMB') at the same time.

How to close disguise / construction PDA
Click on the background

How to go invisible as spy?
Press KEY_LOOK_BEHIND (Default 'MMB')

How to call for a medic?
Press twice the KEY_SECONDARY_ATTACK (Default 'F')

How to call for an spy?
Press KEY_WALK (Default 'Alt') and KEY_SECONDARY_ATTACK (Default 'F') at the same time.

My stats aren't being saved!
You need to achieve active player level. (Either by being set by the admins or by playing two hours).

I can't carry a building!
You need to have the shovel in your hand.

How can I destroy my buildings?
Press KEY_AIM (Default 'RMB') while holding the detonator and it'll open up the destruction PDA instead of the construction one.

Can I taunt?
Yes, press KEY_CTRL_BACK (Default 'H') when holding a weapon.

--------------------------------------------------------------------------------------------------------------
Disclaimer: I (me) do not own any of the trademarks used or implied in this gamemode. Those trademarks such as Team Fortress 2 are reserved for the owner of them and I do not claim to own any of them. This is only a modification made by myself, I claim to own the script, not the trademarks.

Due the nature of the script there is no way this can or could be licensed. I, as creator of the script do not want the script to be reproduced anywhere but here, in the SA:MP official forums. Feel free to modify the script to meet your needs but in no way remove the official credits.
--------------------------------------------------------------------------------------------------------------

Credits
pawn Code:
/*
    Team Fortress Mode for SA:MP

    Scripted enterily by CuervO / Louis from the scratch
    Full credits to VALVe for the main gamemode/classes ideas
   
    Thanks to the creators of the following functions/plugins:
    sscanf; MySQL; Whirlpool; ZCMD; streamer; timestamp; IsPlayerAimingAt
    HOLDING; PRESSED; RELEASED; timerfix, and Of course the SA:MP Team.

    Special Thanks to the betatester team by order by help given:
    "Murdoxix",Alejandro,"Shejken",Dale,"Fernando","Fuzzy","Raphael"
   
    Ultra Special Thanks (yes, more special than the previous ones):
    Argonath RPG Development Team for giving me the chance of learning a lot.
    R* Ronnel, R* RON, R* Xcasio & The other community leaders & managers for trusting me.
*/


This thread is open for modifications, likewise to the script. Previous versions will remain listed so check the thread from time to time to check for updates. I will not provide personal support on the script so don't ask me to setup anything for you. If you want to add things you're on your own, feel free to suggest new stuff that I might add using a similar template to the bug reports.
PLEASE! No Raven's Roleplay related here. Thank you.
Reply
#2

Looks great,+rep'ed

Only one bad thing:

Put the whole server package,people will need

include <dudb>
Reply
#3

Good job, this is very creative.
Reply
#4

This is very good....I gave you Rep+
Reply
#5

Quote:
Originally Posted by Tamer T
View Post
Looks great,+rep'ed

Only one bad thing:

Put the whole server package,people will need

include <dudb>
Reminded me i scrapped dudb for dini; I left dudb there as the dudb also includes dini.
Reply
#6

Why would you use dini in this and the problem with removing lag shooting is that a hack can be made to kill all players on the server. Other than that though, I compliment that you didn't make another roleplay gamemode.
Reply
#7

Quote:
Originally Posted by SuperViper
View Post
Why would you use dini in this and the problem with removing lag shooting is that a hack can be made to kill all players on the server. Other than that though, I compliment that you didn't make another roleplay gamemode.
There are hacks for many things. Yet there are always admins and even voteban included in this case. As for dini:

Code:
Password=
AccountLevel=4
HelpMsgs=1
JoinStamp=1353258290
RegDate=16/11/2012
LastIp=127.0.0.1
LastOnline=24-11-2012 at 5:9:11
Scout=3 1 1 0 0 209.8634 543 0
Soldier=0 0 1 0 0 0.0000 489 0
Pyro=0 0 0 0 0 0.0000 55 0
Demoman=1 1 0 0 0 297.0000 177 0
Heavy=8 3 2 1 0 0.0000 356 0
Engineer=0 0 0 0 0 0.0000 33 2 0
Sniper=0 0 1 0 0 0.0000 429 0 0
Medic=0 0 0 0 0 0.0000 0 222.5 0 0
Spy=4 2 0 2 0 3465.6401 1277 3 2 0
LiveStats=3 1 1 0 0 2000.0000 222.5 0 1 2 0 0 0 334
Stats=16 0 5 3 0 3972.5036 222.5 0 2 2 0 0 0 1265 8 0
Suspictions=0 1 0 0 0 0 0
LastStamp=1353906551
There's your answer. If I ever get reports of such hacks, making an anticheat is easy, specially when you take care of the damage like in this gamemode.
Reply
#8

Looks cool bro, going to test it.. Let's see
Reply
#9

BTW Can you gimme full server package? It will be good for everyone
Reply
#10

Quote:
Originally Posted by Lucky™
View Post
BTW Can you gimme full server package? It will be good for everyone
Uploaded as full package.
Reply
#11

It would be better if you maybe added some screens
Reply
#12

Quote:
Originally Posted by CuervO
View Post
Pictures
Yes, lots. Though they are from really early stages of development, you'll get an idea of how the game is. Health bar for example changed. Since i am not going to manually resize over 40 pictures here's a link to the album.

http://s965.beta.photobucket.com/use...library/as489a
A really bit of reading wouldn't hurt
Reply
#13

Quote:
Originally Posted by CuervO
View Post
A really bit of reading wouldn't hurt
Yeah, it's just me getting blind now days Anyway i like, almost like TF2 game

Keep it up!
Reply
#14

It`s nice GM
Reply
#15

Nice Gamemode

NB: Can i see some pics?
Reply
#16

Awesome GM,
i use it for my server, if you want join check my signature
Reply
#17

Tested It on my try-out server,works fine.Really,really fine...
Reply
#18

Thanks, apretiating the outcome.
Reply
#19

Looks cool. Well done.
Reply
#20

what the....this was my idea..i am also creating this gamemode..it was almost complete and you released your own version?

anyways +rep
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)