Raised This Month: $ Target: $400
 0% 

HNS XP Mod - How to make ability


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 12-23-2013 , 04:36   Re: HNS XP Mod - How to make ability
Reply With Quote #1

Try this, made comments for you.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Invisibility on Experience"
#define VERSION "1.0.0"
#define AUTHOR "Kia"

// !!!
// ===============================================================================
//     WARNING! THIS PLUGIN IS UNTESTED! USE ON OWN RISK!
// ===============================================================================
// !!!

// ===============================================================================
//     Editing begins here
// ===============================================================================

// Multiplicator for getting more time - In this case 1.5, means if I'm level 5 (Invis. Time = 5 * INVIS_MULTI = 7,5 [seconds])
#define INVIS_MULTI 1.5

// ===============================================================================
//     and stops here. DO NOT MODIFY BELOW UNLESS YOU KNOW WHAT YOU'RE DOING
// ===============================================================================

// ===============================================================================
//     Variables
// ===============================================================================

/* Defines */

// Random Number for creating our task
#define TASK_ID_INVIS 8918

/* Integer */

// Saving our Level here
new g_iLevel[33]

// ===============================================================================
//     plugin_init
// ===============================================================================

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
/* ClCmds */
    
    // Our test command for getting invisible
    
register_clcmd("say invis""ClCmd_Invis")
}

// ===============================================================================
//     ClCmd_Invis - Called when someone typed invis in the console
// ===============================================================================

public ClCmd_Invis(id)
{
    
// Calculating the Time we have here
    
new Float:flInvisTime g_iLevel[id] * INVIS_MULTI
    
    
// Making the player invisible
    
set_user_rendering(idkRenderFxNone000kRenderTransAlpha0)
    
    
// Creating a task with our calculated time to make him visible again
    
set_task(flInvisTime"MakePlayerVisible"TASK_ID_INVIS id)
}

// ===============================================================================
//     MakePlayerVisible - Makes the player visible again
// ===============================================================================

public MakePlayerVisible(id)
{
    
// Reducing TASK_ID_INVIS to get the actual player
    
id -= TASK_ID_INVIS
    
    
// Make the player Visible
    
set_user_rendering(idkRenderFxNone000kRenderTransAlpha255

__________________
Kia is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode