Replacing with "str..." - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Replacing with "str..." (
/showthread.php?tid=125154)
Replacing with "str..." -
Mechscape - 02.02.2010
Код:
if(strfind(text, ":(", true) != -1 || strfind(text, ":D", true) != -1 || strfind(text, ":P", true) != -1 || strfind(text, "xd", true) != -1 || strfind(text, ":S", true) != -1 || strfind(text, ":/", true) != -1 ||strfind(text, "Admin", true) != -1 || strfind(text, "aod", true) != -1)
{
}
How do make it: (Example)
I say: "
" but will showed all only " " (space).
Will replaced to space... what...
Sorry for bad english.
Re: Replacing with "str..." -
Mechscape - 03.02.2010
bamp?
Re: Replacing with "str..." -
s0nic - 03.02.2010
Well here is a example..tho it uses strcmp:
pawn Код:
//OnPlayerText
if(strcmp(text, "haha", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s laughs out loud.", sendername);
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 0;
}
Re: Replacing with "str..." -
Mechscape - 04.02.2010
That is ProxDetector, you didnt understand me.... Read again first post please.
Re: Replacing with "str..." -
Niixie - 04.02.2010
Dude? Who cares if thats with the prox? you can just delete that and BINGO! you have a code that if someone types haha it will say *someone laughs out loud. ?
go back to basic scripting
Re: Replacing with "str..." -
Jefff - 04.02.2010
Use/Search strreplace/str_replace function.
Re: Replacing with "str..." -
s0nic - 05.02.2010
Quote:
Originally Posted by Picharelo
That is ProxDetector, you didnt understand me.... Read again first post please.
|
I understood you perfectly..i said that was a example, therefore you would have to modify a tiny part. Common sense!