CreateObjects are not Creating
#1

CreateObjects are not Creating when i start the server.
They are in a Filterscript.
I need to reload the Filterscript ingame with /rcon reloadfs to create them

And everytime when someone connects to the server i need to reload.

The problem is on 0.3.DL.
On 0.3.7 it is working.

sorry for my bad english
Reply
#2

Make sure that if you are using CreateObject, you have not already exceeded the limit of objects, in addition to checking if you are placing the objects in the correct public (OnFilterScriptInit)

Of course, I would suggest using Streamer. (CreateDynamicObject)

And do not forget check that you have not exceeded the limit amount of FilterScripts (16 FilterScripts)
Reply
#3

Quote:
Originally Posted by Nokia17Rocks
Посмотреть сообщение
Make sure that if you are using CreateObject, you have not already exceeded the limit of objects, in addition to checking if you are placing the objects in the correct public (OnFilterScriptInit)

Of course, I would suggest using Streamer. (CreateDynamicObject)

And do not forget check that you have not exceeded the limit amount of FilterScripts (16 FilterScripts)
I know how to use it.
I dont have more than limit objects and i have only 1 filterscript.

I need CreateObject for objects where can be spawned vehicles, for another objects
i'm using streamer (CreateDynamicObject)
Reply
#4

Quote:
Originally Posted by Shotshy
Посмотреть сообщение
I know how to use it.
I dont have more than limit objects and i have only 1 filterscript.

I need CreateObject for objects where can be spawned vehicles, for another objects
i'm using streamer (CreateDynamicObject)
If you are using your objects something like this, you are good, if not, I don't know what's you problem.

Код:
#define FILTERSCRIPT

#include <a_samp>


public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("Example Script");
	print("--------------------------------------\n");
	
	CreateObject(-1005, 1796.89, -1548.20, 5687.70, 0.00, 0.00, 0.00); //Example Coords and custom model ID
	return 1;
}
public OnFilterScriptExit()
{
	return 1;
}
Or show us a example of your code... I hope you find a solution to your problem, anything, let us know.
Reply
#5

https://imgur.com/a/yOdDG

I tried again on 0.3.7 and it's working, on 0.3.DL it is not working.

@kalcor maybe you did somethink wrong when you added 2000 MAX_OBJECTS and Custom Objects?

Please fix this.
Reply
#6

Quote:
Originally Posted by Shotshy
Посмотреть сообщение
https://imgur.com/a/yOdDG

I tried again on 0.3.7 and it's working, on 0.3.DL it is not working.

kalcor maybe you did somethink wrong when you added 2000 MAX_OBJECTS and Custom Objects?

Please fix this.
Kalcor has nothing to do with this error that happens to you. XD

It happens that your new tmpobjid; you are creating it out of stock, so when you read the stock it only maps the first object, and the others no longer.

Then you should do the following:

Код:
stock CreateESRPMaps()
{
     new tmpobjid;
     tmpobjid = CreateDynamicObject(7009, 1871.825, -1713.793, 26.475, 0.000, 0.000, -90.000, 400.000);
     SetDynamicObjectMaterial(tmpobjid, 0, 13715, "richman02_lahills", "monobloc_256118", 0x00000000);
     tmpobjid = CreateDynamicObject(19545, 1862.880, -1628.268, 12.513, 0.000, 0.000, 90.000, 400.000);
     SetDynamicObjectMaterial(tmpobjid, 0, 10765, "airportgnd_sfse", "ws_runwaytarmac", 0x00000000);
     And all your other objects...
}
Ohhh, and of course, I noticed that you are not using custom objects, but normal GTA objects, so i supose that objects are in the rest of the script..., but I hope that your problem has been solved. Let us know if it was.

And I have the doubt about why it is that when leaving the filterscript you need to destroy the objects?
Reply
#7

Quote:
Originally Posted by Nokia17Rocks
Посмотреть сообщение
Kalcor has nothing to do with this error that happens to you. XD

It happens that your new tmpobjid; you are creating it out of stock, so when you read the stock it only maps the first object, and the others no longer.

Then you should do the following:

Код:
stock CreateESRPMaps()
{
     new tmpobjid;
     tmpobjid = CreateDynamicObject(7009, 1871.825, -1713.793, 26.475, 0.000, 0.000, -90.000, 400.000);
     SetDynamicObjectMaterial(tmpobjid, 0, 13715, "richman02_lahills", "monobloc_256118", 0x00000000);
     tmpobjid = CreateDynamicObject(19545, 1862.880, -1628.268, 12.513, 0.000, 0.000, 90.000, 400.000);
     SetDynamicObjectMaterial(tmpobjid, 0, 10765, "airportgnd_sfse", "ws_runwaytarmac", 0x00000000);
     And all your other objects...
}
Ohhh, and of course, I noticed that you are not using custom objects, but normal GTA objects, so i supose that objects are in the rest of the script..., but I hope that your problem has been solved. Let us know if it was.

And I have the doubt about why it is that when leaving the filterscript you need to destroy the objects?
Really?
No it's not working and if you are not reading - 'On 0.3.7 is working'.
Reply
#8

I think you're doing something wrong... cause' i have a lot of objects in my server 0.3.DL where i set parked vehicles, and everything works properly... also i tested the new custom objects and work fine, Nothing wrong with the version, just some compatibility changes...
Reply
#9

I’m using gta/samp objects, not custom..
Reply
#10

Fixed.
I added a Timer OnFilterScriptInit(2seconds(2000miliseconds)) and in the timer to load the objects.
Reply
#11

Quote:
Originally Posted by Shotshy
Посмотреть сообщение
Fixed.
I added a Timer OnFilterScriptInit(2seconds(2000miliseconds)) and in the timer to load the objects.
It's good to finally know that you found a solution to the problem, I have one last query, did you update the pawno's includes? (a_samp ... etc) (Those of the version 0.3.DL) and compiled already with these placed?

in the end I did not know if you placed the new tmpobjid; inside the stock
Reply
#12

Quote:
Originally Posted by Nokia17Rocks
Посмотреть сообщение
It's good to finally know that you found a solution to the problem, I have one last query, did you update the pawno's includes? (a_samp ... etc) (Those of the version 0.3.DL) and compiled already with these placed?

in the end I did not know if you placed the new tmpobjid; inside the stock
1. Yes, of course i updated the pawno's includes.
2. No.
Reply
#13

add it in gamemode
Reply
#14

send me your object fs
Reply
#15

because you have to disable artwork to 0 in config
Reply
#16

No. I have this error too. But if I recompile with streamer include and add streamer to plugins - it works. Feeling like the version of the SA-MP is pre-configured to use only with a streamer.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)