CMD:chatv(playerid, params[])
{
new Texto[128], String[64];
if ( !IsPlayerVIP(playerid)) return SendClientMessage(playerid, Vermelho, "[ERRO]: Vocк nгo possui permissгo suficiente.");
if(sscanf(params, "s", Texto)) return SendClientMessage(playerid, Vermelho, "[ERRO]: Use: /v [texto]");
format(String, sizeof(String), "(CV) %s: %s", Nome(playerid), Texto);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if ( !IsPlayerVIP(playerid))
{
SendClientMessage(i, -1, String);
}
}
return 1;
}
|
Vocкs tкm que aprender a dizer qual linha estб o erro/warning para as pessoas nгo perderem tempo procurando o problema.
|
...
if ( !IsPlayerVIP(playerid))
{
SendClientMessage(i, -1, String);
}
...
|
Код:
...
if ( !IsPlayerVIP(playerid))
{
SendClientMessage(i, -1, String);
}
...
|
CMD:chatv(playerid, params[])
{
new Texto[128], String[64];
if (!IsPlayerVIP(playerid)) //Se o jogador nгo for VIP o cуdigo para e retorna a mensagem de erro.
return SendClientMessage(playerid, Vermelho, "[ERRO]: Vocк nгo possui permissгo suficiente.");
if(sscanf(params, "s", Texto))
return SendClientMessage(playerid, Vermelho, "[ERRO]: Use: /v [texto]");
format(String, sizeof(String), "(CV) %s: %s", Nome(playerid), Texto);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerVIP(playerid)) //Se o jogador for VIP o cуdigo continua.
{
SendClientMessage(i, -1, String);
}
}
return 1;
}
|
Usando isto ! vocк iguala a variavel a 0, ou seja verificando se o cara nгo й VIP.
|
|
Tente:
Код:
CMD:chatv(playerid, params[])
{
new Texto[128], String[64];
if (!IsPlayerVIP(playerid)) //Se o jogador nгo for VIP o cуdigo para e retorna a mensagem de erro.
return SendClientMessage(playerid, Vermelho, "[ERRO]: Vocк nгo possui permissгo suficiente.");
if(sscanf(params, "s", Texto))
return SendClientMessage(playerid, Vermelho, "[ERRO]: Use: /v [texto]");
format(String, sizeof(String), "(CV) %s: %s", Nome(playerid), Texto);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerVIP(playerid)) //Se o jogador for VIP o cуdigo continua.
{
SendClientMessage(i, -1, String);
}
}
return 1;
}
|