Samp -
Douglas651 - 28.08.2013
Alguem pode me ajudar a fazer Um Comando /limparchat pf
e outra coisa queria ver os comandos que os players do meu servidor digitam e possivel?
por exemplo o player digita /ex e aparece la pra mim: *Admin: O Player xxxxxxxx Digitou o Comando /ex
Obrigado a quem puder me ajudar
Abaixo Um exemplo de como e Meus comandos de adm
PHP код:
if(strcmp(cmd, "/repararid", true) == 0)
{
if(GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"Admin: Vocк nгo tem Nivel Necessбrio para usar este comando");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Admin: Vocк nгo estб em um veнculo.");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Admin: Veнculo reparado!");
return 1;
}
Re: Samp -
PT - 28.08.2013
pawn Код:
CMD:limparchat(playerid)
{
for(new i = 0; i <MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
for(new x = 0; x < 50; x++)
{
SendClientMessage(x, -1, " ");
}
}
}
new pt[128], ptname[MAX_PLAYER_NAME];
GetPlayerName(playerid, ptname, MAX_PLAYER_NAME);
format(pt, sizeof(pt), "Chat limpo por %s.", ptname);
SendClientMessageToAll( -1, pt ) ;
return 1;
}
deve ser isto
e o /vercmds isto aqui deve servir
http://forum.sa-mp.com/showpost.php?...79&postcount=6
Re: Samp -
Douglas651 - 28.08.2013
Quote:
Originally Posted by PT
pawn Код:
CMD:limparchat(playerid) { for(new i = 0; i <MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { for(new x = 0; x < 50; x++) { SendClientMessage(x, -1, " "); } } } new pt[128], ptname[MAX_PLAYER_NAME]; GetPlayerName(playerid, ptname, MAX_PLAYER_NAME); format(pt, sizeof(pt), "Chat limpo por %s.", ptname); SendClientMessageToAll( -1, pt ) ; return 1; }
deve ser isto
e o /vercmds isto aqui deve servir
http://forum.sa-mp.com/showpost.php?...79&postcount=6
|
Vou tentar mais desse jeito que ta ai so adms vao poder usar?
Compilo direitinho mas na hora de limpar o chat ele nao limpa ele so da um espaзo no chat
Re: Samp -
PT - 28.08.2013
assim so adm usa
pawn Код:
CMD:limparchat(playerid)
{
if(GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"Admin: Vocк nгo tem Nivel Necessбrio para usar este comando");
for(new i = 0; i <MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
for(new x = 0; x <90; x ++)
{
SendClientMessage(x, -1, " ");
}
}
}
new pt[128], ptname[MAX_PLAYER_NAME];
GetPlayerName(playerid, ptname, MAX_PLAYER_NAME);
format(pt, sizeof(pt), "Chat limpo por %s.", ptname);
SendClientMessageToAll( -1, pt ) ;
return 1;
}
Re: Samp -
Douglas651 - 28.08.2013
Quote:
Originally Posted by PT
assim so adm usa
pawn Код:
CMD:limparchat(playerid) { if(GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"Admin: Vocк nгo tem Nivel Necessбrio para usar este comando"); for(new i = 0; i <MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { for(new x = 0; x <90; x ++) { SendClientMessage(x, -1, " "); } } } new pt[128], ptname[MAX_PLAYER_NAME]; GetPlayerName(playerid, ptname, MAX_PLAYER_NAME); format(pt, sizeof(pt), "Chat limpo por %s.", ptname); SendClientMessageToAll( -1, pt ) ; return 1; }
|
Nao Ta Limpando o chat
Re: Samp -
Speedpz - 28.08.2013
tenta esse (nгo testei ainda)
pawn Код:
CMD:lc(playerid)
{
if(GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"ERRO: Voce nгo й admin ou nгo tem Level"");
for(new i = 0; i <MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
for(new x = 0; x <90; x ++)
{
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
}
}
}
new pt[128], ptname[MAX_PLAYER_NAME];
GetPlayerName(playerid, ptname, MAX_PLAYER_NAME);
format(pt, sizeof(pt), "Chat limpo por %s.", ptname);
SendClientMessageToAll( -1, pt ) ;
return 1;
}
Re: Samp -
PT - 28.08.2013
Quote:
Originally Posted by Speedpz
tenta esse (nгo testei ainda)
pawn Код:
CMD:lc(playerid) { if(GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"ERRO: Voce nгo й admin ou nгo tem Level""); for(new i = 0; i <MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { for(new x = 0; x <90; x ++) { SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); } } } new pt[128], ptname[MAX_PLAYER_NAME]; GetPlayerName(playerid, ptname, MAX_PLAYER_NAME); format(pt, sizeof(pt), "Chat limpo por %s.", ptname); SendClientMessageToAll( -1, pt ) ; return 1; }
|
isso vai travar o sv, vc sabe o que acabou de dizer?
isso vai mandar estas mensagens todas
pawn Код:
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
SendClientMessageToAll(0x00FFFFFF, " ");
90 vezes
pawn Код:
for(new x = 0; x <90; x ++)
nem falo nd
Re: Samp -
Douglas651 - 28.08.2013
Quote:
Originally Posted by PT
isso vai travar o sv, vc sabe o que acabou de dizer?
isso vai mandar estas mensagens todas
pawn Код:
SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " "); SendClientMessageToAll(0x00FFFFFF, " ");
90 vezes
pawn Код:
for(new x = 0; x <90; x ++)
nem falo nd
|
eu sei disso pt por isso nao coloquei kkkkkkkk
mas Pt dei uma mexida no seu e resolveu obrigado +rep
Re: Samp -
Coe1 - 28.08.2013
pawn Код:
if(!strcmp("/lc", cmdtext))
{
for(new i; i < 100; i++)
SendClientMessageToAll(-1, " ");
return true;
}
Re: Samp -
bruxo00 - 28.08.2013
pawn Код:
CMD:limparchat(playerid, params[])
{
if(IsPlayerAdmin(playerid)
{
SendClientMessageToAll(-1, " ");
SendClientMessageToAll(-1, " ");
SendClientMessageToAll(-1, " ");
SendClientMessageToAll(-1, " ");
SendClientMessageToAll(-1, " ");
SendClientMessageToAll(-1, " ");
SendClientMessageToAll(-1, " ");
}
else
{
SendClientMessage(playerid, -1, "Nгo йs admin!");
}
return 1;
}
Para quк tanta complicaзгo com loops?