[SOLVED]remove text from text
hi.
how can i remove a text in text? example : client_cmd("name %s @AFK", playername) client_cmd("name %s",playername) so whats here different?! player is afk & the name willbe changed to "name @AFK". ... after player comes back in game, the name willbe changed to standard name what he use.i dont like to save the original names anywhere. is there a way to do it without saving the original name? so anything like to remove @AFK in name or so. |
Re: remove text from text
Quick and easy way
PHP Code:
|
Re: remove text from text
hmm... problem?
PHP Code:
|
Re: remove text from text
You are setting the name as "name@AFK" without a space then are trying to remove " @AFK" with a space.
"name@AFK" should be "name @AFK". If you dont want a space separator, remove the space from the replace() call. Code:
|
Re: remove text from text
PHP Code:
when i try with name %s @AFK, i have a problem & this is a space there is not allowded. when u write in concole : name buggsy is cool << ur name willbe buggsy. u must write it so : name "buggsy is cool" so i cant add it so : client_cmd(id,"name "%s @AFK"",szName) so i must do it without space. but the problem is its not workin :( |
Re: remove text from text
PHP Code:
PHP Code:
PHP Code:
|
Re: remove text from text
perfect :P ty
|
Re: [SOLVED]remove text from text
I would also suggest not sending the "name" command at all. There is no point to change the clients name on the clients computer. Just set the users "info" attribute "name". This will change it in-game only.
So, this will prevent someone going afk (manually of course) and then leaving. Then they come back and they obviously aren't afk but their name will say they are :). |
Re: [SOLVED]remove text from text
Quote:
|
Re: [SOLVED]remove text from text
I added my justification above while you were writing that :).
|
| All times are GMT -4. The time now is 13:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.