CreateObject / CreateDynamicObject проблема
#1

Всем привет. Вообщем такая проблем-ка. Вшил игру "рулетка", на тесте все работает как часы, без нареканий. Залил на основной сервера, и начались проблемы. При онлайне перестаёт создавать обьекты, функцией CreateObject. Создаю обьект вот так:
PHP код:
RouleChip[playerid] = CreateObject(1900RouleTables[tableid][0]+RouleVertikalCoords[4][0], RouleTables[tableid][1]+RouleHorizontCoords[0][0], 992.3350.00.00.0); 
Использую стример от инкогнито, самый новый. Погуглив понял, что со стримером нужно создавать обьекты только с помощью CreateDynamicObject, поставил вот так:
PHP код:
RouleChip[playerid] = CreateDynamicObject(1900RouleTables[tableid][0]+RouleVertikalCoords[4][0], RouleTables[tableid][1]+RouleHorizontCoords[0][0], 992.3350.00.00.0); 
В итоге, при онлайне они создаються, но создаються через раз. Зашел в стол, фишка появилась, вышел, опять зашел - фишки уже нет. Вышел, подождал чуть-чуть, зашел опять в стол - фишка появилась, и так по кругу.
Reply
#2

Объекты ещё и удалять надо.
Reply
#3

Дак об этом никто и не забыл.

Вход в стол
PHP код:
stock OnPlayerEnterRouleTable(playeridtableid)
{
    if(
IsPlayerStartCroupier(playerid))
    {
        if(
RouleTableInfo[tableid][rCroupier] == 1) return SendClientMessage(playeridCOLOR_SILVER"Çà ñòîëîì óæå åñòü êðóïüå");
        {
            
CroupierGame[playerid] = 2;
            
CroupierTable[playerid] = tableid;
            
RouleTableInfo[tableid][rCroupier] = 1;
            
TogglePlayerControllable(playerid0);
            
ShowPlayerRouleMenu(playeridtableid);
            return 
true;
        }
    }
    else
    {
        for(new 
05i++)
        {
            if(
RouleTableInfo[tableid][rGamer][i] == -1)
            {
                if(
tableid >= && tableid <= 3)
                {
                    
Casino[playerid] = 1;
                }
                else
                {
                    
Casino[playerid] = 2;
                }
                new 
str[34];
                
RouleGamer[playerid] = i;
                
RouleTable[playerid] = tableid;
                
RouleTableInfo[tableid][rGamer][i] = playerid;
                
TogglePlayerControllable(playerid0);
                
SetPlayerCameraPos(playeridRouleCamera[tableid][0], RouleCamera[tableid][1], RouleCamera[tableid][2]);
                 
SetPlayerCameraLookAt(playeridRouleCamera[tableid][3], RouleCamera[tableid][4], RouleCamera[tableid][5]);
                
format(strsizeof(str), "%d. %s"i+1PlayerInfo[playerid][pNames]);
                
TextDrawSetString(RouleGamerShow[tableid][i], str);
                
ShowPlayerRouleMenu(playeridtableid);
                switch(
Casino[playerid])
                {
                    case 
1:
                    {
                        
RouleChip[playerid] = CreateDynamicObject(1900RouleTables[tableid][0]+RouleVertikalCoords[4][0], RouleTables[tableid][1]+RouleHorizontCoords[0][0], 992.3350.00.00.0);
                    }
                    case 
2:
                    {
                        
RouleChip[playerid] = CreateDynamicObject(1900RouleTables[tableid][0]-RouleHorizontCoords[0][0], RouleTables[tableid][1]+RouleVertikalCoords[4][0], 1006.060.00.00.0);
                    }
                }
                return 
true;
            }
        }
    }
    return 
false;

Выход из-за стола:
PHP код:
stock OnPlayerExitRouleTable(playeridtableid)
{
    if(
IsPlayerStartCroupier(playerid))
    {
        
CroupierGame[playerid] = 0;
        
CroupierTable[playerid] = -1;
        
RouleTableInfo[tableid][rCroupier] = 0;
        
TogglePlayerControllable(playerid1);
        
HidePlayerRouleMenu(playeridtableid);
    }
    else
    {
        for(new 
05i++)
        {
            if(
RouleTableInfo[tableid][rGamer][i] == playerid)
            {
                new 
str[14];
                
RouleBet[playerid] = 0;
                
Casino[playerid] = 0;
                
RouleGamer[playerid] = -1;
                
RouleTable[playerid] = -1;
                
ChooseBet[playerid] = 0;
                
RouleHorizont[playerid] = 0;
                
RouleVertikal[playerid] = 4;
                
RouleTableInfo[tableid][rGamer][i] = -1;
                
strdel(RouleNumber[playerid], 012);
                
TogglePlayerControllable(playerid1);
                
SetCameraBehindPlayer(playerid);
                
DestroyDynamicObject(RouleChip[playerid]);
                
RouleChip[playerid] = 0;
                
format(strsizeof(str), "%d. -------"i+1);
                
TextDrawSetString(RouleGamerShow[tableid][i], str);
                
TextDrawSetString(RouleNumberShow[tableid][i], "-------");
                
TextDrawSetString(RouleBetShow[tableid][i], "-------");
                
HidePlayerRouleMenu(playeridtableid);
                break;
            }
        }
    }
    return 
true;

Делаем ставку:
PHP код:
case D_ROULE:
            {
                if(
response)
                {
                    new 
bettableid RouleTable[playerid];
                    if(
ChooseBet[playerid] == 1) return SendClientMessage(playeridCOLOR_SILVER"Âû óæå ñäåëàëè ñòàâêó");
                    if(
StartRoule[tableid] == 1) return SendClientMessage(playeridCOLOR_SILVER"Äîæäèòåñü îêàí÷àíèÿ èãðû");
                    {
                        new 
message[64], limit[2], dialog[128];
                        switch(
tableid)
                        {
                            case 
0,4,9limit[0] = 5000000limit[1] = 10000000;
                            case 
1,5,8limit[0] = 5000000limit[1] = 10000000;
                            case 
2,6,11limit[0] = 1000000limit[1] = 5000000;
                            case 
3,7,10limit[0] = 500000limit[1] = 1000000;
                        }
                        
format(messagesizeof(message), "Ìèíèìàëüíàÿ ñóìà %d âèðò, ìàêñèìàëüíàÿ - %d âèðò"limit[0], limit[1]);
                        
format(dialogsizeof(dialog), "{FFFFFF}Ââåäèòå âàøó ñòàâêó:\n{04B404}Ïðèìå÷àíèå: ìèíèìàëüíàÿ ñóìà %d âèðò, ìàêñèìàëüíàÿ - %d âèðò"limit[0], limit[1]);
                        if(
sscanf(inputtext"d"bet)) return ShowPlayerDialog(playeridD_ROULEDIALOG_STYLE_INPUT"Ñòàâêà"dialog"Äàëåå""Îòìåíà");
                           if(
bet limit[0] || bet limit[1]) return SendClientMessage(playeridCOLOR_SILVERmessage);
                        if(
PlayerInfo[playerid][pCash] < bet) return SendClientMessage(playeridCOLOR_SILVER"Ó âàñ íåäîñòàòî÷íî äåíåã");
                        {
                              new 
str[12];
                              
ChooseBet[playerid] = 1;
                              
RouleBet[playerid] = bet;
                               
PlayerInfo[playerid][pCash] -= bet;
                              
DestroyDynamicObject(RouleChip[playerid]);
                               
strmid(RouleNumber[playerid], GetRouleNumber(playerid), 0strlen(GetRouleNumber(playerid)), sizeof(RouleNumber[]));
                               
TextDrawSetString(RouleNumberShow[tableid][RouleGamer[playerid]], RouleNumber[playerid]);
                            
format(strsizeof(str), "~g~%d$"bet);
                               
TextDrawSetString(RouleBetShow[tableid][RouleGamer[playerid]], str);
                               
SendClientMessage(playerid0x74A402AA"Âàøà ñòàâêà ïðèíÿòà");
                            switch(
Casino[playerid])
                            {
                                   case 
1:
                                     {
                                        
RouleChip[playerid] = CreateDynamicObject(1930RouleTables[tableid][0]+RouleVertikalCoords[RouleVertikal[playerid]][0], RouleTables[tableid][1]+RouleHorizontCoords[RouleHorizont[playerid]][0], 992.3350.00.00.0);
                                    }
                                case 
2:
                                    {
                                        
RouleChip[playerid] = CreateDynamicObject(1930RouleTables[tableid][0]-RouleHorizontCoords[RouleHorizont[playerid]][0], RouleTables[tableid][1]+RouleVertikalCoords[RouleVertikal[playerid]][0], 1006.060.00.00.0);
                                    }
                            }
                        }
                    }
                }
                   else return 
true;
            } 
Передвижение обьекта:
PHP код:
     else if(RouleTable[playerid] != -&& ChooseBet[playerid] == 0)
    {
         new 
keyssudlr;
        
GetPlayerKeys(playeridkeyssudlr);
        if(
ud == KEY_UP)
        {
            
RouleVertikal[playerid]++;
            if(
RouleHorizont[playerid] == 0)
            {
                
RouleVertikal[playerid]--;
                return 
true;
            }
            else if(
RouleHorizont[playerid] == 24)
            {
                switch(
RouleVertikal[playerid]-1)
                {
                    case 
2:
                    {
                        
RouleVertikal[playerid] = 4;
                    }
                    case 
4:
                    {
                        
RouleVertikal[playerid] = 6;
                    }
                    case 
6:
                    {
                        
RouleVertikal[playerid]--;
                        return 
true;
                    }
                }
            }
            else if(
RouleVertikal[playerid] == 1)
            {
                switch(
RouleHorizont[playerid])
                {
                    case 
2..6:
                       {
                        
RouleHorizont[playerid] = 4;
                    }
                    case  
10..14:
                    {
                        
RouleHorizont[playerid] = 12;
                    }
                    case  
18..22:
                    {
                        
RouleHorizont[playerid] = 20;
                    }
                }
            }
            else if(
RouleVertikal[playerid] > 6)
            {
                
RouleVertikal[playerid] = 6;
                return 
true;
            }
            switch(
Casino[playerid])
            {
                case 
1:
                {
                    
MoveObject(RouleChip[playerid], RouleTables[RouleTable[playerid]][0]+RouleVertikalCoords[RouleVertikal[playerid]][0], RouleTables[RouleTable[playerid]][1]+RouleHorizontCoords[RouleHorizont[playerid]][0], 992.3352.0);
                }
                case 
2:
                {
                    
MoveObject(RouleChip[playerid], RouleTables[RouleTable[playerid]][0]-RouleHorizontCoords[RouleHorizont[playerid]][0], RouleTables[RouleTable[playerid]][1]+RouleVertikalCoords[RouleVertikal[playerid]][0], 1006.062.0);
                }
            }
        }
        else if(
ud == KEY_DOWN)
        {
            
RouleVertikal[playerid]--;
            if(
RouleHorizont[playerid] == 0)
            {
                
RouleVertikal[playerid]++;
                return 
true;
            }
            else if(
RouleHorizont[playerid] == 24)
            {
                switch(
RouleVertikal[playerid]+1)
                {
                    case 
2:
                    {
                        
RouleVertikal[playerid]++;
                        return 
true;
                    }
                    case 
4:
                    {
                        
RouleVertikal[playerid] = 2;
                    }
                       case 
6:
                    {
                        
RouleVertikal[playerid] = 4;
                    }
                }
            }
            else if(
RouleVertikal[playerid] == 1)
            {
                switch(
RouleHorizont[playerid])
                {
                    case 
1..8:
                    {
                        
RouleHorizont[playerid] = 4;
                    }
                    case  
9..16:
                    {
                        
RouleHorizont[playerid] = 12;
                    }
                    case  
17..24:
                    {
                        
RouleHorizont[playerid] = 20;
                    }
                }
            }
            else if(
RouleVertikal[playerid] == 0)
            {
                switch(
RouleHorizont[playerid])
                {
                    case 
4:
                    {
                        
RouleHorizont[playerid] = 2;
                    }
                    case 
12:
                    {
                        
RouleHorizont[playerid] = 10;
                    }
                    case 
20:
                    {
                        
RouleHorizont[playerid] = 18;
                    }
                }
            }
            else if(
RouleVertikal[playerid] < 0)
            {
                  
RouleVertikal[playerid] = 0;
                  return 
true;
            }
            switch(
Casino[playerid])
            {
                case 
1:
                {
                    
MoveObject(RouleChip[playerid], RouleTables[RouleTable[playerid]][0]+RouleVertikalCoords[RouleVertikal[playerid]][0], RouleTables[RouleTable[playerid]][1]+RouleHorizontCoords[RouleHorizont[playerid]][0], 992.3352.0);
                }
                case 
2:
                {
                    
MoveObject(RouleChip[playerid], RouleTables[RouleTable[playerid]][0]-RouleHorizontCoords[RouleHorizont[playerid]][0], RouleTables[RouleTable[playerid]][1]+RouleVertikalCoords[RouleVertikal[playerid]][0], 1006.062.0);
                }
            }
        }
        if(
lr == KEY_LEFT)
        {
            
RouleHorizont[playerid]--;
            if(
RouleVertikal[playerid] == 1)
            {
                switch(
RouleHorizont[playerid]+1)
                {
                    case 
4:
                    {
                        
RouleHorizont[playerid]++;
                        return 
true;
                    }
                    case 
12:
                    {
                        
RouleHorizont[playerid] = 4;
                    }
                    case 
20:
                    {
                        
RouleHorizont[playerid] = 12;
                    }
                }
            }
            else if(
RouleVertikal[playerid] == 0)
            {
                switch(
RouleHorizont[playerid]+1)
                {
                    case 
2:
                       {
                        
RouleHorizont[playerid]++;
                        return 
true;
                    }
                    case 
6:
                    {
                        
RouleHorizont[playerid] = 2;
                    }
                    case 
10:
                    {
                        
RouleHorizont[playerid] = 6;
                    }
                    case 
14:
                    {
                        
RouleHorizont[playerid] = 10;
                    }
                    case 
18:
                    {
                        
RouleHorizont[playerid] = 14;
                    }
                    case 
22:
                    {
                        
RouleHorizont[playerid] = 18;
                    }
                }
            }
            else if(
RouleHorizont[playerid] == 0)
            {
                
RouleVertikal[playerid] = 4;
            }
            else if(
RouleHorizont[playerid] < 0)
            {
                
RouleHorizont[playerid] = 0;
                return 
true;
            }
            switch(
Casino[playerid])
            {
                case 
1:
                {
                    
MoveObject(RouleChip[playerid], RouleTables[RouleTable[playerid]][0]+RouleVertikalCoords[RouleVertikal[playerid]][0], RouleTables[RouleTable[playerid]][1]+RouleHorizontCoords[RouleHorizont[playerid]][0], 992.3352.0);
                }
                case 
2:
                {
                    
MoveObject(RouleChip[playerid], RouleTables[RouleTable[playerid]][0]-RouleHorizontCoords[RouleHorizont[playerid]][0], RouleTables[RouleTable[playerid]][1]+RouleVertikalCoords[RouleVertikal[playerid]][0], 1006.062.0);
                }
            }
        }
        else if(
lr == KEY_RIGHT)
        {
            
RouleHorizont[playerid]++;
            if(
RouleVertikal[playerid] == 1)
            {
                switch(
RouleHorizont[playerid]-1)
                {
                     case 
4:
                    {
                        
RouleHorizont[playerid] = 12;
                    }
                    case 
12:
                    {
                        
RouleHorizont[playerid] = 20;
                    }
                    case 
20:
                    {
                        
RouleHorizont[playerid]--;
                        return 
true;
                    }
                }
            }
            else if(
RouleVertikal[playerid] == 0)
            {
                switch(
RouleHorizont[playerid]-1)
                {
                    case 
2:
                    {
                        
RouleHorizont[playerid] = 6;
                    }
                    case 
6:
                    {
                        
RouleHorizont[playerid] = 10;
                    }
                    case 
10:
                    {
                        
RouleHorizont[playerid] = 14;
                    }
                    case 
14:
                    {
                        
RouleHorizont[playerid] = 18;
                    }
                    case 
18:
                    {
                        
RouleHorizont[playerid] = 22;
                    }
                    case 
22:
                    {
                        
RouleHorizont[playerid]--;
                        return 
true;
                    }
                }
            }
            else if(
RouleHorizont[playerid] == 24)
            {
                switch(
RouleVertikal[playerid])
                {
                    case 
2,3:
                    {
                        
RouleVertikal[playerid] = 2;
                    }
                    case 
4,5:
                    {
                        
RouleVertikal[playerid] = 4;
                    }
                    case 
6:
                    {
                        
RouleVertikal[playerid] = 6;
                    }
                }
            }
            else if(
RouleHorizont[playerid] > 24)
            {
                
RouleHorizont[playerid]--;
                return 
true;
            }
            switch(
Casino[playerid])
            {
                case 
1:
                {
                    
MoveObject(RouleChip[playerid], RouleTables[RouleTable[playerid]][0]+RouleVertikalCoords[RouleVertikal[playerid]][0], RouleTables[RouleTable[playerid]][1]+RouleHorizontCoords[RouleHorizont[playerid]][0], 992.3352.0);
                }
                case 
2:
                {
                    
MoveObject(RouleChip[playerid], RouleTables[RouleTable[playerid]][0]-RouleHorizontCoords[RouleHorizont[playerid]][0], RouleTables[RouleTable[playerid]][1]+RouleVertikalCoords[RouleVertikal[playerid]][0], 1006.062.0);
                }
            }
        }
    } 
Обозначаем победителя:
PHP код:
forward EndRoule(tableid);
public 
EndRoule(tableid)
{
    new 
rand random(37), str[8], message[64], line[14];
    
valstr(linerand);
    
format(strsizeof(str), "%s%d"GetNumberColor(rand), rand);
    for(new 
0MAX_PLAYERSi++)
    {
        if(!
IsPlayerConnected(i)) continue;
        {
            if(
RouleTable[i] == tableid || CroupierTable[i] == tableid)
             {
                
GameTextForPlayer(istr30006);
                if(
ChooseBet[i] == 1)
                {
                    
ChooseBet[i] = 0;
                    
DestroyDynamicObject(RouleChip[i]);
                    switch(
Casino[i])
                    {
                        case 
1:
                        {
                            
RouleChip[i] = CreateDynamicObject(1900RouleTables[tableid][0]+RouleVertikalCoords[RouleVertikal[i]][0], RouleTables[tableid][1]+RouleHorizontCoords[RouleHorizont[i]][0], 992.3350.00.00.0);
                        }
                        case 
2:
                        {
                            
RouleChip[i] = CreateDynamicObject(1900RouleTables[tableid][0]-RouleHorizontCoords[RouleHorizont[i]][0], RouleTables[tableid][1]+RouleVertikalCoords[RouleVertikal[i]][0], 1006.060.00.00.0);
                        }
                    }
                    if(
strfind(RouleNumber[i], "1-12"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
1..12:
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*3;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*3);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strfind(RouleNumber[i], "2-12"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
13..24:
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*3;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*3);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strfind(RouleNumber[i], "3-12"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
25..36:
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*3;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*3);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strfind(RouleNumber[i], "1-18"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
1..18:
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*2;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*2);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strfind(RouleNumber[i], "19-36"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
19..36:
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*2;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*2);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strfind(RouleNumber[i], "Red"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36:
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*2;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*2);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strfind(RouleNumber[i], "Black"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35:
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*2;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*2);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strfind(RouleNumber[i], "Even"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36:
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*2;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*2);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strfind(RouleNumber[i], "Odd"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35:
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*2;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*2);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strfind(RouleNumber[i], "3-1"false) != -1)
                    {
                        switch(
rand)
                        {
                            case 
1,4,7,10,13,16,19,22,25,28,31,34:
                            {
                                if(
RouleVertikal[i] == 2)
                                {
                                    
PlayerInfo[i][pCash] += RouleBet[i]*3;
                                    
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*3);
                                    
SendClientMessage(iCOLOR_ORANGEmessage);
                                    continue;
                                }
                            }
                            case 
2,5,8,11,14,17,20,23,26,29,32,35:
                            {
                                if(
RouleVertikal[i] == 4)
                                {
                                    
PlayerInfo[i][pCash] += RouleBet[i]*3;
                                    
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*3);
                                    
SendClientMessage(iCOLOR_ORANGEmessage);
                                    continue;
                                }
                            }
                            case 
3,6,9,12,15,18,21,24,27,30,33,36:
                            {
                                if(
RouleVertikal[i] == 6)
                                {
                                    
PlayerInfo[i][pCash] += RouleBet[i]*3;
                                    
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*3);
                                    
SendClientMessage(iCOLOR_ORANGEmessage);
                                    continue;
                                }
                            }
                        }
                    }
                    else if(
strlen(RouleNumber[i]) >= && strlen(RouleNumber[i]) <= 6)
                    {
                        new 
strfind(RouleNumber[i], linefalse);
                        if(
!= -1)
                        {
                            
strmid(RouleNumber[i], RouleNumber[i], d-1d+2strlen(RouleNumber[i]));
                            for(new 
02a++)
                            {
                                
strfind(RouleNumber[i], ","false);
                                if(
!= -1)
                                {
                                    
strdel(RouleNumber[i], dd+1);
                                }
                            }
                            if(
strlen(RouleNumber[i]) == strlen(line))
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*9;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*9);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else if(
strlen(RouleNumber[i]) >= && strlen(RouleNumber[i]) <= 12)
                    {
                        new 
strfind(RouleNumber[i], linefalse);
                        if(
!= -1)
                        {
                            
strmid(RouleNumber[i], RouleNumber[i], d-1d+2strlen(RouleNumber[i]));
                              for(new 
02a++)
                            {
                                
strfind(RouleNumber[i], ","false);
                                if(
!= -1)
                                {
                                    
strdel(RouleNumber[i], dd+1);
                                }
                            }
                            if(
strlen(RouleNumber[i]) == strlen(line))
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*5;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*5);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                                continue;
                            }
                        }
                    }
                    else
                    {
                        if(
strcmp(RouleNumber[i], linefalsestrlen(RouleNumber[i])) == 0)
                        {
                            if(
rand != 0)
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*10;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*10);
                                
SendClientMessage(iCOLOR_ORANGEmessage);
                            }
                            else
                            {
                                
PlayerInfo[i][pCash] += RouleBet[i]*11;
                                
format(messagesizeof(message), "Âûïàëî %d. Ïîçäðàâëÿåì! Âû âûèãðàëè %d âèðò"randRouleBet[i]*11);
                            }
                            
SendClientMessage(iCOLOR_ORANGEmessage);
                            continue;
                        }
                    }
                    
format(messagesizeof(message), "Âûïàëî %d. Ê ñîæàëåíèþ, âàøà ñòàâêà ïðîèãðàíà"rand);
                    
SendClientMessage(iCOLOR_REDmessage);
                }
            }
            if(
GetPlayerNearestRouleTable(i) == -1)
            {
                
OnPlayerExitRouleTable(itableid);
            }
        }
    }
    
StartRoule[tableid] = 0;
    for(new 
05i++)
    {
        
TextDrawSetString(RouleNumberShow[tableid][i], "-------");
        
TextDrawSetString(RouleBetShow[tableid][i], "-------");
    }
    return 
true;

Reply
#4

Тоесть что бы добиться нормального создание обьектов во время игры, нужно отказаться от стримера? Или почему стримеру нужна "перезарядка" для быстрого создание обьектов?
Reply
#5

Потому что стримятся объекты во время перемещения игрока. Как вариант - измените позицию игрока на малую долю координаты.
Reply
#6

Достигли лимита.
Reply
#7

Лимит не достигнут. Например в OnGameModeInit, я могу еще много нужных обьектов создать с помощью CreateObject. И когда на сервере 2-3 игрока, рулетка работает на 100%. Но как я понял, из-за стримера, CreateObject перестаёт себя адекватно вести.
Reply
#8

Никто не подскажет что делать? В CreateObject 700 обьектов, дело точно не в лимите.
Reply
#9

Quote:
Originally Posted by gensek4
Посмотреть сообщение
Никто не подскажет что делать? В CreateObject 700 обьектов, дело точно не в лимите.
В лимите.
Reply
#10

Так лимит, на сколько я помню 1000 обьектов. И почему тогда, когда на сервере 2-3 человека, все работает как часы?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)