SA-MP Forums Archive
<<<<<<<<helppp>>>>>>>>>>>> - 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: <<<<<<<<helppp>>>>>>>>>>>> (/showthread.php?tid=266794)



<<<<<<<<helppp>>>>>>>>>>>> - HayZatic - 06.07.2011

Код:
public OnPlayerText(playerid, text[])
	{
 		for(new i; i < sizeof(SwearWords); i++)
    {
		if(strfind(text, SwearWords[i], true) != -1) // IF you want SwearWords not to be case sensitiv change ' true ' to ' false '
    {
    	SendClientMessage(playerid, Red, "Please don't swear.");
		return 1;
	}
 	}
  		return 1;
  	}
		if(ismuted[playerid])
        SendClientMessage(playerid, 0xFF00CC, "You are muted");
        return 0;
    {
	 	return 1;
	}
And im Getting

Код:
C:\Documents and Settings\Chris\My Documents\HayZaticFreeRoam\filterscripts\HZadmin.pwn(224) : error 010: invalid function or declaration
C:\Documents and Settings\Chris\My Documents\HayZaticFreeRoam\filterscripts\HZadmin.pwn(226) : error 010: invalid function or declaration
C:\Documents and Settings\Chris\My Documents\HayZaticFreeRoam\filterscripts\HZadmin.pwn(228) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: <<<<<<<<helppp>>>>>>>>>>>> - Wesley221 - 06.07.2011

pawn Код:
public OnPlayerText(playerid, text[])
{
    for(new i; i < sizeof(SwearWords); i++)
    {
        if(strfind(text, SwearWords[i], true) != -1) // IF you want SwearWords not to be case sensitiv change ' true ' to ' false '
        {
            SendClientMessage(playerid, Red, "Please don't swear.");
            return 1;
        }
    }
    if(ismuted[playerid])
    {
        SendClientMessage(playerid, 0xFF00CC, "You are muted");
        return 0;
    }
    return 1;
}
Try this, also try to keep your codes indented: is way more organized for yourself, but also for everyone else


Re: <<<<<<<<helppp>>>>>>>>>>>> - HayZatic - 06.07.2011

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    for(new i; i < sizeof(SwearWords); i++)
    {
        if(strfind(text, SwearWords[i], true) != -1) // IF you want SwearWords not to be case sensitiv change ' true ' to ' false '
        {
            SendClientMessage(playerid, Red, "Please don't swear.");
            return 1;
        }
    }
    if(ismuted[playerid])
    {
        SendClientMessage(playerid, 0xFF00CC, "You are muted");
        return 0;
    }
    return 1;
}
Try this, also try to keep your codes indented: is way more organized for yourself, but also for everyone else
Great It Worked! THank You!