Raised This Month: $ Target: $400
 0% 

how to replace A-Z -> a-z


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 07-10-2010 , 22:10   how to replace A-Z -> a-z
Reply With Quote #1

PHP Code:
public say_handled(id)
{
    
replace(A..B..C..D..E..F..G...etc)
    
//to a..b..c..d..e..f..g

thanks for help.
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-10-2010 , 22:21   Re: how to replace A-Z -> a-z
Reply With Quote #2

Quote:
Originally Posted by biscuit628 View Post
PHP Code:
public say_handled(id)
{
    
replace(A..B..C..D..E..F..G...etc)
    
//to a..b..c..d..e..f..g

thanks for help.
http://www.amxmodx.org/funcwiki.php?go=func&id=60
__________________
Bugsy is offline
PattyBiena
BANNED
Join Date: Jul 2010
Location: Argentina
Old 07-11-2010 , 03:49   Re: how to replace A-Z -> a-z
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <amxmisc>

new g_maxplayersg_msgSayText

public plugin_init()
{
    
register_clcmd("say""hooksay")
    
    
g_maxplayers get_maxplayers()
    
g_msgSayText get_user_msgid("SayText")
}

public 
hooksay(id)
{
    new 
Messages[192], SzAlive is_user_alive(id)
    
read_args(Messages191)
    
remove_quotes(Messages); strtolower(Messages)
    
    new 
name[33]
    
get_user_name(idname32)
    
    if(!(
Messages[0] == '@' || !strlen(Messages)))
        return 
PLUGIN_CONTINUE;
    
    (
SzAlive format(Messages191"^3%s: ^1%s"nameMessages) : format(Messages191"^1*DEAD* ^3%s: ^1%s"nameMessages))
    
    for(new 
1<= g_maxplayersi++)
    {
        if(!
is_user_connected(i))
            continue;
        
        if(
SzAlive && is_user_alive(i) || !SzAlive && !is_user_alive(i))
        {
            
message_begin(MSG_ONEg_msgSayText, {000}, i);
            
write_byte(id);
            
write_string(Messages);
            
message_end();
        }
    }
    
    return 
PLUGIN_HANDLED

PattyBiena 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 07:05.


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