AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   New round re-setting values. (https://forums.alliedmods.net/showthread.php?t=113084)

Lure.d 12-23-2009 09:43

New round re-setting values.
 
I made a setting in menu that makes km_shop_*_bought = 1;
* is he fb gravity nofall invisible hp armor footsteps and stuff.
I tested and menu sets the values, and also checks them if i bought it actually,
and if i did, dont let me to do it again with same item, also returning message.
But i tried to do the resets for round only items, such as nofall, invisibility, and
setting all bought items to 0 so i can buy the again.

Unfortunantely its still nofall damage, still invisibility...
Heres roundstart stuff + plugin_init()
Code:

public plugin_init() {
some registering and other stuff...
    register_event("HLTV", "EventNewRound", "a", "1=0", "2=0");
}

public EventNewRound(id) {
    if (km_shop_invisible_bought == 1) {
    set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255)
    km_shop_invisible_bought = 0;
}
    km_shop_he_bought = 0;
    km_shop_fb_bought = 0;
    km_shop_gravity_bought = 0;
    km_shop_nofall_bought = 0;
    km_shop_footsteps_bought = 0;
    km_shop_hp_bought = 0;
    km_shop_armor_bought = 0;
}

So on next round, i have still same returns that i already have bought an item, the nofall still takes no damage, and user keeps being transparent.

So can anyone help me, how to reset values on new round, what function it uses or etc etc...


All times are GMT -4. The time now is 04:06.

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