Raised This Month: $ Target: $400
 0% 

Crap.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MyPc
Senior Member
Join Date: Sep 2011
Old 11-28-2011 , 10:13   Re: [HELP] Replace String
Reply With Quote #2

Quote:
Originally Posted by xDrugz View Post
How can I replace the letter A with another string?
I try but can not.

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

public plugin_init()
{
    
register_clcmd("say","say_hook")
    
register_clcmd("say_team","say_hook")
}

public 
say_hook(id)
{
    new 
message[300] = "a"
    
new letter_a[3];
    
newChar('À'letter_asizeof letter_a 1);
    
copy(message,299,letter_a)
    
replace(message,299,letter_a,"À")

Code:
#include <amxmodx>
#include <newchars>

public plugin_init()
{
	register_clcmd("say","say_hook")
	register_clcmd("say_team","say_hook")
}

public say_hook(id)
{
	new message[300] = "a"
	new letter_a[3];
	newChar('?', letter_a, sizeof letter_a - 1); // I Couldnt Copy this 'A' thing
	replace(message,299,"a", letter_a)
	
	client_print(id, print_chat, "%s", message)
}
i couldnt copy 'A' thing to the compiler it always says "?"

Last edited by MyPc; 11-28-2011 at 10:16.
MyPc is offline
 



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 08:25.


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