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



Clear chat - BASITJALIL - 06.05.2011

Here is my code wtf is wrong
4 errors
pawn Код:
if (strcmp("/Clearchat", cmdtext, true, 10) == 0)
    {
  if(PlayerInfo[playerid][pAdminLevel] >= 1) {
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        GameTextForAll("Chat cleared By An Admin!", 1000,1);

        return 1;
    }
    return 0;
}
Errors
Код:
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : error 017: undefined symbol "PlayerInfo"
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : warning 215: expression has no effect
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : error 001: expected token: ";", but found "]"
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : error 029: invalid expression, assumed zero
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
What's wrong
If someone know please tell me a right code


Re: Clear chat - Unknown1234 - 06.05.2011

.................................................. ..............
try :-

if (strcmp(cmdtext,"/Clearchat", true, 10) == 0)


Re: Clear chat - xRyder - 06.05.2011

Your player enum is wrong. Take a look at your enum, maybe you have 'pInfo' or such...
And don't use SendClientMessageToAll() 11 times when you can speed it up and shorten it with a loop.


Re: Clear chat - Unknown1234 - 06.05.2011

Код:
if (strcmp(cmdtext, "/Clearchat", true, 10) == 0)
    {
  if(PlayerInfo[playerid][pAdminLevel] >= 1) {
        for(new i =0; i<=11; i++) SendClientMessageToAll(COLOR_WHITE, " ");
        GameTextForAll("Chat cleared By An Admin!", 1000,1);
        return 1;
    }
    return 0;
}



Re: Clear chat - Retardedwolf - 06.05.2011

The first line of the script already shows that you shouldn't even think about scripting for a community for free.


Re: Clear chat - Unknown1234 - 06.05.2011

Quote:

BASITJALIL's signature
Searching For a good Community
I'll Script for free
Requirements
Must Have 10 Players Online In Night
Must Hosted

LOL!!!! +1 Retardedwolf