Raised This Month: $ Target: $400
 0% 

Help me with set_task?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Arje
Senior Member
Join Date: Apr 2020
Location: Córdoba, Argentina
Old 05-23-2020 , 14:58   Help me with set_task?
Reply With Quote #1

Hello !! well, I am using this plugin and it works correctly, but I would like the event of granting money after defuse to happen 1 or 2 seconds after I have defused,
I think this can be done with the set_task function but I don't know how to apply it.

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <csx>

static const PLUGIN_NAME[] = "Bomb Plant Money Bonus"
static const PLUGIN_VERSION[] = "1.0"
static const PLUGIN_AUTHOR[] = "Locks"

new PCvarBonus
new PCvarDefuseBonus

public plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)
    
PCvarBonus register_cvar("amx_plant_bonus""150")
    
PCvarDefuseBonus register_cvar("amx_defuse_bonus""500")     // the defuse bonus could be changed 
}

public 
bomb_planted(id)
{
    new 
money cs_get_user_money(id)
    new 
bonus get_pcvar_num(PCvarBonus)
    
cs_set_user_money(idmoney bonus)
}

public 
bomb_defused(id)
{
    new 
money cs_get_user_money(id)
    new 
bonus get_pcvar_num(PCvarDefuseBonus)
    
cs_set_user_money(idmoney bonus)


Last edited by Arje; 05-23-2020 at 15:01.
Arje 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 17:09.


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