View Single Post
Author Message
Taha_rajper
Member
Join Date: Jun 2021
Location: Under The Sea
Old 07-09-2022 , 23:47   [HELP] need this plugin once per map
Reply With Quote #1

Can Anyone change this plugin and set it Only One Time per Map allowed , Players can spam /getxp and keep getting xp ? pls help

PHP Code:
#include <amxmodx>
#include <cromchat>
#include <crxranks>

public plugin_init()
{
    
register_plugin("CRXRanks: GetXP Cmd""1.0""OciXCrom")
    
register_clcmd("say /getxp""Cmd_GetXP")
    
register_clcmd("say_team /getxp""Cmd_GetXP")
    
crxranks_get_chat_prefix(CC_PREFIXcharsmax(CC_PREFIX))
}

public 
Cmd_GetXP(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_B)
    {
        new 
iRandom random_num(50150)
        
crxranks_give_user_xp(idiRandom)
        
CC_SendMessage(id"Yay! You received &x04%i XP&x01!"iRandom)
    }
    else
    {
        
CC_SendMessage(id"You have no access to this command.")
    }

    return 
PLUGIN_HANDLED

Taha_rajper is offline