[Ajuda] help me
#4

O retorno da funзгo, deve ser 0, caso contrбrio haverб bugs.
Outro erro que tambйm notei, й que tudo nгo passarб da primeira condicional. Por exemplo, vocк "pergunta" se o level do player й maior do que 1 e abaixo vocк faz outra condicional verificando se o level do player й maior do que 8. Mas... Parando pra pensar, 8 tambйm nгo й > que 1? Por esse motivo seu cуdigo nunca chegarб as demais condicionais.

Outra coisa legal, seria a utilizaзгo de switch ao invйs de ifs. Sem falar, que vocк desperdiзa muitas cйlulas em seu sistema... O mбximo que poderб ser exibido no chat й 128 caracteres, entгo criar um vetor com 500 posiзхes nгo й legal.
Nгo testei o cуdigo, mas tente dessa forma:
PHP код:
new String[128];
switch(
PlayerInfo[playerid][Level])
{
    case 
1..7:
     {
         
format(Stringsizeof(String), "[ADM] {FFFFFF}%s: {00FFFF}%s"Nome(playerid), text);
           
SendClientMessageToAll(0xFF0000FFString);
           return 
0;
     }
    case 
8:
     {
         
format(Stringsizeof(String), "[Sub Dono] {FFFFFF}%s: {00FFFF}%s"Nome(playerid), text);
         
SendClientMessageToAll(0xFF0000FFString);
         return 
0;
    }
    case 
9:
    {
         
format(Stringsizeof(String), "[DONO] {FFFFFF}%s: {00FFFF}%s"Nome(playerid), text);
         
SendClientMessageToAll(0xFF0000FFString);
         return 
0;
    }

Reply


Messages In This Thread
help me - by CZ - 30.07.2015, 14:18
Re: help me - by IgorLuiz - 30.07.2015, 14:40
Re: help me - by CZ - 30.07.2015, 14:48
Re: help me - by Artista - 30.07.2015, 14:54
Re: help me - by IgorLuiz - 30.07.2015, 14:59
Re: help me - by IgorLuiz - 30.07.2015, 15:09
Re: help me - by Artista - 30.07.2015, 15:20
Re: help me - by CZ - 30.07.2015, 16:04

Forum Jump:


Users browsing this thread: 4 Guest(s)