3DTextLabel problem
#3

Quote:
Originally Posted by noxno0609
Посмотреть сообщение
I think the problem is about your buy store cmd. Maybe it didn't update store owner's name.
Post your buy store cmd code.
PHP код:
COMMAND:buystore(playeridparams[])
{
    foreach(new 
Stores)
    {
        if(
Store[i][StoreOwner] == pData[playerid][RealID])
            return 
Message(playeridCOLOR_RED"You can't buy more stores");
    }
    if(
GetPlayerScore(playerid) >= 1000)
    {
        new 
ibool:found false;
        if(
sscanf(params"d"i))
            return 
Usage(playerid"buystore [storeid]");
        foreach(new 
Stores)
        {
            if(
Store[x][StoreID] == i)
            {
                
x;
                
found true;
                break;
            }
        }
        if(!
found)
            return 
1;
        if(!
Store[i][StoreOwner])
        {
            if(
Store[i][StorePrice] == 1337)
                return 
1;
            if(
GetPlayerMoney(playerid) >= Store[i][StorePrice])
            {
                
GivePlayerMoney(playerid, -Store[i][StorePrice]);
                
Store[i][StoreOwner] = pData[playerid][RealID];
                
Message(playeridCOLOR_GREEN"You bought %s for $%m, use /storemenu while inside store to access store menu"Store[i][StoreName], Store[i][StorePrice]);
                new 
label[256];
                
format(label256"{FF0000}[%s]\n{FFFFFF}{FFFF66}ID: {FFFFFF}%d\n{FFFF66}Owner: {FFFFFF}%p\n{FFFF66}Price: {FFFFFF}$%m\n{FFFF66}Level: {FFFFFF}%d\n{FFFF66}$%m per gameday"Store[i][StoreName], Store[i][StoreID], playeridStore[i][StorePrice], Store[i][StoreLevel], CountMoneyPerDay(i));
                
UpdateDynamic3DTextLabelText(Store[i][StoreEnterLabel], -1label);
                
mysql_format(connectionHandlelabel256"UPDATE store SET owner = %d WHERE id = %d"pData[playerid][RealID], Store[i][StoreID]);
                
mysql_query(connectionHandlelabelfalse);
            }
            else
                
Message(playeridCOLOR_RED"Not enough money to buy this store");
        }
        else
            
Message(playeridCOLOR_RED"This store is owned");
    }
    else
        
Message(playeridCOLOR_RED"You must have 1000 score or more as a requirement to buy any store");
    return 
1;

Reply


Messages In This Thread
3DTextLabel problem - by sams90 - 04.03.2017, 02:14
Re: 3DTextLabel problem - by noxno0609 - 04.03.2017, 03:12
Re: 3DTextLabel problem - by sams90 - 04.03.2017, 04:04
Re: 3DTextLabel problem - by sams90 - 05.03.2017, 01:16
Re: 3DTextLabel problem - by JessThompson - 05.03.2017, 01:40

Forum Jump:


Users browsing this thread: 1 Guest(s)