This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Small request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
liivar07
Junior Member
Join Date: Jan 2013
Old 06-02-2013 , 13:23   Small request
Reply With Quote #1

Could someone please edit this plugin, so it says for players, (who aren't vips (flag t)) who are trying to roll the dice with one of the commands, a message in chatbox saying "Only VIPs can roll the dice."

I think it must be edited here, but I'm not sure, so I attachted the sma to thread.
Code:
public HandleSay2(id,Speech[])
{
	if(get_user_flags(id) & ADMIN_LEVEL_H)
	{
		if ( (equali(Speech, "roll the dice")) || (equali(Speech, "i feel lucky")) || (equali(Speech, "suerte")) || (equali(Speech, "dados")) || (equali(Speech, "rollthedice")) || (equali(Speech, "roll teh dice")) || (equali(Speech, "rtd")) )
		{
			rollthedice(id);
		}
	}

	
	return PLUGIN_CONTINUE;
}
Attached Files
File Type: sma Get Plugin or Get Source (roll_the_dice.sma - 457 views - 115.8 KB)
liivar07 is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 06-02-2013 , 14:53   Re: Small request
Reply With Quote #2

PHP Code:
public HandleSay2(id,Speech[])
{
    if ( (
equali(Speech"roll the dice")) || (equali(Speech"i feel lucky")) || (equali(Speech"suerte")) || (equali(Speech"dados")) || (equali(Speech"rollthedice")) || (equali(Speech"roll teh dice")) || (equali(Speech"rtd")) )
    {
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            
rollthedice(id);
        }
        else
        {
            
client_print(idprint_chat"[AMXX] Only VIPs can roll the dice.")
        }
    }
    
    return 
PLUGIN_CONTINUE;


Last edited by EpicMonkey; 06-03-2013 at 05:03. Reason: Silly me :3
EpicMonkey is offline
liivar07
Junior Member
Join Date: Jan 2013
Old 06-02-2013 , 17:08   Re: Small request
Reply With Quote #3

Nope. Now it spams that message every time I write something.
liivar07 is offline
WhyThis
Senior Member
Join Date: May 2013
Old 06-02-2013 , 17:36   Re: Small request
Reply With Quote #4

try this:
Code:
public HandleSay2(id,Speech[]) {     if(get_user_flags(id) & ADMIN_LEVEL_H)     {         if ( (equali(Speech, "roll the dice")) || (equali(Speech, "i feel lucky")) || (equali(Speech, "suerte")) || (equali(Speech, "dados")) || (equali(Speech, "rollthedice")) || (equali(Speech, "roll teh dice")) || (equali(Speech, "rtd")) )         {             rollthedice(id);         }         else         {             client_print(id, print_chat, "[AMXX] Only VIPs can roll the dice.")         }                 }             return PLUGIN_CONTINUE; }
WhyThis is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 06-02-2013 , 17:43   Re: Small request
Reply With Quote #5

@WhyThis
That's the same code Epic posted.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
liivar07
Junior Member
Join Date: Jan 2013
Old 06-02-2013 , 17:50   Re: Small request
Reply With Quote #6

Quote:
Originally Posted by WhyThis View Post
try this:
Code:
public HandleSay2(id,Speech[]) {     if(get_user_flags(id) & ADMIN_LEVEL_H)     {         if ( (equali(Speech, "roll the dice")) || (equali(Speech, "i feel lucky")) || (equali(Speech, "suerte")) || (equali(Speech, "dados")) || (equali(Speech, "rollthedice")) || (equali(Speech, "roll teh dice")) || (equali(Speech, "rtd")) )         {             rollthedice(id);         }         else         {             client_print(id, print_chat, "[AMXX] Only VIPs can roll the dice.")         }                 }             return PLUGIN_CONTINUE; }
Nope. Now it doesn't give any message.
liivar07 is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 06-03-2013 , 05:03   Re: Small request
Reply With Quote #7

my god ... fixed

Last edited by EpicMonkey; 06-03-2013 at 05:04. Reason: sometimes i just go around doing crazy stuff without thinking
EpicMonkey is offline
liivar07
Junior Member
Join Date: Jan 2013
Old 06-03-2013 , 07:59   Re: Small request
Reply With Quote #8

At last it works.
Thank you so much.
liivar07 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 09:02.


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