Raised This Month: $ Target: $400
 0% 

[ESF] Powerlevel transformation problem [SOLVED]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Turbo ESF
Junior Member
Join Date: May 2016
Location: Argentina
Old 05-30-2016 , 17:22   [ESF] Powerlevel transformation problem [SOLVED]
Reply With Quote #1

Hi, i am new to plugins and, I made a plugin consisting of:

E (Powerup)+T (Turbo) = increased power (PL)
the problem is that when I transform my ki becomes menor.
I leave the code have if someone can solve it

PHP Code:
#include <amxmodx>
#include <esf>

#define PLUGIN "ESF AumentarPL"
#define VERSION "1.0"
#define AUTHOR "Turbo"

const TASK_ID 1324

new g_powerup[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("+powerup""clcmd_powerup_start")
    
register_clcmd("-powerup""clcmd_powerup_end")
    
register_clcmd("turbo""clcmd_turbo")
}

public 
clcmd_powerup_start(id)
{
    
g_powerup[id] = 1
}

public 
clcmd_powerup_end(id)
{
    
g_powerup[id] = 0
    remove_task
(id+TASK_ID)
}


public 
clcmd_turbo(id)
{
    if(
g_powerup[id] == 1)
    {
        
g_powerup[id] = 2

        set_task
(0.1"task_powerup"id+TASK_ID, .flags="b")
    }
}
    

public 
task_powerup(id)
{
    
id -= TASK_ID
    
    setClientPL
(idgetClientPL(id) + 9995)

PL before transformation:


PL after transformation:

Last edited by Turbo ESF; 07-20-2016 at 13:47. Reason: photos
Turbo ESF is offline
 



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 18:35.


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