Whats Wrong? - 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 Wrong? (
/showthread.php?tid=95231)
Whats Wrong? -
Eazy_Efolife - 02.09.2009
I Put This Under OnPlayerText
Код:
if (strcmp("lol", text, true, 10) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s Laughs", sendername);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
I got the other sendername stuff, But when im in-game and when I type lol, nothing happens? Am I missing something?
Re: Whats Wrong? -
Fj0rtizFredde - 02.09.2009
Try to change:
pawn Код:
if (strcmp("lol", text, true, 10) == 0)
To
pawn Код:
if(strcmp(text, "lol", true) == 0)
Thats how I use it in my Gamemode
Re: Whats Wrong? -
Eazy_Efolife - 02.09.2009
Doesn't Work, My Player just says: lol :P
Re: Whats Wrong? -
Fj0rtizFredde - 02.09.2009
Try:
pawn Код:
if(strcmp(text, "lol", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s Laughs", sendername);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
That looks just like the one I use
Re: Whats Wrong? -
Eazy_Efolife - 02.09.2009
Quote:
Originally Posted by Fj0rtizFredde
Try:
pawn Код:
if(strcmp(text, "lol", true) == 0) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s Laughs", sendername); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); return 0; }
That looks just like the one I use
|
mine looks exactly the same!
Re: Whats Wrong? -
Fj0rtizFredde - 03.09.2009
But in your first post you did not have return 0;
Re: Whats Wrong? -
Eazy_Efolife - 03.09.2009
i had return nothing.
Didnt put a return there