AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Crap. (https://forums.alliedmods.net/showthread.php?t=172975)

xDrugz 11-28-2011 09:12

Crap.
 
Crap.

MyPc 11-28-2011 10:13

Re: [HELP] Replace String
 
Quote:

Originally Posted by xDrugz (Post 1604122)
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 "?"

xDrugz 11-28-2011 10:52

Re: [HELP] Replace String
 
Crap.

MyPc 11-28-2011 11:18

Re: [HELP] Replace String
 
Quote:

Originally Posted by xDrugz (Post 1604166)
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

xDrugz 11-28-2011 11:34

Re: [HELP] Replace String
 
All I'm impressed that replaces the letter that I added in utf.

Devil259 11-28-2011 13:30

Re: [HELP] Replace String
 
replace_all( ) ?


All times are GMT -4. The time now is 08:25.

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