This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

XP Code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 12-26-2011 , 08:28   XP Code
Reply With Quote #1

Hello,

This code only allows terrorist to take xp block one time per map.

Can someone fix it so after one round you can take it again.

PHP Code:
ActionXPBlock(ident)
{
    if ( 
cs_get_user_team(id) == CS_TEAM_T )
    {
        if ( !
g_xpblock_used[id] )
        {
            new 
property[5];
            
GetProperty(ent1property);
            
hnsxp_add_user_xp(idstr_to_num(property));
            
g_xpblock_used[id] = true;
            
            
set_hudmessage(025500.010.1800.01.00.250.252);
            
show_hudmessage(id"You got %i more XP!"str_to_num(property));
        }
    }
        else
        {
            
set_hudmessage(025500.010.1800.01.00.250.252);
            
show_hudmessage(id"Only Terrorists can take XP Block!");
    }

__________________
Groven is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-26-2011 , 10:15   Re: XP Code
Reply With Quote #2

arrayset( g_xpblock_used, 0, sizeof g_xpblock_used );
in your new round event
__________________
xPaw is offline
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 01-01-2012 , 15:43   Re: XP Code
Reply With Quote #3

I can't find it.

Can you do it for me? Or someone else please.
Attached Files
File Type: sma Get Plugin or Get Source (bollnas_blockmaker.sma - 571 views - 129.4 KB)
__________________
Groven is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 01-01-2012 , 19:30   Re: XP Code
Reply With Quote #4

Haha were actually going to tell you if you can't find the new round event, then don't come to scripting help section.
Opened the script and saw that there weren't a new round event xD

Put the code xpaw provided in the ham_killed event or at the ham_spawn event.

Last edited by Erox902; 01-01-2012 at 19:31.
Erox902 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 19:59.


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