[Ajuda] /Multar
#1

Preciso de ajuda com esse comando , quero colocar para ser usado por Policiais e Membros do Governo .

Governo estб definido assim
PHP код:
IsAGOV(playerid


PHP код:
if(strcmp(cmd"/multar"true) == 0)
    {
         if(
IsPlayerConnected(playerid))
        {
            if(!
IsACop(playerid))
            {
                
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo й um policial!");
                return 
true;
            }
            if(
OnDuty[playerid] != 1)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo Bateu o cartгo!");
                return 
true;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /multar [ID] [Custo] [Razao]");
                return 
true;
            }
            
giveplayerid ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /multar [ID] [Custo] [Razao]");
                return 
true;
            }
            
moneys strval(tmp);
            if(
moneys 1000 || moneys 30000)
            {
                
SendClientMessage(playeridCOLOR_GREY"Custo entre 1000 e 30000 !");
                return 
true;
            }
            if(
IsPlayerConnected(giveplayerid))
            {
                if(
IsACop(giveplayerid))
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo pode multar Policiais!");
                    return 
true;
                }
                if(
PlayerInfo[giveplayerid][pJailed] > 0)
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo pode multar jogadores que estejam presos!");
                    return 
true;
                }
                if(
giveplayerid != INVALID_PLAYER_ID)
                {
                    if (
ProxDetectorS(25.0playeridgiveplayerid))
                    {
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        new 
length strlen(cmdtext);
                        while ((
idx length) && (cmdtext[idx] <= ' '))
                        {
                            
idx++;
                        }
                        new 
offset idx;
                        new 
result[256];
                        while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                        {
                            
result[idx offset] = cmdtext[idx];
                            
idx++;
                        }
                        
result[idx offset] = EOS;
                        if(!
strlen(result))
                        {
                            
SendClientMessage(playeridCOLOR_GRAD2"USE: /multar [ID] [Custo] [Razao]");
                            return 
true;
                        }
                        
format(stringsizeof(string), "* Vocк multou %s por R$%d, Razao: %s"giveplayermoneys, (result));
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "* Oficial %s lhe deu uma multa no valor de R$%d, Razao: %s"sendernamemoneys, (result));
                        
SendClientMessage(giveplayeridCOLOR_LIGHTBLUEstring);
                        
SendClientMessage(giveplayeridCOLOR_LIGHTRED"* Use /aceitar multa, para aceita-la.");
                        
SendClientMessage(giveplayeridCOLOR_LIGHTRED"* Se em 5 minutos vocк nгo pagar, irб preso!");
                        
TicketOffer[giveplayerid] = playerid;
                        
TicketMoney[giveplayerid] = moneys;
                        
SetTimerEx("PresoMulta"300000false"i"giveplayerid);
                        return 
true;
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"O jogador estб longe !");
                        return 
true;
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"O jogador estб Offline !");
                return 
true;
            }
        }
        return 
true;
    } 
Reply
#2

pawn Код:
if(!IsAGOV(playerid))
{

    SendClientMessage(playerid,-1,"Vзe naun e du guvernu manoloz");

}
Reply
#3

Que erros que dб ?
Reply
#4

@Resolvido
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)