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

Name reward


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MBf
Member
Join Date: Aug 2016
Old 07-31-2017 , 12:50   Name reward
Reply With Quote #1

Hello,

I've been looking for but I can not find ... I want a player to have access to the (!dice and !lvl) commands only if they have nickname Arena.LaLeagane.Ro

Can someone help me with this plugin?

Thank you in advance.
__________________
PLAY.ACEARENA.RO
WWW.ACEARENA.RO

Last edited by MBf; 07-31-2017 at 12:52.
MBf is offline
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 07-31-2017 , 14:45   Re: Name reward
Reply With Quote #2

Try this:
PHP Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

#define PLUGIN_AUTHOR "Hexah"
#define PLUGIN_VERSION "1.00"


#define NAME " Arena.LaLeagane.Ro "

public Plugin myinfo 
{
    
name ""
    
author PLUGIN_AUTHOR
    
description ""
    
version PLUGIN_VERSION
    
url "csitajb.it"
};

public 
void OnPluginStart()
{
    
AddCommandListener(OnNameCmd"sm_rtd");
    
AddCommandListener(OnNameCmd"sm_lvl");
}

public 
Action OnNameCmd(int client, const char[] nameint argc)
{
    
char sName[128];
    
GetClientName(clientsNamesizeof(sName));
    if (
StrContains(sNameNAME) != -1)
    {
        return 
Plugin_Continue;
    }
    
ReplyToCommand(client"[SM] You need to have"NAME"in your name in order to use this command!");
    return 
Plugin_Stop;

I assume that the cmds already exists.
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!

Last edited by Papero; 07-31-2017 at 14:51.
Papero is offline
MBf
Member
Join Date: Aug 2016
Old 07-31-2017 , 20:01   Re: Name reward
Reply With Quote #3

Goes, blocks commands but once added Arena.LaLeagane.Ro in name still does not unlock my 2 commands

Quote:
Originally Posted by Papero View Post
Try this:
PHP Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

#define PLUGIN_AUTHOR "Hexah"
#define PLUGIN_VERSION "1.00"


#define NAME " Arena.LaLeagane.Ro "

public Plugin myinfo 
{
    
name ""
    
author PLUGIN_AUTHOR
    
description ""
    
version PLUGIN_VERSION
    
url "csitajb.it"
};

public 
void OnPluginStart()
{
    
AddCommandListener(OnNameCmd"sm_rtd");
    
AddCommandListener(OnNameCmd"sm_lvl");
}

public 
Action OnNameCmd(int client, const char[] nameint argc)
{
    
char sName[128];
    
GetClientName(clientsNamesizeof(sName));
    if (
StrContains(sNameNAME) != -1)
    {
        return 
Plugin_Continue;
    }
    
ReplyToCommand(client"[SM] You need to have"NAME"in your name in order to use this command!");
    return 
Plugin_Stop;

I assume that the cmds already exists.
__________________
PLAY.ACEARENA.RO
WWW.ACEARENA.RO
MBf is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 07-31-2017 , 23:40   Re: Name reward
Reply With Quote #4

Try removing the spaces to left and right of string
hmmmmm is offline
MBf
Member
Join Date: Aug 2016
Old 08-01-2017 , 02:55   Re: Name reward
Reply With Quote #5

It works, thank you for your advice.
__________________
PLAY.ACEARENA.RO
WWW.ACEARENA.RO

Last edited by MBf; 08-01-2017 at 02:55.
MBf is offline
THEKING.
Junior Member
Join Date: Jun 2017
Old 08-20-2017 , 15:26   Re: Name reward
Reply With Quote #6

For chat commands ? !rs etc
THEKING. is offline
Reply



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 14:53.


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