Action Script for XP Block
Posted: Mon Sep 28, 2026 1:07 pm
This is the action needed to make an xp block into blockmaker to work with exolents hns xp mod
Also, to use this you need to use his API thing, im using this on my server so dont say this dont work.
Tested On: FSCM ( Flaxans Course Maker )(a remake of bunnyhop course maker and blockmaker ).
Oh, and another thing.. if u look into this code you can see "( id, str_to_num(szProperty1) );" wich means you need a blockmaker that has "Set Properties" item in the menu.
For an example: i belive BCM5 has it
Code: Select all
action_XPBLOCK(id, OverrideTimer, ent)
{
new Float:fTime = halflife_time();
if (fTime >= gfXPNextUse[id] || OverrideTimer)
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
new szProperty1[33];
Get_BlockProperty(ent, 1, szProperty1);
hnsxp_add_user_xp( id, str_to_num(szProperty1) );
gfXPNextUse[id] = fTime + 170;
set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
show_hudmessage(id, "YOU GOT A FEW MORE XP!");
}
}
} Tested On: FSCM ( Flaxans Course Maker )(a remake of bunnyhop course maker and blockmaker ).
Oh, and another thing.. if u look into this code you can see "( id, str_to_num(szProperty1) );" wich means you need a blockmaker that has "Set Properties" item in the menu.
For an example: i belive BCM5 has it