[Pedido] Reformular esse cуdigo
#7

Quote:
Originally Posted by MarlboroBr
Посмотреть сообщение
Luan, e FS, era tipo fazer que nem o THUG, deixar o comando parecido com o de algemar tendeu...

Thug, deu esses erros:

PHP код:
(598) : error 017undefined symbol "Multou"
(12941) : error 001expected token";"but found "]"
(12941) : error 029invalid expressionassumed zero
(12941) : fatal error 107too many error messages on one line 
Cуdigo:
PHP код:
        if(strcmp(cmd,"/multar"true) == 0)
    {
       if( 
pInfoplayerid ][ Prof ] == POL_RODOVIARIA || aInfoplayerid ][ Dono ] == || aInfoplayerid ][ Admin ] == )
        {
             if( 
pInfoplayerid ][ fardado ] == && aInfoplayerid ][ Dono ] == && aInfoplayerid ][ Admin ] == )
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк nгo estб fardado(a) !" );
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк precisa estб fardado(a) para adicionar um(a) jogador(a) na lista de perseguiзхes!" );
                return 
1;
            }
               new
                   
id strvaltmp )
               ;
            new 
msg[256];
            new 
plid,tempo;
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp)) {
                
SendClientMessage(playeridCOLOR_ERRO,"[ x ] Use /Multar [ ID ] [ Quantia ] [ Motivo ]");
                return 
1;
            }
            
plid strval(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp)){
                
SendClientMessage(playeridCOLOR_ERRO,"[ x ] Use /Multar [ ID ] [ Quantia ] [ Motivo ]");
                return 
1;
            }
            
tempo strval(tmp);
            
msg strrest(cmdtextidx);
            if(!
strlen(msg)){
                
SendClientMessage(playeridCOLOR_ERRO,"[[ x ] Use /Multar [ ID ] [ Quantia ] [ Motivo ]");
                return 
1;
            }
            if(
tempo 5000 || tempo 100){
                
SendClientMessage(playeridCOLOR_ERRO,"[ x ] Multa mбxima de R$5.000 e minima de R$100!");
                return 
1;
            }
            if(
Multouplayerid ] == 1)
               {
                     
SendClientMessage(playeridCOLOR_ERRO"[ x ] Aguarde '1 minuto' para multar novamente!");
                     return 
1;
              }
            if( 
playerid == id && aInfoplayerid ][ Admin ] == )
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк nгo pode se multar !" );
                return 
1;
            }
              if(
Multouplayerid ] > gettime())
            {
                
format(gStrsizeof(gStr), "[ x ] Aguarde %d segundos para poder multar um(a) jogador(a)!"Multou[playerid] - gettime());
                
SendClientMessage(playeridCOLOR_ERROgStr);
                return 
1;
            }
              if( 
GetDistanceBetweenPlayersplayeridid ) > 15 )
             {
                 
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк estб muito longe, chegue mais perto !" );
                return 
1;
              }
            if(
IsPlayerConnected(plid)){
                new 
pnameMAX_PLAYER_NAME ];
                
GetPlayerName(plidpnameMAX_PLAYER_NAME);
                
format(stringsizeof(string),"O(A) Policial(a) %s multou vocк em R$ %d ( Motivo: %s.)"PlayerNameplayerid ),tempomsg);
                
SendClientMessage(plid,0x33AAFFFFstring);
                
SendClientMessage(playerid0x33AAFFFF"[ > ] Vocк multou o(a) jogador(a) com sucesso!");
                
GivePlayerCashplid, -tempo );
                
Multou[playerid] = gettime() + 60;
                
format(stringsizeof(string),"[ MULTA ] O(A) Policial(a) %s multou o(a) jogador(a) %s no valor de R$ %d. ( Motivo: %s. )"PlayerNameplayerid ),pnametempomsg);
                
SendClientMessageToAll(0x33AAFFFFstring);
                return 
1;
            }
            else
            {
                
SendClientMessage(playeridCOLOR_ERRO,"[ x ] Ninguйm online com esse ID");
                return 
1;
            }
        }
    } 
Topo do GameMode .

pawn Код:
new Multou[MAX_PLAYERS];
Reply


Messages In This Thread
Reformular esse cуdigo - by MarlboroBr - 09.03.2015, 05:21
Re: Reformular esse cуdigo - by MarlboroBr - 10.03.2015, 06:41
Re: Reformular esse cуdigo - by ipsLuan - 10.03.2015, 12:42
Re: Reformular esse cуdigo - by FStralioti - 10.03.2015, 15:34
Re: Reformular esse cуdigo - by ThuuGLif3 - 10.03.2015, 16:43
Re: Reformular esse cуdigo - by MarlboroBr - 11.03.2015, 03:30
Re: Reformular esse cуdigo - by Jimmmy - 11.03.2015, 03:45
Re: Reformular esse cуdigo - by ThuuGLif3 - 11.03.2015, 03:56
Re: Reformular esse cуdigo - by RiqueP - 11.03.2015, 13:04
Re: Reformular esse cуdigo - by MarlboroBr - 11.03.2015, 17:40

Forum Jump:


Users browsing this thread: 1 Guest(s)