[Ajuda] VIP
#1

Ola quando eu dou vip pra algum kra funfa normal mais nao da pra fala no chat nao sei pq cmd de darvip :
PHP код:
CMD:darvip(playeridparams[])
{
    if(
Player[playerid][pAdmin] < 7)
        return 
SendClientMessage(playeridCOLOR_RED"[ERRO] Vocк nгo tem permissгo para usar este comando!");
       new 
tmp[24], idxtmp strtok(paramsidx);
    if(!
strlen(tmp))
        return 
SendClientMessage(playeridCOLOR_GREY"|USE|: /darvip |ID/Nick| |Level(1-3)|");
    new 
giveid ReturnUser(tmp);
     
tmp strtok(paramsidx);
    new 
vip strval(tmp);
    if(
IsPlayerConnected(giveid))
    {
        if(
giveid != INVALID_PLAYER_ID)
        {
            
Player[giveid][pVIP] = vip;
            
format(thestringsizeof(thestring), "Vocк, %s, foi setado %s pelo administrador %s!"Player[giveid][pName], AccountVIP(giveid), Player[playerid][pName]);
            
SendClientMessage(giveidCOLOR_LIGHTBLUEthestring);
            
WriteLog("vips"thestring);
            
format(thestringsizeof(thestring), "Vocк deu %s para %s!"AccountVIP(giveid), Player[giveid][pName]);
            
SendClientMessage(playeridCOLOR_LIGHTBLUEthestring);
        }
    }
    return 
1;

Cmd de falar no chat vip :
PHP код:
CMD:vip(playeridparams[])
{
    if(
Player[playerid][pVIP] < 1)
        return 
SendClientMessage(playeridCOLOR_RED"[ERRO] Vocк nгo й um vip. Consulte nosso /forum e saiba como se tornar um.");
    if(!
strlen(params))
        return 
SendClientMessage(playeridCOLOR_GREY"[USO] /vip [chat]");
    
format(thestring,128,"%s %s: %s, cвmbio."AccountVIP(playerid), Player[playerid][pName], params);
    
SendVipMessage(COLOR_GREEN,thestring);
      return 
1;

Ajudem por favor
Reply
#2

poste a public SendVipMessage.
Reply
#3

Ta ai
PHP код:
public SendVipMessage(colorstring[])
{
    for(new 
0<= HighestIDi++)
        if(
IsPlayerConnected(i))
            if(
Player[i][pVIP] > || Player[i][pAdmin] > 0)
                if(
ChatVIP[i] == 1)
                    
SendClientMessage(icolorstring);

Reply
#4

pawn Код:
new aux[MAX_PLAYERS];
Quote:
Originally Posted by ' Bigode
Посмотреть сообщение
Ta ai
PHP код:
public SendVipMessage(colorstring[])
{
    for(new 
0<= HighestIDi++)
        if(
IsPlayerConnected(i))
            if(
Player[i][pVIP] > || Player[i][pAdmin] > 0)
                if(
ChatVIP[i] == 1)
                    
SendClientMessage(icolorstring);

dafuq, que cуdigo tenso.

pawn Код:
public SendVIPMessage(color, string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(!aux[i])
            {
            if(PlayerInfo[i][pVIP] >= 1 || PlayerInfo[i][pAdmin]>= 1)
            {
                SendClientMessage(i, color, string);
                }
            }
        }
    }
}
Reply
#5

acho que a public deveria ser assim: (nao tenho certeza)
pawn Код:
public SendVipMessage(color, string[])
{
    for(new i = 0; i <= MAX_PLAYERS; i++)
        if(IsPlayerConnected(i)) && Player[i][pVIP] > 0  && Player[i][pAdmin] > 0)
                if(ChatVIP[i] == 1)//Nao entendi o motivo disto aqui se na condiзгo de cima ja identifica se o player й VIP porque ChatVIP tem que ter o valor de 1 amarzenado? :S(por isso que nao gosto do sistema dos outros)
                    SendClientMessage(i, color, string);
}
Reply
#6

Macintosh Deu esses erro :
PHP код:
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19948) : warning 235: public function lacks forward declaration (symbol "SendVIPMessage"Linha 19948 <<
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : error 017undefined symbol "aux"
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : warning 215expression has no effect
C
:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : error 001expected token";"but found "]"
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : error 029invalid expressionassumed zero
C
:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : fatal error 107too many error messages on one line

Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


4 Errors

Reply
#7

pawn Код:
new aux[MAX_PLAYERS];//Voce esqueceu de criar a variavel que ele pediu!
Reply
#8

Quote:
Originally Posted by ' Bigode
Посмотреть сообщение
Macintosh Deu esses erro :
PHP код:
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19948) : warning 235: public function lacks forward declaration (symbol "SendVIPMessage"Linha 19948 <<
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : error 017undefined symbol "aux"
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : warning 215expression has no effect
C
:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : error 001expected token";"but found "]"
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : error 029invalid expressionassumed zero
C
:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

pawn Код:
new aux[MAX_PLAYERS];
forward SendVIPMessage(color, string[]);
Reply
#9

Outra coisa no Topo do GM:
pawn Код:
forward SendVIPMessage(color, string[]);
Referente a este warning
Код:
warning 235: public function lacks forward declaration (symbol "SendVIPMessage") Linha 19948 <<
Reply
#10

pawn Код:
forward SendVIPMessage(color, string[]);
Creditos Macintosh

@edit Boiei Mas Ta ae /\
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)