Raised This Month: $12 Target: $400
 3% 

[HELP] need this plugin once per map


Post New Thread Reply   
 
Thread Tools Display Modes
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
Old 07-10-2022, 02:39
crystal xtreme
This message has been deleted by crystal xtreme.
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-10-2022 , 03:38   Re: [HELP] need this plugin once per map
Reply With Quote #2

PHP Code:
new bool:g_bXPGiftRetrieved[33]

public 
Cmd_GetXP(id)
{
    if(!
g_bXPGiftRetrieved[id] && get_user_flags(id) & ADMIN_LEVEL_B)
    {
        new 
iRandom random_num(50150); g_bXPGiftRetrieved[id] = true;
        
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

__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-10-2022 , 07:17   Re: [HELP] need this plugin once per map
Reply With Quote #3

What was the point of creating a new thread?
The above plugin won't work properly. That's once per player id, not once per map.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-10-2022 , 08:39   Re: [HELP] need this plugin once per map
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
What was the point of creating a new thread?
The above plugin won't work properly. That's once per player id, not once per map.
Actually that's exactly what author requested, he wanted it to be available for each player once per map, but you cannot expect everyone to explain their request properly.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-10-2022 at 08:42.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-10-2022 , 10:05   Re: [HELP] need this plugin once per map
Reply With Quote #5

In a game where no players can join and leave until the map ends, sure, then it will work.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


Thread Tools
Display Modes

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:57.


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