Whats the problem - 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: Whats the problem (
/showthread.php?tid=105024)
Whats the problem -
Striker_Moe - 27.10.2009
Whereґs the problem here..
Код:
if(cmdtext[idx] == "fuck")
{
SendClientMessageToAll(NICESKY,"{ [Global] Megan: First get some hairs on your dick please. }");
return 1;
}
Re: Whats the problem -
Correlli - 27.10.2009
Use
strcmp-function to compare strings or
strfind-function to search for a substring in a string.
Re: Whats the problem -
Striker_Moe - 27.10.2009
Okay tried it BUT,
if(strfind(cmdtext[idx],"fuck",true,0))
{
SendClientMessageToAll(NICESKY,"{ [Global] Megan: First get some hairs on your dick please. }");
return 1;
}
Megan keeps saying her sentence when you DONT say fuck, if you say fuck, nothing happens, just Server: Unknown Command.
Why?
Re: Whats the problem -
Nero_3D - 27.10.2009
remove the [idx] after cmdtext