Raised This Month: $ Target: $400
 0% 

Crap.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xDrugz
Senior Member
Join Date: Jul 2011
Location: return 4;
Old 11-28-2011 , 09:12   Crap.
Reply With Quote #1

Crap.

Last edited by xDrugz; 10-19-2012 at 12:38.
xDrugz is offline
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
xDrugz
Senior Member
Join Date: Jul 2011
Location: return 4;
Old 11-28-2011 , 10:52   Re: [HELP] Replace String
Reply With Quote #3

Crap.

Last edited by xDrugz; 10-19-2012 at 12:37.
xDrugz is offline
MyPc
Senior Member
Join Date: Sep 2011
Old 11-28-2011 , 11:18   Re: [HELP] Replace String
Reply With Quote #4

Quote:
Originally Posted by xDrugz View Post
Works but it still shows the letter 'a'.
http://img11.**************/img11/3893/halflife04.png

How can I do that it will replace what I wrote and it does not add a new line?
return PLUGIN_HANDLED
MyPc is offline
xDrugz
Senior Member
Join Date: Jul 2011
Location: return 4;
Old 11-28-2011 , 11:34   Re: [HELP] Replace String
Reply With Quote #5

All I'm impressed that replaces the letter that I added in utf.
xDrugz is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 11-28-2011 , 13:30   Re: [HELP] Replace String
Reply With Quote #6

replace_all( ) ?
Devil259 is offline
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 08:25.


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