AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   XP Block Action Script (https://forums.alliedmods.net/showthread.php?t=120344)

Crazybeer 03-03-2010 18:06

XP Block Action Script
 
Is this Xp Block Action script right?

Because when a Terrorist go on it it came up Only Terrorists can take XP Block! and sometimes a Terrorist wont get XP can someone help me ?

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!");
        }
    }



wrecked_ 03-03-2010 18:18

Re: XP Block Action Script
 
https://forums.alliedmods.net/showthread.php?t=110946

Includes macros for the updated XP Mod (somewhere in the thread) as well.

Crazybeer 03-03-2010 18:48

Re: XP Block Action Script
 
I am using version 0.0.1

wrecked_ 03-03-2010 18:55

Re: XP Block Action Script
 
Time for an upgrade?

:D

Crazybeer 03-03-2010 19:08

Re: XP Block Action Script
 
I fixed the code.

It's

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!");
    }




All times are GMT -4. The time now is 08:47.

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