max price help
#1

trying to a max price limit, so u can just put max 1500, but not working so well mabye u guys can help me out?

PHP код:
    else if (dialogid == DIALOG_STOREPRICES)
    {
        if (!
response || (GetPVarInt(playerid"EditingBusiness") != PlayerInfo[playerid][pBusiness]) || (GetPVarInt(playerid"EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
            
DeletePVar(playerid"EditingBusiness");
         new 
price strval(inputtext);
        if(
price || price 1500)
          {
               
//ShowPlayerDialog(playerid, DIALOG_STOREPRICES, DIALOG_STYLE_INPUT, "{FF0000}Error - You cannot change the price over 999", "Enter", "Skip");
            
format(stringsizeof(string), "{FF0000}Error - You cannot change the price over 999{FFFFFF}Enter the new sale price for %s\n(Items with the price of $0 will not be for sale)"StoreItems[listitem]);
            
ShowPlayerDialog(playeridDIALOG_STOREITEMPRICEDIALOG_STYLE_INPUT"Edit Price"string"Okay""Cancel");
             return 
1;
        }
        else
        {
            
format(stringsizeof(string), "{FFFFFF}Enter the new sale price for %s\n(Items with the price of $0 will not be for sale)"StoreItems[listitem]);
            
ShowPlayerDialog(playeridDIALOG_STOREITEMPRICEDIALOG_STYLE_INPUT"Edit Price"string"Okay""Cancel");
        }
        return 
1
edit: fixed
Reply
#2

Quote:

if(price <= 1 || price >= 1500)

Try This
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)