[Ajuda] Oque ta acontencendo
#1

Acho q й erro bobo
Erro:
pawn Код:
\pawno\include\PPC_PlayerCommands.inc(5558) : error 035: argument type mismatch (argument 2)

Linha do Erro :
pawn Код:
SendClientMessageToAll(i, 0xFFFFFFFF, Msg);

Todo o comando
pawn Код:
COMMAND:all(playerid, params[])
{
new Name[24], Msg[128], Message[128];
if (APlayerData[playerid][PlayerLevel] >= 1)
{
GetPlayerName(playerid, Name, sizeof(Name));
if (APlayerData[playerid][LoggedIn] == true)
{
if (sscanf(params, "s[128]", Message)) SendClientMessage(playerid, 0xFF0000AA, "Use: /all [texto]");
else
{
for (new i; i < MAX_PLAYERS; i++)
{
if (APlayerData[i][LoggedIn] == true)
{
if (APlayerData[i][PlayerClass] == APlayerData[playerid][PlayerClass])
{
format(Msg, 128, "{FF00FF}Anuncio Da Administraзгo [ %s ]: {FFFFFF}%s", Name, Message);
SendClientMessageToAll(i, 0xFFFFFFFF, Msg);
}
}
}
}
}
}
else
return 0;
return 1;
}
Reply
#2

й erro na include.
Reply
#3

Mano , tu quer ganhar post nй , vc pode me mostrar o erro ? como resolver ,
se eu tirar o ToAll ele funciona normal
Reply
#4

cara, abre a pasta do gm > pawno > include > PPC_PlayerCommands.inc e daн posta a linha 5558 simplesmente isso.
Reply
#5

Desculpa man mais vc nao leu o post nao , eu postei a linha do erro
Reply
#6

Verifique a include!
Reply
#7

Код:
COMMAND:all(playerid, params[])
{
new Name[24], Msg[128], Message[128];
GetPlayerName(playerid, Name, sizeof(Name));
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (sscanf(params, "s[128]", Message)) SendClientMessage(playerid, 0xFF0000AA, "Use: /all [texto]");
else
{
for (new i; i < MAX_PLAYERS; i++)
{
if (APlayerData[i][LoggedIn] == true)
{
if (APlayerData[i][PlayerClass] == APlayerData[playerid][PlayerClass])
{
format(Msg, 128, "{FF00FF}Anuncio Da Administraзгo [ %s ]: {FFFFFF}%s", Name, Message);
SendClientMessageToAll(0xFFFFFFFF, Msg);
}
}
}
}
}
}
return 1;
}
ou tente esse

Код:
COMMAND:all(playerid, params[])
{
new Name[24], Msg[128], Message[128];
if (APlayerData[playerid][PlayerLevel] >= 1)
{
GetPlayerName(playerid, Name, sizeof(Name));
if (APlayerData[playerid][LoggedIn] == true)
{
if (sscanf(params, "s[128]", Message)) SendClientMessage(playerid, 0xFF0000AA, "Use: /all [texto]");
else
{
for (new i; i < MAX_PLAYERS; i++)
{
if (APlayerData[i][LoggedIn] == true)
{
if (APlayerData[i][PlayerClass] == APlayerData[playerid][PlayerClass])
{
format(Msg, 128, "{FF00FF}Anuncio Da Administraзгo [ %s ]: {FFFFFF}%s", Name, Message);
SendClientMessageToAll(0xFFFFFFFF, Msg);
}
}
}
}
}
}
else
return 0;
return 1;
}
Reply
#8

pawn Код:
COMMAND:all(playerid, params[]) {
    if(APlayerData[playerid][PlayerLevel] < 1)
        return false;
       
    if(isnull(params))
        return SendClientMessage(playerid, 0xFF0000AA, "Use: /all [texto]");
       
    static zString[128], zID;
    GetPlayerName(playerid, zString, 25);
   
    format(zString, sizeof zString, "Anъncio da Administraзгo [ %s ]: {ffffff}%s", zString, params);
   
    for(zID = (GetMaxPlayers() - 1); zID > -1; --zID) {
        if(APlayerData[zID][LoggedIn]) {
            if(APlayerData[zID][PlayerClass] == APlayerData[playerid][PlayerClass]) {
                SendClientMessage(zID, 0xff00ffff, zString);
            }
        }
    }
    return true;
}
Reply
#9

pawn Код:
COMMAND:all(playerid, params[])
{
new Name[24], Msg[128], Message[128];
if (APlayerData[playerid][PlayerLevel] >= 1)
{
GetPlayerName(playerid, Name, sizeof(Name));
if (APlayerData[playerid][LoggedIn] == true)
{
if (sscanf(params, "s[128]", Message)) SendClientMessage(playerid, 0xFF0000AA, "Use: /all [texto]");
else
{
for (new i; i < MAX_PLAYERS; i++)
{
if (APlayerData[i][LoggedIn] == true)
{
if (APlayerData[i][PlayerClass] == APlayerData[playerid][PlayerClass])
{
format(Msg, 128, "{FF00FF}Anuncio Da Administraзгo [ %s ]: {FFFFFF}%s", Name, Message);
SendClientMessageToAll(0xFFFFFFFF, Msg); // aqui estб o erro, estava SendClientMessageToAll(i, 0xFFFFFFFF, Msg);
}
}
}
}
}
}
else
return 0;
return 1;
}
O erro nгo estб na include, mas sim no cуdigo.
Reply
#10

Quote:
Originally Posted by JoaoMonteiro452
Посмотреть сообщение
pawn Код:
COMMAND:all(playerid, params[])
{
new Name[24], Msg[128], Message[128];
if (APlayerData[playerid][PlayerLevel] >= 1)
{
GetPlayerName(playerid, Name, sizeof(Name));
if (APlayerData[playerid][LoggedIn] == true)
{
if (sscanf(params, "s[128]", Message)) SendClientMessage(playerid, 0xFF0000AA, "Use: /all [texto]");
else
{
for (new i; i < MAX_PLAYERS; i++)
{
if (APlayerData[i][LoggedIn] == true)
{
if (APlayerData[i][PlayerClass] == APlayerData[playerid][PlayerClass])
{
format(Msg, 128, "{FF00FF}Anuncio Da Administraзгo [ %s ]: {FFFFFF}%s", Name, Message);
SendClientMessageToAll(0xFFFFFFFF, Msg); // aqui estб o erro, estava SendClientMessageToAll(i, 0xFFFFFFFF, Msg);
}
}
}
}
}
}
else
return 0;
return 1;
}
O erro nгo estб na include, mas sim no cуdigo.
Esse cуdigo enviarб a mensagem vбrias vezes a cada jogador.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)