Why CreateDynamicObject doesn't work?
#1

I have streamer, but when i go to mapping nothing appears, why?
This is the objects:

Код:
CreateDynamicObject(11015,1592.8429, -2176.0872, 14.5000,0.00000000,0.00000000,90.00000000); //object(drivingschoolex_sfs) (1)
	CreateDynamicObject(8661,1621.5226, -2175.0017, 12.5506,0.00000000,0.00000000,0.00000000); //
	CreateDynamicObject(984,1641.5227, -2178.6189, 13.2000,0.00000000,0.00000000,0.00000000); //object(fenceshit3) (1)
	CreateDynamicObject(984,1641.5197, -2171.3994, 13.2000,0.00000000,0.00000000,0.00000000); //object(fenceshit3) (2)
	CreateDynamicObject(984,1635.1162, -2165.0007, 13.2000,0.0000, 0.0000, 90.0000); //object(fenceshit3) (3)
	CreateDynamicObject(984,1622.3365, -2165.0007, 13.2000,0.0000, 0.0000, 90.0000); //object(fenceshit3) (4)
	CreateDynamicObject(984,1609.5538, -2164.9932, 13.2000,0.0000, 0.0000, 90.0000); //object(fenceshit3) (5)
	CreateDynamicObject(984,1607.8970, -2165.0100, 13.2000,0.0000, 0.0000, 90.0000); //object(fenceshit3) (6)
	CreateDynamicObject(984,1601.5039, -2171.4011, 13.2000,0.0000, 0.0000, 0.0000); //object(fenceshit3) (7)
	CreateDynamicObject(1538, 1601.57642, -2178.46216, 12.63630,   0.00000, 0.00000, 90.00000); // usa 1
	CreateDynamicObject(1538, 1584.23157, -2175.26294, 12.63630,   0.00000, 0.00000, 90.00000); // usa 2
	CreateDynamicObject(3472, 1601.41382, -2164.85425, 12.77125,   0.00000, 0.00000, 0.00000);
	CreateDynamicObject(1340, 1602.61987, -2183.45117, 13.57730,   0.00000, 0.00000, 0.00000);
Reply
#2

worked for me



PHP код:
CreateDynamicObject(110151592.84290, -2176.0871614.50000,   0.000000.0000090.00000);
CreateDynamicObject(86611621.52258, -2175.0017112.55060,   0.000000.000000.00000);
CreateDynamicObject(9841641.52271, -2178.6189013.20000,   0.000000.000000.00000);
CreateDynamicObject(9841641.51965, -2171.3994113.20000,   0.000000.000000.00000);
CreateDynamicObject(9841635.11621, -2165.0007313.20000,   0.000000.0000090.00000);
CreateDynamicObject(9841622.33655, -2165.0007313.20000,   0.000000.0000090.00000);
CreateDynamicObject(9841609.55383, -2164.9931613.20000,   0.000000.0000090.00000);
CreateDynamicObject(9841607.89697, -2165.0100113.20000,   0.000000.0000090.00000);
CreateDynamicObject(9841601.50391, -2171.4011213.20000,   0.000000.000000.00000);
CreateDynamicObject(15381601.57642, -2178.4621612.63630,   0.000000.0000090.00000);
CreateDynamicObject(15381584.23157, -2175.2629412.63630,   0.000000.0000090.00000);
CreateDynamicObject(34721601.41382, -2164.8542512.77125,   0.000000.000000.00000);
CreateDynamicObject(13401602.61987, -2183.4511713.57730,   0.000000.000000.00000); 
Also tested in server, worked. (used incognito's streamer v2.7.1)

PS. Maybe you have reached the limit of max objects.
Reply
#3

Maybe because you're mixing it with CreateObject.

Try to make an .inc file with this.
Код:
stock loadDynamicMaps()
{
        CreateDynamicObject(11015,1592.8429, -2176.0872, 14.5000,0.00000000,0.00000000,90.00000000); //object(drivingschoolex_sfs) (1)
	CreateDynamicObject(8661,1621.5226, -2175.0017, 12.5506,0.00000000,0.00000000,0.00000000); //
	CreateDynamicObject(984,1641.5227, -2178.6189, 13.2000,0.00000000,0.00000000,0.00000000); //object(fenceshit3) (1)
	CreateDynamicObject(984,1641.5197, -2171.3994, 13.2000,0.00000000,0.00000000,0.00000000); //object(fenceshit3) (2)
	CreateDynamicObject(984,1635.1162, -2165.0007, 13.2000,0.0000, 0.0000, 90.0000); //object(fenceshit3) (3)
	CreateDynamicObject(984,1622.3365, -2165.0007, 13.2000,0.0000, 0.0000, 90.0000); //object(fenceshit3) (4)
	CreateDynamicObject(984,1609.5538, -2164.9932, 13.2000,0.0000, 0.0000, 90.0000); //object(fenceshit3) (5)
	CreateDynamicObject(984,1607.8970, -2165.0100, 13.2000,0.0000, 0.0000, 90.0000); //object(fenceshit3) (6)
	CreateDynamicObject(984,1601.5039, -2171.4011, 13.2000,0.0000, 0.0000, 0.0000); //object(fenceshit3) (7)
	CreateDynamicObject(1538, 1601.57642, -2178.46216, 12.63630,   0.00000, 0.00000, 90.00000); // usa 1
	CreateDynamicObject(1538, 1584.23157, -2175.26294, 12.63630,   0.00000, 0.00000, 90.00000); // usa 2
	CreateDynamicObject(3472, 1601.41382, -2164.85425, 12.77125,   0.00000, 0.00000, 0.00000);
	CreateDynamicObject(1340, 1602.61987, -2183.45117, 13.57730,   0.00000, 0.00000, 0.00000);
        return 1;
}
And put this under gamemode initialize.
Код:
public OnGameModeInit()
{
        // your stuff
        loadDynamicMaps();
}
And put this on top of your script.
Код:
#include <maps>
You have to save it as maps.inc under your pawno/include folder.
Reply
#4

Make sure that you place it inside OnGamemodeInIt and that you have followed the correct format of the function.

Reference
pawn Код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 300.0);
Reply
#5

Because you don't have free slots for CreateDynamicObject. You have already used all with CreateObject. You have to use just few CreateObject like for the object where a player has spawn or just for objects like that and put the others dynamic. Check how many CreateObjects you have. Use this script in a command in your gamemode/fs:
PHP код:
new count=0;
for(new 
k=0;k<1001;k++)
  if(
IsValidObject(k))
       
count++;
new 
msgge[128];
format(msgge,sizeof(msgge),"{FFFFFF}Objects Created: %d",count);
SendClientMessage(playerid,-1,msgge); 
RO: Acu vazui ca esti roman, daca nu reusesti imi poti da PM si te ajut.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)