[Ajuda] Ler comandos -
junioor - 21.02.2011
Boa tarde!
Bom eu coloquei um comando de ler todos os comandos dos jogadores mais eu gostaria de colocar um comando para exeplo por der desativar tipo /vercmds ou /nvercmds mais eu gostaria de colocar esse comando so para o adm quer digitar /vercmds e /nvercmds gostaria que qando digitado n desativa-se para todos..
Aguardando ajuda! Obrigado desde jб.
sistema:
pawn Код:
GetPlayerName(playerid,sendername,MAX_PLAYER_NAME);
for(new i=0; i<=GetMaxPlayers(); i++){
if (AccountInfo[i][AdminLevel] >= 2 || IsPlayerAdmin(i)){
{
format(string,sizeof(string),"Ler cmds || %s(id:%d) digitou o comando %s",sendername,playerid,cmdtext);
SendClientMessage(i,0xffffffff,string);}}
}
Re: [Ajuda] Ler comandos -
Ricop522 - 21.02.2011
pawn Код:
new VerCMD[MAX_PLAYERS];
for(new i = 0; i < = GetMaxPlayers(); ++i){
if (AccountInfo[i][AdminLevel] >= 2 && VerCMD[i] > 0){
{
format(string,sizeof(string),"Ler cmds || %s(id:%d) digitou o comando %s",sendername,playerid,cmdtext);
SendClientMessage(i,0xffffffff,string);}}
}
if(strcmp(cmd, "/vercmd", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] > 1)
{
if (!VerCMD[playerid])
{
VerCMD[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Vocк agora vai ver os CMDS..");
}
else if (VerCMD[playerid])
{
VerCMD[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Vocк agora nгo vai ver os CMDS..");
}
}
else
{
SendClientMessage(playerid, 0xFFFFFFAA, " Vocк nгo й admir xD.");
return 1;
}
}
return 1;
}
Re: [Ajuda] Ler comandos -
junioor - 21.02.2011
Amigo esta dando um erro!
Erros:
(60) : error 010: invalid function or declaration
(61) : error 010: invalid function or declaration
pawn Код:
new VerCMD[MAX_PLAYERS];
for(new i = 0; i < = GetMaxPlayers(); ++i){ // Linha do erro
if (AccountInfo[i][AdminLevel] >= 2 && VerCMD[i] > 0){ // Linha do erro
{
format(string,sizeof(string),"Ler cmds || %s(id:%d) digitou o comando %s",sendername,playerid,cmdtext);
SendClientMessage(i,0xffffffff,string);}}
}
Re: [Ajuda] Ler comandos -
Baddark2131 - 21.02.2011
for(new i = 0; i < = GetMaxPlayers(); ++i)
{
if (AccountInfo[i][AdminLevel] >= 2 && VerCMD[i] > 0)
{
format(string,sizeof(string),"Ler cmds || %s(id:%d) digitou o comando %s",sendername,playerid,cmdtext);
SendClientMessage(i,0xffffffff,string);
}
}
Re: [Ajuda] Ler comandos -
junioor - 21.02.2011
caara ainda continua com erro voc so tiroou uma } o erro nao esta nela
Re: [Ajuda] Ler comandos -
leandro123456 - 21.02.2011
pawn Код:
for(new i = 0; i <= GetMaxPlayers(); ++i)
{
if(AccountInfo[i][AdminLevel] >= 2 && VerCMD[i] > 0)
{
format(string,sizeof(string),"Ler cmds || %s(id:%d) digitou o comando %s",sendername,playerid,cmdtext);
SendClientMessage(i,0xffffffff,string);
}
}
Re: [Ajuda] Ler comandos -
junioor - 21.02.2011
Continua os mesmos erros ainda.
Re: [Ajuda] Ler comandos -
leandro123456 - 21.02.2011
pawn Код:
for(new i = 0; i <= GetMaxPlayers(); ++i)
{
if(AccountInfo[i][AdminLevel] >= 2 && VerCMD[i] == 1)
{
format(istring,sizeof(istring),"Ler cmds || %s(id:%d) digitou o comando %s",isendername,playerid,cmdtext);
SendClientMessage(i,0xffffffff,istring);
}
}
Re: [Ajuda] Ler comandos -
ViniBorn - 21.02.2011
Posta as linhas do erro
Re: [Ajuda] Ler comandos -
Ricop522 - 21.02.2011
pawn Код:
//TOPO DO GAMEMODE
new VerCMD[MAX_PLAYERS];
//No onplayertext ou whatever
for(new i = 0; i <= GetMaxPlayers(); ++i)
{
if(AccountInfo[i][AdminLevel] >= 2 && VerCMD[i] > 0)
{
format(string,sizeof(string),"Ler cmds || %s(id:%d) digitou o comando %s",sendername,playerid,cmdtext);
SendClientMessage(i, 0xFFFFFF,string);
}
}