CMD:darvip(playerid, params[])
{
if(Player[playerid][pAdmin] < 7)
return SendClientMessage(playerid, COLOR_RED, "[ERRO] Vocк nгo tem permissгo para usar este comando!");
new tmp[24], idx; tmp = strtok(params, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, COLOR_GREY, "|USE|: /darvip |ID/Nick| |Level(1-3)|");
new giveid = ReturnUser(tmp);
tmp = strtok(params, idx);
new vip = strval(tmp);
if(IsPlayerConnected(giveid))
{
if(giveid != INVALID_PLAYER_ID)
{
Player[giveid][pVIP] = vip;
format(thestring, sizeof(thestring), "Vocк, %s, foi setado %s pelo administrador %s!", Player[giveid][pName], AccountVIP(giveid), Player[playerid][pName]);
SendClientMessage(giveid, COLOR_LIGHTBLUE, thestring);
WriteLog("vips", thestring);
format(thestring, sizeof(thestring), "Vocк deu %s para %s!", AccountVIP(giveid), Player[giveid][pName]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, thestring);
}
}
return 1;
}
CMD:vip(playerid, params[])
{
if(Player[playerid][pVIP] < 1)
return SendClientMessage(playerid, COLOR_RED, "[ERRO] Vocк nгo й um vip. Consulte nosso /forum e saiba como se tornar um.");
if(!strlen(params))
return SendClientMessage(playerid, COLOR_GREY, "[USO] /vip [chat]");
format(thestring,128,"%s %s: %s, cвmbio.", AccountVIP(playerid), Player[playerid][pName], params);
SendVipMessage(COLOR_GREEN,thestring);
return 1;
}
public SendVipMessage(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);
}
new aux[MAX_PLAYERS];
Ta ai
PHP код:
|
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);
}
}
}
}
}
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);
}
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 017: undefined symbol "aux"
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : warning 215: expression has no effect
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : error 001: expected token: ";", but found "]"
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : error 029: invalid expression, assumed zero
C:\Users\Felipe\Desktop\Brasil Play TwO\gamemodes\Novo.pwn(19954) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
new aux[MAX_PLAYERS];//Voce esqueceu de criar a variavel que ele pediu!
Macintosh Deu esses erro :
PHP код:
|
new aux[MAX_PLAYERS];
forward SendVIPMessage(color, string[]);
forward SendVIPMessage(color, string[]);
warning 235: public function lacks forward declaration (symbol "SendVIPMessage") Linha 19948 <<
forward SendVIPMessage(color, string[]);