How can i add objects ?
#1

Hello.I am using PPC trucking mod and i created objects with samp map editor.I save the file as .pwn.How can i add objects to my SAMP server ?I tried to add them after public OnGameModeInit() in my gamemode, but i cant see my objects when i compile and start my server.Please help me
Reply
#2

Upgrade Your Streamer.inc And plugin And You Can Create Objects By Using

CreateObject([object id], [Pos x], [Pos Y], [Pos Z]);
Reply
#3

i did it.I cant do that, but i want to flip the object and to change rotation
Reply
#4

Here is how you rotate it

Код:
///=========MODELID, X, Y, Z and the last one (90.000000) thats the rotation Position. change it to whatever your rotation is.         
CreateDynamicObject(5706,147.5000000,-1860.5996100,-3.1000000,0.0000000,0.0000000,90.0000000);
If you are using "Createobject" its thesame

Код:
///=========MODELID, X, Y, Z and the last one (90.000000) thats the rotation Position. change it to whatever your rotation is.         
CreateObject(5706, 147.5000000, -1860.5996100, -3.1000000, 0.0000000, 0.0000000, 90.0000000);
Reply
#5

I am using /object [id] [x] [y] [z] [angel]
Reply
#6

And where i must post this ?
CreateObject(5706, 147.5000000, -1860.5996100, -3.1000000, 0.0000000, 0.0000000, 90.0000000);
Reply
#7

Код:
/object [id] [x] [y] [z] [angel]
That's a scripted command, you must get MTA or SAMP Map editor to map a place, then put the code on :
Код:
OnGameModeInit
Reply
#8

I did it, but then compiler has errors and i cant find my objects on the map.I post in my gamemode and then compile
CreateObject(18789, 101.98926, 248.30103, -43.04045, 0.00000, 25.00000, 0.00000);
CreateObject(18789, -33.84485, 248.28735, 20.33365, 0.00000, 25.00000, 0.00000);
CreateObject(18783, -111.80322, 258.36084, 49.93365, 0.00000, 0.00000, 0.00000);
CreateObject(18783, -111.76917, 238.28979, 49.93365, 0.00000, 0.00000, 0.00000);
CreateObject(18783, -131.72888, 238.31641, 49.93365, 0.00000, 0.00000, 0.00000);
CreateObject(18783, -131.70007, 258.29785, 49.93365, 0.00000, 0.00000, 0.00000);
CreateObject(980, -107.53186, 228.44653, 55.03365, 0.00000, 0.00000, 0.00000);
CreateObject(19003, -187.66650, -268.27759, -83.83364, 0.00000, 0.00000, 0.00000);
CreateObject(980, -119.02014, 228.50464, 55.03365, 0.00000, 0.00000, 0.00000);
CreateObject(980, -130.56116, 228.55664, 55.03365, 0.00000, 0.00000, 0.00000);
CreateObject(980, -136.01831, 228.35767, 55.03365, 0.00000, 0.00000, 0.00000);
CreateObject(980, -107.71570, 268.27759, 55.03365, 0.00000, 0.00000, 0.00000);
CreateObject(980, -119.19702, 268.24438, 55.03365, 0.00000, 0.00000, 0.00000);
CreateObject(980, -130.67419, 268.25146, 55.03365, 0.00000, 0.00000, 0.00000);
CreateObject(980, -135.83521, 268.22290, 55.03365, 0.00000, 0.00000, 0.00000);
CreateObject(980, -101.65479, 234.34741, 55.03365, 0.00000, 0.00000, 90.00000);
CreateObject(980, -101.80396, 262.36255, 55.03365, 0.00000, 0.00000, 90.00000);
CreateObject(19071, -167.64111, 248.30518, 66.83364, 30.00000, 0.00000, 90.00000);
CreateObject(18783, -204.04895, 258.19556, 79.63364, 0.00000, 0.00000, 0.00000);
CreateObject(18783, -204.07495, 238.18774, 79.63364, 0.00000, 0.00000, 0.00000);
CreateObject(18783, -223.90808, 238.17480, 79.63364, 0.00000, 0.00000, 0.00000);
CreateObject(18783, -223.97510, 258.18384, 79.63364, 0.00000, 0.00000, 0.00000);
CreateObject(980, -199.75391, 268.14038, 83.83364, 0.00000, 0.00000, 0.00000);
CreateObject(980, -211.24243, 268.11768, 83.83364, 0.00000, 0.00000, 0.00000);
CreateObject(980, -222.73608, 268.08838, 83.83364, 0.00000, 0.00000, 0.00000);
CreateObject(980, -228.26001, 268.07104, 83.83364, 0.00000, 0.00000, 0.00000);
CreateObject(980, -199.53821, 228.25317, 83.83364, 0.00000, 0.00000, 0.00000);
CreateObject(980, -211.21741, 228.40967, 83.83364, 0.00000, 0.00000, 0.00000);
CreateObject(980, -222.66052, 228.44287, 83.83364, 0.00000, 0.00000, 0.00000);
CreateObject(980, -228.11853, 228.20630, 83.83364, 0.00000, 0.00000, 0.00000);
CreateObject(18778, -237.65955, 247.76978, 83.46925, 0.00000, 0.00000, 90.00000);
CreateObject(18779, 237.65942, 250.90747, -67.39165, 0.00000, 0.00000, 180.00000);
Reply
#9

Can you show your OnGameModeInit?
Reply
#10

It would also help if you were to post the errors you were getting as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)