CreateObject not showing up in-game.
#1

I'm experiencing a problem, I created some objects and put it in the .pwn and it doesn't seem to show up in-game here are the objects:
Код:
	//Solid Objects
	//Map
	CreateObject(8148, -25.03, -40.78, -2.75, 0.00, 0.00, 270.00,100);
	CreateObject(8148, -43.50, 11.26, -2.75, 0.00, 0.00, 180.00,100);
	CreateObject(8148, -3.03, 50.72, 4.65, 0.00, 0.00, 90.00,100);
	CreateObject(8148, 43.77, 15.42, -0.65, 0.00, 0.00, 0.00,100);
	CreateObject(8148, 43.77, 15.42, 6.35, 0.00, 0.00, 0.00,100);
	CreateObject(8148, -25.03, -40.78, 4.65, 0.00, 0.00, 270.00,100);
	CreateObject(8148, -43.77, 11.52, 4.65, 0.00, 0.00, 179.99,100);
	CreateObject(8148, -3.03, 50.72, -2.85, 0.00, 0.00, 90.00,100);
	CreateObject(10023, 29.37, 6.65, 2.10, 0.00, 0.00, 90.00,100);
	CreateObject(10049, 42.45, 7.25, -1.94, 0.00, 0.00, 0.00,100);
	CreateObject(5812, 2.17, -50.69, -5.55, 0.00, 0.00, 0.00,100);
	CreateObject(5812, 30.81, -74.01, -5.55, 0.00, 0.00, 0.00,100);
	CreateObject(16406, -41.01, -7.47, -3.63, 0.00, 0.00, 180.00,100);
	CreateObject(16406, -36.98, 20.88, -3.63, 0.00, 0.00, 180.00,100);
	CreateObject(16406, -29.06, 40.57, -3.63, 0.00, 0.00, 144.18,100);
	CreateObject(17574, -37.28, 19.70, -6.35, 356.86, 0.00, -90.10,100);
	CreateObject(5812, 4.76, 74.01, -5.62, -0.42, -1.38, 0.00,100);
	CreateObject(3261, -14.58, -11.17, -4.15, 0.00, 0.00, -6.00,100);
	CreateObject(3261, -14.95, -14.25, -4.15, 0.00, 0.00, -6.00,100);
	CreateObject(3261, -15.30, -17.25, -4.15, 0.00, 0.00, -6.00,100);
	CreateObject(3261, -15.61, -20.32, -4.15, 0.00, 0.00, -6.00,100);
	CreateObject(3261, -15.59, -23.33, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.67, -26.39, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.67, -29.38, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.72, -32.36, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.71, -35.29, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.78, -38.29, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(703, -38.99, -0.26, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -37.55, 9.37, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -36.68, -17.44, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -25.05, -16.81, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -26.70, -33.15, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -36.22, -33.72, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -37.13, 37.54, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -33.80, 30.00, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -23.85, 46.95, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -14.49, 43.36, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(3472, -8.36, 30.24, -6.00, 0.00, 0.00, 0.00,100);
	CreateObject(3472, -9.93, -5.57, -6.00, 0.00, 0.00, 0.00,100);
	CreateObject(3472, 9.37, -6.83, -6.00, 0.00, 0.00, 0.00,100);
	CreateObject(3472, 10.86, 29.36, -6.00, 0.00, 0.00, 0.00,100);
	CreateObject(3607, 31.94, 7.95, 0.44, 0.00, 0.00, 89.46,100);
Reply
#2

Where did you place this?
Reply
#3

The first one in the Gamemode.

EDIT:
public OnGameModeInit()
Reply
#4

how many objects have you used the CreateObject?

your only allowed a certain ammount of Solid Objects before you aint able to see them

so solution :

1) use incognitos streamers CreateDynamicObject

2) for all maps unless you want vehicles or players to spawn there then you use the CreateObject just for the spawn objects
Reply
#5

can you post all your OnGameModeInit()?
Reply
#6

Are you sure you are on the correct virtual world?
Reply
#7

Quote:
Originally Posted by mineralo
Посмотреть сообщение
can you post all your OnGameModeInit()?
Код:
public OnGameModeInit()
{
	SetGameModeText("Leonardo's Team-Deathmatch!");
	ShowNameTags(0);
	SetWorldTime(12);
	DisableInteriorEnterExits();

	//Poor skins
	AddPlayerClass(137,2522.3120,-1679.1815,15.4970,74.2838,24,99999,27,99999,31,99999);
	AddPlayerClass(212,2522.3120,-1679.1815,15.4970,74.2838,24,99999,27,99999,31,99999);
	AddPlayerClass(230,2522.3120,-1679.1815,15.4970,74.2838,24,99999,27,99999,31,99999);
	//Rich skin
	AddPlayerClass(20,2458.3694,-1662.3798,13.3047,266.0223,24,99999,27,99999,31,99999);
	AddPlayerClass(46,2458.3694,-1662.3798,13.3047,266.0223,24,99999,27,99999,31,99999);
	AddPlayerClass(59,2458.3694,-1662.3798,13.3047,266.0223,24,99999,27,99999,31,99999);
	
	//Solid Objects
	//Map
	CreateObject(8148, -25.03, -40.78, -2.75, 0.00, 0.00, 270.00,100);
	CreateObject(8148, -43.50, 11.26, -2.75, 0.00, 0.00, 180.00,100);
	CreateObject(8148, -3.03, 50.72, 4.65, 0.00, 0.00, 90.00,100);
	CreateObject(8148, 43.77, 15.42, -0.65, 0.00, 0.00, 0.00,100);
	CreateObject(8148, 43.77, 15.42, 6.35, 0.00, 0.00, 0.00,100);
	CreateObject(8148, -25.03, -40.78, 4.65, 0.00, 0.00, 270.00,100);
	CreateObject(8148, -43.77, 11.52, 4.65, 0.00, 0.00, 179.99,100);
	CreateObject(8148, -3.03, 50.72, -2.85, 0.00, 0.00, 90.00,100);
	CreateObject(10023, 29.37, 6.65, 2.10, 0.00, 0.00, 90.00,100);
	CreateObject(10049, 42.45, 7.25, -1.94, 0.00, 0.00, 0.00,100);
	CreateObject(5812, 2.17, -50.69, -5.55, 0.00, 0.00, 0.00,100);
	CreateObject(5812, 30.81, -74.01, -5.55, 0.00, 0.00, 0.00,100);
	CreateObject(16406, -41.01, -7.47, -3.63, 0.00, 0.00, 180.00,100);
	CreateObject(16406, -36.98, 20.88, -3.63, 0.00, 0.00, 180.00,100);
	CreateObject(16406, -29.06, 40.57, -3.63, 0.00, 0.00, 144.18,100);
	CreateObject(17574, -37.28, 19.70, -6.35, 356.86, 0.00, -90.10,100);
	CreateObject(5812, 4.76, 74.01, -5.62, -0.42, -1.38, 0.00,100);
	CreateObject(3261, -14.58, -11.17, -4.15, 0.00, 0.00, -6.00,100);
	CreateObject(3261, -14.95, -14.25, -4.15, 0.00, 0.00, -6.00,100);
	CreateObject(3261, -15.30, -17.25, -4.15, 0.00, 0.00, -6.00,100);
	CreateObject(3261, -15.61, -20.32, -4.15, 0.00, 0.00, -6.00,100);
	CreateObject(3261, -15.59, -23.33, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.67, -26.39, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.67, -29.38, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.72, -32.36, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.71, -35.29, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(3261, -15.78, -38.29, -4.15, 0.00, 0.00, -1.26,100);
	CreateObject(703, -38.99, -0.26, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -37.55, 9.37, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -36.68, -17.44, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -25.05, -16.81, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -26.70, -33.15, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -36.22, -33.72, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -37.13, 37.54, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -33.80, 30.00, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -23.85, 46.95, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(703, -14.49, 43.36, -5.94, 0.00, 0.00, 0.00,100);
	CreateObject(3472, -8.36, 30.24, -6.00, 0.00, 0.00, 0.00,100);
	CreateObject(3472, -9.93, -5.57, -6.00, 0.00, 0.00, 0.00,100);
	CreateObject(3472, 9.37, -6.83, -6.00, 0.00, 0.00, 0.00,100);
	CreateObject(3472, 10.86, 29.36, -6.00, 0.00, 0.00, 0.00,100);
	CreateObject(3607, 31.94, 7.95, 0.44, 0.00, 0.00, 89.46,100);
	
	//Textdraw
	Web = TextDrawCreate(495.000000, 10.000000, "Team-Deathmatch!");
    TextDrawBackgroundColor(Web, 255);
    TextDrawFont(Web, 1);
    TextDrawLetterSize(Web, 0.330000, 1.200000);
    TextDrawColor(Web, 10040319);
    TextDrawSetOutline(Web, 0);
    TextDrawSetProportional(Web, 1);
    TextDrawSetShadow(Web, 1);
	return 1;
}
Quote:
Originally Posted by T0pAz
Посмотреть сообщение
Are you sure you are on the correct virtual world?
How do I make sure I'm in the correct one?
Reply
#8

Not sure if this affects : change the draw distances to floats ( 100.0 not 100 )
worth to try tho.
Reply
#9

I suggest you to use Incognito's Streamer Plugin
Replace
pawn Код:
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
To
pawn Код:
CreateDynamicObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
Reply
#10

Quote:
Originally Posted by CmZxC
Посмотреть сообщение
Not sure if this affects : change the draw distances to floats ( 100.0 not 100 )
worth to try tho.
Still doesn't work.

Quote:
Originally Posted by Dwane
Посмотреть сообщение
I suggest you to use Incognito's Streamer Plugin
Replace
pawn Код:
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
To
pawn Код:
CreateDynamicObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
Tried it, doesn't work either.

EDITED:

Ah, I found out what was wrong. For some reason, SA-MP Map Editor codes didn't work so I used MTA to map.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)