SA-MP Forums Archive
Help script CLEARED 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)
+--- Thread: Help script CLEARED CHAT (/showthread.php?tid=632680)



Help script CLEARED CHAT - Sanel123 - 17.04.2017

Eh I made a script that can clean pet me to do it turn out we erori here Eror D:\Old City\gamemodes\OldCity.pwn(123) : error 017: undefined symbol "PlayerInfo"
D:\Old City\gamemodes\OldCity.pwn(123) : warning 215: expression has no effect
D:\Old City\gamemodes\OldCity.pwn(123) : error 001: expected token: ";", but found "]"
D:\Old City\gamemodes\OldCity.pwn(123) : error 029: invalid expression, assumed zero
D:\Old City\gamemodes\OldCity.pwn(123) : fatal error 107: too many error messages on one line

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


4 Errors.

If you can help
here's a script
//CMDDDDD
COMMAND:clearedchat (playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, "You are not authorized");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
return 1;
}
#define SCMA SendClientMessageToAll


Re: Help script CLEARED CHAT - Astralis - 17.04.2017

pawn Код:
CMD:clearedchat(playerid,params[])
{
  if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, "You are not authorized");
  for(new i = 0; i < 100; i++) SendClientMessageToAll(-1,"");


  return 1;
}



Re: Help script CLEARED CHAT - 1fret - 17.04.2017

Quote:
Originally Posted by Sanel123
Посмотреть сообщение
Eh I made a script that can clean pet me to do it turn out we erori here Eror D:\Old City\gamemodes\OldCity.pwn(123) : error 017: undefined symbol "PlayerInfo"
D:\Old City\gamemodes\OldCity.pwn(123) : warning 215: expression has no effect
D:\Old City\gamemodes\OldCity.pwn(123) : error 001: expected token: ";", but found "]"
D:\Old City\gamemodes\OldCity.pwn(123) : error 029: invalid expression, assumed zero
D:\Old City\gamemodes\OldCity.pwn(123) : fatal error 107: too many error messages on one line

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


4 Errors.

If you can help
here's a script
//CMDDDDD
COMMAND:clearedchat (playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, "You are not authorized");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
return 1;
}
#define SCMA SendClientMessageToAll
Thats how it suppose to look
PHP код:
COMMAND:clearedchat (playeridparams[])
{
    if(
pInfo[playerid][Admin] < 1) return SCM(playerid, -1"You are not authorized");
    {
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
    }
    return 
1;




Re: Help script CLEARED CHAT - Sanel123 - 18.04.2017

Erors D:\Old City\gamemodes\OldCity.pwn(123) : error 017: undefined symbol "PlayerInfo"
D:\Old City\gamemodes\OldCity.pwn(123) : warning 215: expression has no effect
D:\Old City\gamemodes\OldCity.pwn(123) : error 001: expected token: ";", but found "]"
D:\Old City\gamemodes\OldCity.pwn(123) : error 029: invalid expression, assumed zero
D:\Old City\gamemodes\OldCity.pwn(123) : fatal error 107: too many error messages on one line

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


4 Errors.


Re: Help script CLEARED CHAT - Astralis - 18.04.2017

Player info is not even defined, how does your other commands work?

pawn Код:
new PlayerInfo[MAX_PLAYERS][pinfo];
enum pinfo
{
   Admin
};



Re: Help script CLEARED CHAT - GangstaSunny. - 18.04.2017

PHP код:
for(new 015i++){SCMA(-1," ");} 
Use the code above instead of
PHP код:
SCMA
SCMA
SCMA
SCMA
...
...
...
... 



Re: Help script CLEARED CHAT - DarkSkull - 18.04.2017

PHP код:
#define SCMA(%0,%1) SendClientMessageToAll(%0,%1) 
COMMAND:clearedchat (playeridparams[])
{
if(
PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1"You are not authorized");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
return 
1;

If you really don't wanna loop, Try this. But looping is 10x better.