[Ajuda] ChatVIP, Ajude-me urgente.
#1

Pessoal estou com um problema neste comando... й o comando de Chat VIP, in-game quando eu escrevo /VIP que seria pra falar no Chat VIP nгo consigo falar porquк nгo aparece nada. Tipo eu escrevo /vip eae, nгo aparece o chat etc. Preciso muito da Ajuda de vocкs Obrigado,



pawn Код:
CMD:vip(playerid, params[])
{
    if(Player[playerid][pVIP] < 1)
        return SendClientMessage(playerid, COLOR_RED, "{FFFFFF}|FAIL|{BEBEBE} Vocк nгo й um vip. Consulte nosso /forum e saiba como se tornar um.");
    if(!strlen(params))
        return SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}|USO|{BEBEBE} /vip [chat]");

    format(thestring,128,"%s %s: %s, cвmbio.", AccountVIP(playerid), Player[playerid][pName], params);
    SendDoadorMessage(COLOR_GREEN,thestring);
    return 1;
}
Reply
#2

Tenta assim !
pawn Код:
CMD:vip(playerid, params[])
{
    if(Player[playerid][pVIP] < 1) return SendClientMessage(playerid, COLOR_RED, "{FFFFFF}|FAIL|{BEBEBE} Vocк nгo й um vip. Consulte nosso /forum e saiba como se tornar um.");
    if(!strlen(params)) return SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}|USO|{BEBEBE} /vip [chat]");
    format(thestring, 128," %s %s: %s, cвmbio.", AccountVIP(i), Player[i][pName], params);
    for(static i = GetMaxPlayers()-1; i > -1; --i)
    {
         if(IsPlayerConnected(i) && Player[i][pVIP] > 0)
         {
              SendClientMessage(i, Color_Team,thestring);
         }
    }
    return 1;
}
Reply
#3

pawn Код:
CMD:vip(playerid, params[]) {
    if(Player[playerid][pVIP] < 1)
        return SendClientMessage(playerid, COLOR_RED, "{FFFFFF}|FAIL|{BEBEBE} Vocк nгo й um vip. Consulte nosso /forum e saiba como se tornar um.");
    if(isnull(params))
        return SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}|USO|{BEBEBE} /vip [chat]");
    static i, cStr[128], Nome[MAX_PLAYER_NAME];
    format (cStr, sizeof cStr, "%s %s: %s, cвmbio.", AccountVIP(playerid), (GetPlayerName(playerid, Nome, MAX_PLAYER_NAME), Nome), params);
    for ( i = GetMaxPlayers() - 1; i != -1; --i) {
        if (IsPlayerConnected(i) && Player[i][pVIP] != 0)
            SendClientMessage(i, COLOR_GREEN, cStr);
    }
    return true;
}
Reply
#4

Quote:

pawn Code:
CMD:vip(playerid, params[]) {
if(Player[playerid][pVIP] < 1)
return SendClientMessage(playerid, COLOR_RED, "{FFFFFF}|FAIL|{BEBEBE} Vocк nгo й um vip. Consulte nosso /forum e saiba como se tornar um.");
if(isnull(params))
return SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}|USO|{BEBEBE} /vip [chat]");
static i, cStr[128], Nome[MAX_PLAYER_NAME];
format (cStr, sizeof cStr, "%s %s: %s, cвmbio.", AccountVIP(playerid), (GetPlayerName(playerid, Nome, MAX_PLAYER_NAME), Nome), params);
for ( i = GetMaxPlayers() - 1; i != -1; --i) {
if (IsPlayerConnected(i) && Player[i][pVIP] != 0)
SendClientMessage(i, COLOR_GREEN, cStr);
}
return true;
}

O seu foi o que deu - error. O Error estб abaixo, й os erros que estб dialogando quando compilo. Ajude-me resolve-lo =D




pawn Код:
C:\Users\Gustavo\Desktop\Servidor BES\Servidor\gamemodes\PowerPixel.pwn(51878) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\Servidor BES\Servidor\gamemodes\PowerPixel.pwn(51879) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Servidor BES\Servidor\gamemodes\PowerPixel.pwn(51878) : warning 203: symbol is never used: "Nome"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#5

pawn Код:
CMD:vip(playerid, params[]) {
    if(Player[playerid][pVIP] < 1)
        return SendClientMessage(playerid, COLOR_RED, "{FFFFFF}|FAIL|{BEBEBE} Vocк nгo й um vip. Consulte nosso /forum e saiba como se tornar um.");
    if(isnull(params))
        return SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}|USO|{BEBEBE} /vip [chat]");
    static i, cStr[128];
    format (cStr, sizeof cStr, "%s %s: %s, cвmbio.", AccountVIP(playerid), (GetPlayerName(playerid, Nome, MAX_PLAYER_NAME), Nome), params);
    for ( i = GetMaxPlayers() - 1; i != -1; --i) {
        if (IsPlayerConnected(i) && Player[i][pVIP] != 0)
            SendClientMessage(i, COLOR_GREEN, cStr);
    }
    return true;
}
Reply
#6

Quote:

pawn Code:
CMD:vip(playerid, params[]) {
if(Player[playerid][pVIP] < 1)
return SendClientMessage(playerid, COLOR_RED, "{FFFFFF}|FAIL|{BEBEBE} Vocк nгo й um vip. Consulte nosso /forum e saiba como se tornar um.");
if(isnull(params))
return SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}|USO|{BEBEBE} /vip [chat]");
static i, cStr[128];
format (cStr, sizeof cStr, "%s %s: %s, cвmbio.", AccountVIP(playerid), (GetPlayerName(playerid, Nome, MAX_PLAYER_NAME), Nome), params);
for ( i = GetMaxPlayers() - 1; i != -1; --i) {
if (IsPlayerConnected(i) && Player[i][pVIP] != 0)
SendClientMessage(i, COLOR_GREEN, cStr);
}
return true;
}
_____

Error:

pawn Код:
C:\Users\Gustavo\Desktop\Servidor BES\Servidor\gamemodes\PowerPixel.pwn(51879) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#7

MAX_PLAYERS й um pouco mais optimizado.

Poste a senddoadormsg.
Reply
#8

esse aqi?

pawn Код:
public SendDoadorMessage(color, string[])
{
    for(new i = 0; i <= HighestID; i++)
        if(IsPlayerConnected(i))
            if(Player[i][pVIP] > 0 || Player[i][pAdmin] > 0)
                if(ChatVIP[i] == 1)
                    SendClientMessage(i, color, string);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)