Not sure this is the right place but this is a compiled plugin and will be checkd mainly made by The Specialist (raphero2000). i was wondering if you guys can look here and let me know if its ok.. we did this for tutorial purposes. so let us know..
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
//new g_Switch
public plugin_init()
{
register_plugin("Tut_2" , "1" , "Sav/RapHero2000") //register plugin
//g_Switch = register_cvar("my_Switch","1");
register_clcmd("amx_new_health" , "new_health") //register the comand the user will type
register_cvar("tut_new_health" , "1") // register the cvar for the plugin
register_event("Battery" , "armor_pickup" , "be") //this is the event that detects armor pick up
register_event("CurWeapon" , "max_speed" , "be") // this event detects wepaon events
}
public new_health(id) // heres the fucntion that we called with param 2 from the clcmd
{
new g_health = get_user_health(id)
if(get_cvar_num("tut_new_health")== 0 ) // check to see if it is on 0 == off
{
client_print(id , print_chat , "[TUT] That Command Is Not Available")
return PLUGIN_HANDLED // ends the operation if it is off (if cvar is 0)
}
else // else switches the statement
{
if(get_cvar_num("tut_new_health")==1) // if it is on (on ==1)
{
set_user_maxspeed(id, 350.0) // this sets the users speed to pretty fast
set_user_rendering(id, kRenderFxGlowShell, 50, 50, 50, kRenderTransAlpha, 30) // set the user to inviasable
set_user_footsteps(id , 1) // this will set the player to silent footsteps (0 is normal)
set_user_gravity(id , 0.50) // sets the users gravity ( 1.0 = normal)
set_user_armor(id, 250) // sets the users armor to 250
get_user_health(id) // gets the user health
set_user_health(id , (g_health + 100)) // set the users health +100 of curent
client_print(id, print_chat , "[TUT] You Are Unstoppable!")
}
}
return PLUGIN_HANDLED //ends operation
}
public armor_pickup(id) // this is the battery event we registered
{
set_user_armor(id, 250) // here we reset the users armor
}
public max_speed(id) // here is the CurWeapon event we registered
{
set_user_maxspeed(id, 350.0) // here were resetting the maxspeed
}