Raised This Month: $ Target: $400
 0% 

[ESF] Powerlevel transformation problem [SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
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
Karibeean
Junior Member
Join Date: May 2013
Old 05-30-2016 , 17:54   Re: [ESF] Powerlevel transformation problem
Reply With Quote #2

What is the ki limit?

Edit:

Try set max ki using

setClientKI

Last edited by Karibeean; 05-30-2016 at 17:57.
Karibeean is offline
Turbo ESF
Junior Member
Join Date: May 2016
Location: Argentina
Old 05-30-2016 , 19:30   Re: [ESF] Powerlevel transformation problem
Reply With Quote #3

Quote:
Originally Posted by Karibeean View Post
What is the ki limit?

Edit:

Try set max ki using

setClientKI
I tried what he says and what happens is that KI rises but only the blue bar not the numbers.
I also tried the ACPL (Actual PowerLevel) but does not work
Turbo ESF is offline
Karibeean
Junior Member
Join Date: May 2013
Old 05-30-2016 , 20:06   Re: [ESF] Powerlevel transformation problem
Reply With Quote #4

PHP Code:
setClientPL(idgetClientPL(id) + 9995
->

PHP Code:
setClientPL(id, (getClientPL(id) + 9995)) 
Karibeean is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-30-2016 , 21:31   Re: [ESF] Powerlevel transformation problem
Reply With Quote #5

Quote:
Originally Posted by Karibeean View Post
PHP Code:
setClientPL(idgetClientPL(id) + 9995
->

PHP Code:
setClientPL(id, (getClientPL(id) + 9995)) 


???????
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Turbo ESF
Junior Member
Join Date: May 2016
Location: Argentina
Old 05-30-2016 , 21:50   Re: [ESF] Powerlevel transformation problem
Reply With Quote #6

Quote:
Originally Posted by Karibeean View Post
PHP Code:
setClientPL(idgetClientPL(id) + 9995
->

PHP Code:
setClientPL(id, (getClientPL(id) + 9995)) 
I just compiling and does not work

Last edited by Turbo ESF; 05-30-2016 at 21:50.
Turbo ESF is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 05-30-2016 , 22:25   Re: [ESF] Powerlevel transformation problem
Reply With Quote #7

Quote:
Originally Posted by Turbo ESF View Post
I tried what he says and what happens is that KI rises but only the blue bar not the numbers.
I also tried the ACPL (Actual PowerLevel) but does not work
May be it's a float, so try it and see.

P.S. I don't know anything about the game, I'm only guessing.

Edit: I was talking about with setClientKI
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 05-30-2016 at 22:26.
wickedd is offline
Karibeean
Junior Member
Join Date: May 2013
Old 05-31-2016 , 18:04   Re: [ESF] Powerlevel transformation problem
Reply With Quote #8

Try

PHP Code:
setClientPL(idgetClientPL(id) + 9995 
for

PHP Code:
esf_set_powerlevel(idesf_get_powerlevel(id) + 9995
Karibeean is offline
Turbo ESF
Junior Member
Join Date: May 2016
Location: Argentina
Old 05-31-2016 , 19:55   Re: [ESF] Powerlevel transformation problem
Reply With Quote #9

Quote:
Originally Posted by Karibeean View Post
Try

PHP Code:
setClientPL(idgetClientPL(id) + 9995 
for

PHP Code:
esf_set_powerlevel(idesf_get_powerlevel(id) + 9995
Do not compile
Turbo ESF is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 06-01-2016 , 09:20   Re: [ESF] Powerlevel transformation problem
Reply With Quote #10

I don't know your problem, try to change the limit, but I made some optimizations to your plugin.
PHP Code:
#include <amxmodx>
#include <esf>

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

new g_clientpl[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_clientpl[id]=0;

public 
clcmd_powerup_end(id)
    if(
task_exists(id))
         
remove_task(id)


public 
clcmd_turbo(id)
{
    if(!
g_clientpl[id])
    {
        
g_clientpl[id]= getClientPL(id);
        
set_task(0.1"task_powerup"id, .flags="b")
    }
}
    
public 
task_powerup(id){
    
g_clientpl[id]+=9995
    setClientPL
(id,  g_clientpl[id])


Last edited by siriusmd99; 06-01-2016 at 09:29.
siriusmd99 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 15:11.


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