Ported on request
http://forums.alliedmods.net/showthread.php?p=32514
Code:
/*
* CheckPoint System v0.1.4 - By DarkShadowST
*
* Just a Checkpoint Program I Made
* A Lot Like a Few others out there...
*
* Thanks To f117bomb
* His Respawn Code Helped Me Understand Tasks!! FINALLY
*
* I'd also like to thank: knekter2004
* He wrote an awesome all-in-one kz map system and it works very well!
* I'm just releasing this one because I'm developing a very cool checkpoint system...
* This just has the standard mode, but I'm going to be doing a full rewrite to make this
* Compatible with the new checkpointing format..
* This is a beta release, although I've tested it and it seems to work well
* Anyway, Enjoy -DarkShadowST-
*
*
* When you respawn, if the admin allows it, you can spawn with guns specified
* We were playing on assault with this and having a blast
* Everybody was respawning and teleporting to the roof by the CT spawns
* I put shield on and we had like a huge shield war, very entertaining =D
* Anyway, Specify What Weapons You Want to Get when you respawn with the cvar
* cp_weaponstring (Defualt Value Is r (Scout (supposed to make you jump farther??))
*
* Note: If Shield is specified, it is given first and can be used with a rifle...
* There are some bugs associated with this (an invisible shield)
* So think about that When you are setting cp_weaponstring
**********************************************************************************
*
* Ported By KingPin( [email protected] ). I take no responsibility
* for this file in any way. Use at your own risk. No warranties of any kind.
*
***********************************************************************************
*
* Commands:
*
* say /check - add a point
* say /checkpoint - add a point
* say /cp - add a point
* say /tele - teleport to a point
* say /teleport - teleport to a point
* say /tp - teleport to a point
* say /imstuck - if ur stuck, moves to last point
* say /stuck - if ur stuck, moves to last point
* say /godmode - toggles godmode
* say /godme - toggles godmode
* say /god - toggles godmode
* say /noclip - toggles noclip
* say /noclipme - toggles noclip
* say /clip - toggles noclip
* say /kill - Kill Yourself If You're REALLY Stuck (Doesn't Decrease Frags)
* say /killme - Kill Yourself If You're REALLY Stuck (Doesn't Decrease Frags)
* amx_godalloff - Turns Godmode Off For Everybody
* amx_godallon - Turns Godmode On For Everybody
* amx_noclipallon - Turns NoClip On For Everybody
* amx_noclipalloff - Turns NoClip On For Everybody
************************************************************
* CVARS:
*
* cp_mode - Turns The Checkpointing On And Off
* cp_clearcp - Deletes Checkpoints After Death
* cp_respawn - Turns Respawning On And Off
* cp_giveweapon - Turns GiveWeapons On Respawn On And Off
* cp_weaponstring - Defines Weapons To Be Given When Automatically Respawned
* cp_godmode - Turns Allowing say /godmode On And Off
* cp_noclip - Turns Allowing say /noclip On And Off
* cp_killing - Turns Allowing Killing On/Off (Death Doesn't Decrease Frags)
* cp_guntime - Time After Respawning That You Are Given Guns
************************************************************
* WeaponString Help:
*
* Guns Will NOT Be Given Unless cp_giveweapon Is Set To 1
* Once You Set cp_giveweapon To 1 (amx_rcon cp_giveweapon 1) Follow The Instructions Below:
*
* Simply add in whatever flags coorespond with whatever guns you want
* You Can have every gun in the game if you want
* Example: Type The Line Below In Game On a Dedicated Server
* amx_rcon cp_weaponstring abcdefghijklmnopqrstuvwx2345
*
* If you Use That Example ^ When You Respawn, It Will Give You:
* - Every Primary Weapon In The Game
* - Every Secondary Weapon In The Game
* - Kevlar And a Helmet
* - A Hand Grenade, FlashBang, And Smoke Grenade
************************************************************
* WeaponString Flags:
*
* a - USP
* b - Glock
* c - Deagle
* d - P whatever
* e - FiveSeven
* f - Duelies
* g - Pump Shotgun
* h - Auto Shotgun
* i - mp5
* j - TMP
* k - P90
* l - MAC10
* m - UMP45
* n - AK47
* o - SIG
* p - COLT
* q - Aug
* r - Scout
* s - AWP
* t - G3SG1
* u - Sig550
* v - para
*
* w - galil
* x - famas
*
* 1 - kev
* 2 - Kev& helm
* 3 - flash
* 4 - Hand Grenade
* 5 - Smoke Grenade
* 6 - Diffuse Kit
* 7 - Shield
************************************************************
* ChangeLog:
*
* 0.1.4 - Fixed a Respawn Bug, 5 seconds after choosing
* Your team, it will now make sure you're not
* On the SPECTATOR team.
* If you're not, it will respawn you
* ---------------------------------------
* New Touch of Code Makes it So
* You only have to change CP_MAXPOINTS
* Dont worry about all the math on version 0.1.3
*
* 0.1.3 - Implimented New Checkpointing System
* Allows you to store up to 100 Checkpoints (Easily Modified)
* Note: 0 Can Be Used As a Checkpoint
* With Maxpoints At 100 You Use Slots 0 - 99
* Zero Is Counted With Those
* ---------------------------------------
* (CP_MAXPOINTS * 3) + 2 = 2ndArrayValue
* new lotsofpoints[33][2ndArrayValue]
* ---------------------------------------
* Do You Understand The Above??
* Added In-Game Help "Menu"
* Added 4 New Commands (amx_godalloff, amx_godallon, etc.)
* Fixed Some Respawn Bugs (When a Person Joins the Server They Now Spawn)
*
* 0.1.2 - Initial Writing and Release
*
************************************************************
*
* For Additional Help, PM Me or Hit Me Up On MSN ([email protected])
* Thanks and Have Fun!
*
* Updated Last On: April 08, 2004
*
*
*
*/
/////////////////////////////
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>