Incognito streamer problem. (DestroyDynamicObject)
#1

FIXED, My own fault! You may lock this topic.
Quote:
Originally Posted by oskarunt
Посмотреть сообщение
Hello,

I am having a problem with destroying an object with DestroyDynamicObject from the Incognito steamer plugin.

I am creating a "vault door" for a dynamic Casino system and I want to make a system where exploding a bomb there removes the door. This system worked fine until something happened and now the object just stays there. Didn't change anything I think?

Here is the code for loading the object

PHP код:
cStats[i][vault] = CreateDynamicObject(26342144.21627994.2999900180,cStats[i][ID],1); 
The variable "i" is then the ID of the Casino and cStats[i][ID] is the Virtual World or database ID.

When a player enters a casino a variable pInCasino[playerid] will be set to the casino ID.

This is the command I use to test the destroying of the vault.

PHP код:
YCMD:vault(playeridparams[], help)
{
    if(
pInCasino[playerid] != -1)
    {
        new 
casino pInCasino[playerid];
        if(
IsValidDynamicObject(cStats[casino][vault]))
        {
            
DestroyDynamicObject(cStats[casino][vault]);
                        
SendClientMessage(playerid,COLOR_YELLOW,"Object destroyed.");
        }
        else return 
SendClientMessage(playerid,COLOR_YELLOW,"Not valid object");
    }
    else return 
SendClientMessage(playerid,COLOR_YELLOW,"Not in casino");
    return 
1;

The first time I use this, I get the "Object destroyed" message, second time I get "Not valid object" but the object is still there. Tried leaving the casino and coming back, still nothing changed.

Any advice?


Thanks a lot!
Reply
#2

I had the same problem. I used "CreateDynamicObjectEx" and it worked fine.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)