Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <fakemeta>
- #include <colorchat>
- #define MAX_PLAYERS 32
- new bool:g_hs_mode
- new bool:g_RestartAttempt[MAX_PLAYERS+1]
- public plugin_init() {
- register_plugin("HeadShot Mod", "1.1", "ConnorMcLeod")
- register_event("TextMsg", "eRestartAttempt", "a", "2=#Game_will_restart_in")
- register_event("ResetHUD", "eResetHUD", "be")
- register_clcmd("clcmd_fullupdate", "fullupdateCmd")
- }
- public fullupdateCmd() {
- return PLUGIN_HANDLED_MAIN
- }
- public eRestartAttempt() {
- new players[MAX_PLAYERS], num
- get_players(players, num, "a")
- for (new i; i < num; ++i)
- g_RestartAttempt[players[i]] = true
- }
- public eResetHUD(id) {
- if (g_RestartAttempt[id]) {
- g_RestartAttempt[id] = false
- return
- }
- event_player_spawn(id)
- }
- event_player_spawn(id)
- {
- if(g_hs_mode)
- {
- display_status(id)
- }
- }
- public forward_traceline(Float:v1[3], Float:v2[3], noMonsters, pentToSkip)
- {
- if(!is_user_alive(pentToSkip))
- return FMRES_IGNORED
- static entity2 ; entity2 = get_tr(TR_pHit)
- if(0 > entity2 > 32 || !is_user_alive(entity2))
- return FMRES_IGNORED
- if(pentToSkip == entity2)
- return FMRES_IGNORED
- if(get_tr(TR_iHitgroup) != 1) {
- set_tr(TR_flFraction,1.0)
- return FMRES_SUPERCEDE
- }
- return FMRES_IGNORED
- }
- display_status(id=0)
- {
- for(new i = 0; i < 3; i++)
- {
- ColorChat(id, NORMAL, "[ HS Only ] ^x04Od teraz możesz zabić tylko ^x03HeadShotem!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement