The plugin (kz_multiplugin) apparently does exactly this. But there must be another way to get the player to the start.
Code:
public ResetHUD(id) {
//Check if Checkpoints are on...
if (get_cvar_num("kz_checkpoints") != 0) {
//Check if user has a Checkpoint
if (gCheckpoint[id]) {
//Yep he has one... Move him to it...
if (CheckCheckpoint(id)) move_to_check(id)
cs_set_user_money(id,0)
//Check if limited Checkpointuse is on
if (get_cvar_num("kz_limitedcp") != 0) {
//Yep.. It is on... Delete Checkpoint
gCheckpoint[id]=false
client_print(id,print_chat,"[KZ] Checkpoint Used...")
}
}else{
if (gHasTimer[id]) ResetTimer(id,1)
}
}else{
if (gHasTimer[id]) ResetTimer(id,1)
}
//Chech if he just joined
if (gJoined[id]) {
get_user_origin(id,gLastCheckpointPos[id])
gJoined[id]=false
if (get_cvar_num("kz_checkpoints")==1) {
client_print(id,print_chat,"* ^"KZ Multiplugin^" is enabled")
client_print(id,print_chat,"* Use checkpoints by typing ^"checkpoint^" & ^"gocheck^" in console")
client_print(id,print_chat,"* if you get stuck say ^"/stuck^" to jump back to last checkpoint")
}else{
client_print(id,print_chat,"* ^"KZ Multiplugin^" is disabled")
}
}
//Check if he gets godmode
if (get_cvar_num("kz_godmode") != 0) {
//Yep, it's on... Give it too him...
set_user_godmode(id,1)
}
//Check if auto scout give is on...
if (get_cvar_num("kz_scout") != 0) {
//Yep, it's on... Give it too him...
GiveScout(id)
}
//Check if he gets semiclip...
if (get_cvar_num("kz_semiclip") != 0) {
//Yep, it's on... Give it too him...
entity_set_int(id, EV_INT_solid, SOLID_TRIGGER)
}else{
//Nope, it's off... Make sure he has clip
entity_set_int(id, EV_INT_solid, SOLID_BBOX)
}
//Check if nightmode is on...
if (get_cvar_num("kz_nightmode") != 0) {
//Yep, it's on...
set_lights("a")
}else{
//Nope, it's off...
set_lights("n")
}
//Check if he is hooked to something
if (gIsHooked[id]) RopeRelease(id)
cs_set_user_money(id,gMoney[id])
}