Why CreateDynamicObject doesn't work? -
PudraMentolata - 19.04.2016
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);
Re: Why CreateDynamicObject doesn't work? -
thaKing - 19.04.2016
worked for me
PHP код:
CreateDynamicObject(11015, 1592.84290, -2176.08716, 14.50000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(8661, 1621.52258, -2175.00171, 12.55060, 0.00000, 0.00000, 0.00000);
CreateDynamicObject(984, 1641.52271, -2178.61890, 13.20000, 0.00000, 0.00000, 0.00000);
CreateDynamicObject(984, 1641.51965, -2171.39941, 13.20000, 0.00000, 0.00000, 0.00000);
CreateDynamicObject(984, 1635.11621, -2165.00073, 13.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(984, 1622.33655, -2165.00073, 13.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(984, 1609.55383, -2164.99316, 13.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(984, 1607.89697, -2165.01001, 13.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(984, 1601.50391, -2171.40112, 13.20000, 0.00000, 0.00000, 0.00000);
CreateDynamicObject(1538, 1601.57642, -2178.46216, 12.63630, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(1538, 1584.23157, -2175.26294, 12.63630, 0.00000, 0.00000, 90.00000);
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);
Also tested in server, worked. (used incognito's streamer v2.7.1)
PS. Maybe you have reached the limit of max objects.
Re: Why CreateDynamicObject doesn't work? -
iKevin - 19.04.2016
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.
You have to save it as maps.inc under your pawno/include folder.
Re: Why CreateDynamicObject doesn't work? -
DarkLored - 19.04.2016
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);
Re: Why CreateDynamicObject doesn't work? -
AdrianG - 20.04.2016
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.