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



Define ClearChatForPlayer + What's better file or something else? - Riddick94 - 12.12.2010

Hey.. why when i use ClearChatForPlayer(playerid); in OnPlayerConnect i'm getting error:

Код:
C:\Documents and Settings\Kakarotto\Pulpit\new.pwn(110) : error 036: empty statement
#define here:
Код:
#define ClearChatForPlayer(%0) 	foreach2(i, 50)SendClientMessage(%0, COLOR_WHITE, " ");
2nd:

I need to know what is good for register system (open, close, write, read etc.) for DeatchMatch mode. Dini? file?
if File i need to know how to create a file with PlayerName because tutorials from Sa-Mp wiki is really bad.


Re: Define ClearChatForPlayer - Riddick94 - 12.12.2010

#Refresh.


Re: Define ClearChatForPlayer - Biesmen - 12.12.2010

I'd suggest to use this:

Near the top of the script:
pawn Код:
forward ClearChatForPlayer(playerid);
The function:

pawn Код:
public ClearChatForPlayer(playerid)
{
    if (IsPlayerConnected(playerid))
    {
           SendClientMessage(playerid, 0xFFFFFFAA, " ");
            return 1;
    }
}



Re: Define ClearChatForPlayer - IstuntmanI - 12.12.2010

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
I'd suggest to use this:

Near the top of the script:
pawn Код:
forward ClearChatForPlayer(playerid);
The function:

pawn Код:
public ClearChatForPlayer(playerid)
{
    if (IsPlayerConnected(playerid))
    {
           SendClientMessage(playerid, COLOR_GREY, " ");
            return 1;
    }
}
Correct:
pawn Код:
stock ClearChatForPlayer(playerid)
{
    foreach2(i, 50) SendClientMessage(playerid,COLOR_WHITE, " ");
}



Re: Define ClearChatForPlayer - The_Moddler - 12.12.2010

pawn Код:
#define ClearChat(%0) for(new i=0;i<50;i++)SendClientMessage((%0),0xFFFFFF," ")



Re: Define ClearChatForPlayer - Riddick94 - 13.12.2010

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
pawn Код:
#define ClearChat(%0) for(new i=0;i<50;i++)SendClientMessage((%0),0xFFFFFF," ")
Thanks a lot!

2nd wish.. anybody can help with player file? Create, open etc. i've been on Sa-Mp Wiki with that but it did not help. I don't understood. And what better to use.. File or Dini? - Dini i know how to use.