AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Double XP for VIP players (OCIXCROMS XP for ZE) (https://forums.alliedmods.net/showthread.php?t=335628)

StickBarosanu 12-19-2021 08:35

Double XP for VIP players (OCIXCROMS XP for ZE)
 
Hi! I got this plugin from another forum i think is ocixcrom forum, and i want to make it to give double xp for vip players when they escape and win the round..if someone can help me i would be glad. Thank you!! The plugin is the made for ZE mod by Raheem. Ocixcrom knows bcs he made this plugin.
Code:

#include <amxmodx>
#include <crxranks>
#include <zombie_escape>

public plugin_init()
{
        register_plugin("CRXRanks: Zombie Escape", "1.0", "OciXCrom")
}

public ze_roundend(iWinTeam)
{
        if(iWinTeam == ZE_TEAM_HUMAN)
        {
                new iPlayers[32], iPnum
                get_players(iPlayers, iPnum, "ae", "CT")

                for(new i; i < iPnum; i++)
                {
                        crxranks_give_user_xp(iPlayers[i], _, "ze_humans_escape", CRXRANKS_XPS_REWARD)
                }
        }
}

public ze_user_infected(iVictim, iInfector)
{
        if(is_user_connected(iInfector))
        {
                crxranks_give_user_xp(iInfector, _, "ze_user_infected", CRXRANKS_XPS_REWARD)
        }
}


OciXCrom 12-19-2021 09:43

Re: Double XP for VIP players (OCIXCROMS XP for ZE)
 
Nothing needs to be modified in the code in order to do that.
The rank system's configuration file allows you to set a different reward for VIP players in the [XP Rewards] section.

Code:
reward_name = <normal reward> <VIP reward>

For your request this would simply be:

Code:
ze_humans_escape = 5 10

Or whatever numbers you want.

StickBarosanu 12-19-2021 10:01

Re: Double XP for VIP players (OCIXCROMS XP for ZE)
 
Thank you OcixCrom you are the best!!


All times are GMT -4. The time now is 11:32.

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