Get specific data
#3

PHP код:
              new info PlayerInfo[playerid][pHouseID];
            if(!
response)
            {
                if(
strval(inputtext) > 100000) return SendClientMessage(playeridCOLOR_RED"You can't put in your house's storge more than 100000$");
                else if(
strval(inputtext) < 100000)
                {
                    if(
strval(inputtext) > GetPlayerMoney(playerid)) return SendClientMessage(playeridCOLOR_RED"You don't have this amount of money!");
                    new 
query[128];
                    new 
equal result += strval(inputtext);
                    if(
equal 100000) return SendClientMessage(playeridCOLOR_RED"Maxmium money in the storge has reached!");
                    
format(querysizeof(query), "UPDATE houses SET storge='%i' WHERE id='%i'",equalPlayerInfo[playerid][pHouseID]);
                    
mysql_query(1query);
                    
GivePlayerMoney(playerid, -strval(inputtext));
                    
HouseInfo[info][storge] = equal;
                }
                else return 
SendClientMessage(playeridCOLOR_RED"Input a number!");
            }
            else
            {
                if(
strval(inputtext) > HouseInfo[info][storge]) return SendClientMessage(playeridCOLOR_RED"You don't have money in your storge!");
                else if(
strval(inputtext) < HouseInfo[info][storge])
                {
                    new 
query[129];
                    new 
result HouseInfo[info][storge];
                    new 
equal result -= strval(inputtext);
                    
format(querysizeof(query), "UPDATE houses SET storge='%i' WHERE id='%i'",equalPlayerInfo[playerid][pHouseID]);
                    
mysql_query(1query);
                    
GivePlayerMoney(playeridstrval(inputtext));
                    
HouseInfo[info][storge] = equal;
                }
                else return 
SendClientMessage(playeridCOLOR_RED"Input a number!");
            } 
All HouseInfo[info][storge] are equal 0
Reply


Messages In This Thread
Get specific data - by nezo2001 - 20.06.2015, 14:15
Re : Get specific data - by Dutheil - 20.06.2015, 15:00
Re: Get specific data - by nezo2001 - 21.06.2015, 14:40
Re: Get specific data - by nezo2001 - 21.06.2015, 16:34

Forum Jump:


Users browsing this thread: 1 Guest(s)