Objects
#1

What's the difference between creating objects with CreateObject and CreateDynamicObject?

Since I've got both of them, when I put more objects in the script, some of the old ones dissapear, what causes that problem?
Reply
#2

CreateDynamicObject can be created in different worlds, unlike CreateObject.
Reply
#3

https://sampwiki.blast.hk/wiki/YSI:Using_Objects
Reply
#4

With CreateDynamicObject you can use MoveDynamicObject.

E.G:

pawn Код:
OnGameModeInit();
{
    policedoor1 =  CreateDynamicObject(971, 1588.5617, -1638.1036, 12.7200, 0, 0, 0, -1, -1, -1, 150.0);
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/lspddoor", true)) {
        if(Groups[Player[playerid][Group]] = 1) {
            MoveDynamicObject(LSPDDoor1, 239.5439453125, 114.099609375, 1002.21875, 1);
        }
        else {
        }
        return 1;
    }
    return 0;
}
Dont mind if I made a mistake in the above code, I wrote it quickly. xD
Reply
#5

Quote:
Originally Posted by Schurman
Посмотреть сообщение
With CreateDynamicObject you can use MoveDynamicObject.

E.G:

pawn Код:
OnGameModeInit();
{
    policedoor1 =  CreateDynamicObject(971, 1588.5617, -1638.1036, 12.7200, 0, 0, 0, -1, -1, -1, 150.0);
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/lspddoor", true)) {
        if(Groups[Player[playerid][Group]] = 1) {
            MoveDynamicObject(LSPDDoor1, 239.5439453125, 114.099609375, 1002.21875, 1);
        }
        else {
        }
        return 1;
    }
    return 0;
}
Dont mind if I made a mistake in the above code, I wrote it quickly. xD
Np, I've got your point, that's important..

anyone knows why do my objects dissapear?
Reply
#6

https://sampwiki.blast.hk/wiki/Limits
Reply
#7

CreateDynamicObject is used by the streamer, which will increase the performance of your server and also adds the ability to exceed the objects limit that SA:MP has.

It also adds more options to configure your objects, such as for a certain player, interior or virtual world.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)