Get specific data
#1

I've did this
PHP код:
new info PlayerInfo[playerid][pHouseID];
HouseInfo[info][storge
To get the data of player's house but it didn't work the data is loaded correctly from the database but I can't get it here.In another way I don't know what index should I put here
Reply
#2

What do you mean "To get the data of player's house but it didn't work" ?
Show the codes.
Reply
#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
#4

BuMp!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)