[Ajuda] Limite de /contrato por player .
#1

Queria saber como coloco um limite de 15.000 mil por player , quando tiver 15k de contrato no player aparece a mensagem: Esse jogador jб possui 15mil de contrato !

PHP код:
if(strcmp(cmd"/contrato"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
           {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD1"USE: /contrato [ID/Nome] [Quantia]");
                return 
true;
            }
            
giveplayerid ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD1"USE: /contrato [ID/Nome] [Quantia]");
                return 
true;
            }
            
moneys strval(tmp);
            if(
moneys 2000)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Contrato Minimo R$2000!");
                return 
true;
            }
            if(
moneys 15000)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Contrato Mбximo R$15000!");
                return 
true;
            }
            if (
IsPlayerConnected(giveplayerid))
            {
                if(
giveplayerid != INVALID_PLAYER_ID)
                {
                    if(
PlayerInfo[giveplayerid][pMembro] == || PlayerInfo[giveplayerid][pLider] == || PlayerInfo[giveplayerid][pMembro] == 22 || PlayerInfo[giveplayerid][pLider] == 22 || PlayerInfo[playerid][pMembro] == ||
                    
PlayerInfo[playerid][pLider] == || PlayerInfo[playerid][pMembro] == 22 || PlayerInfo[playerid][pLider] == 22)
                    {
                        
SendClientMessage(playeridCOLOR_GREY" Vocк nгo pode colocar contrato !");
                        return 
true;
                    }
                    else if(
PlayerInfo[giveplayerid][pAdmin] >= 1)
                    {
                        
SendClientMessage(playeridCOLOR_GREY"Vocк nгo pode colocar contratos em Admins !");
                        return 
true;
                    }
                    if(
IsACop(giveplayerid) && moneys <= 5000)
                    {
                        
SendClientMessage(playeridCOLOR_GREY"   Preco Minimo de R$5000 em oficiais!");
                        return 
true;
                    }
                    if(
giveplayerid == playerid)
                    {
                        
SendClientMessage(playeridCOLOR_GREY"Nгo pode colocar contrato em si mesmo!");
                        return 
true;
                    }
                    
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
playermoney GetPlayerMoney(playerid);
                    if (
moneys && playermoney >= moneys)
                    {
                        
GivePlayerMoney(playerid, (moneys));
                        
PlayerInfo[giveplayerid][pHeadValue]+=moneys;
                        
format(stringsizeof(string), "%s Colocou um contrato em %s, por R$%d.",sendernamegiveplayermoneys);
                        
SendFamilyMessage(8COLOR_YELLOWstring); SendFamilyMessage(22COLOR_YELLOWstring);
                        
format(stringsizeof(string), "* Vocк colocou um contrato em %s, por R$%d.",giveplayermoneys);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                        
PlayerPlaySound(playerid10520.00.00.0);
                        
ColocouContrato playerid;
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo possui essa grana.");
                    }
                }
            }
            else
            {
                
format(stringsizeof(string), "   %d nгo й um jogador ativo."giveplayerid);
                
SendClientMessage(playeridCOLOR_GRAD1string);
            }
        }
        }
//not connected
        
return true;
    } 
Reply
#2

Use:

pawn Код:
if(PlayerInfo[giveplayerid][pHeadValue] >= 15000) { SendClientMessage(playerid,0xBFBFBFAA,"Este player jб tem 15000$ de contrato!");
Reply
#3

Sempre vocк cara , vllw .

+ REP pra tu .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)