Starthp.amxx
This is my first plug-in. I’m not submitting it because it has already been made and a lot of the source is from the tutorial. So far I haven’t had any one on one help and nobody has double checked my source. I posted here because I would like suggestions before I continue scripting.
Thanks...
The AMXX Community for your...
Support of amateur scripters
Bailopen for your...
Amazing Tutorial & AMX Mod X Studio
Jonny Got His Gun for your...
Weapon Arena Plug-in & Inspiration
Team OAT for...
Letting me use their server to test
BDC (Blue Delusion Coders) for...
Inspiration and support
Bob Fincheimer for...
Inspiration
Everybody else I forgot! Sorry!
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "StartHP"
#define VERSION "1.0"
#define AUTHOR "OAT|BDC"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("amx_starthp", "100")
register_logevent("event_roundstart", 2, "0=World triggered", "1=Round_Start" )
}
/*
public client_disconnect(id)
{
remove_task(id)
return PLUGIN_HANDLED
}
*/
public event_roundstart()
{
new players[32], num
get_players(players, num)
new i
for (i=0; i<num; i++)
{
if (get_cvar_num("amx_starthp") > 0)
{
set_user_health(players[i], get_cvar_num("amx_starthp"))
}
}
}
//StartAP: cs_set_user_armor
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
__________________
K.I.S.S. Keep It Simple Stupid