[AJUDA URGENTE] Pelo amor de deus olehm aqui
#3

Comando mafia aqui :

PHP код:
    if(strcmp(cmd"/mafia",true)==0)
    {
        if(
PlayerInfo[playerid][pMembro] == 20 || PlayerInfo[playerid][pLider] == 20 || PlayerInfo[playerid][pMembro] == 22 || PlayerInfo[playerid][pLider] == 22)
        {
            new 
x_nr[256];
            
x_nr strtok(cmdtextidx);
            if(!
strlen(x_nr)) {
                
SendClientMessage(playeridCOLOR_WHITE"Use: /mafia [name]");
                
SendClientMessage(playeridCOLOR_WHITE"Nomes validos: obter, entregar.");
                return 
1;
            }
            if(
strcmp(x_nr,"obter",true) == 0)
            {
                if(
PlayerToPoint(3.0,playerid,1649.1335,-2061.7736,13.5468) || PlayerToPoint(3.0,playerid,1649.1335,-2061.7736,13.5468))
                {
                      if(
MatsHolding[playerid] >= 55)
                         {
                         
SendClientMessage(playeridCOLOR_GREY" Vocк jб tem Pacotes !");
                        return 
1;
                    }
                    
tmp strtok(cmdtextidx);
                    if(!
strlen(tmp)) {
                        
SendClientMessage(playeridCOLOR_WHITE"Use: /mafia pegar [quantidade]  *Max p/ Vez = 55*");
                        return 
1;
                    }
                      
moneys strval(tmp);
                    if(
moneys || moneys 55) { SendClientMessage(playeridCOLOR_GREY"   O Nъmeros de Pacotes а ser pegos tem que ser mais que 1 e menos que 50 !"); return 1; }
                    new 
price moneys 100;
                    if(
GetPlayerMoneyEx(playerid) > price)
                    {
                        
format(stringsizeof(string), "* Voce recebeu %d Materiais por R$%d."moneysprice);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                        
GivePlayerMoney(playerid, - price);
                        
MatsHolding[playerid] = moneys;
                    }
                    else
                    {
                        
format(stringsizeof(string), "   Voce nгo tem R$%d !"price);
                        
SendClientMessage(playeridCOLOR_GREYstring);
                    }
                }
                   else
                {
                      
SendClientMessage(playeridCOLOR_GREY" Vocк nгo estб nas caixas de Materiais no HQ !");
                        return 
1;
                   }
            }
            else if(
strcmp(x_nr,"entregar",true) == 0)
            {
                if(
PlayerToPoint(3.0,playerid,1751.2998,-1944.0534,13.1338))
                {
                    if(
MatsHolding[playerid] > 0)
                    {
                        new 
payout = (100)*(MatsHolding[playerid]);
                        
format(stringsizeof(string), "* Vocк pagou %d para o Armazйn pelos seus %d pacotes."payoutMatsHolding[playerid]);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                        
PlayerInfo[playerid][pMats] += payout;
                        
MatsHolding[playerid] = 0;
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"   Voce nao tem nenhum pacote !");
                        return 
1;
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"   Voce nao esta na boca de troca !");
                    return 
1;
                }
            }
        }
    } 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)