PDA

View Full Version : create/remove object bugs


ancezas
09/10/2013, 07:57 PM
http://pastebin.com/nK34zM1y
have this kode and the first one is creating good but the second called Laukas nr.2 isin't creating in the right place

xVIP3Rx
09/10/2013, 08:03 PM
isin't creating in the right place
Then the coords must be wrong, Create it again or edit it...

ancezas
09/10/2013, 08:11 PM
Then the coords must be wrong, Create it again or edit it...

i'm creating again and again, and cords are mach.

I removing original object and then in that place creating the same object with veriable, but all of the fields ar not creating in place

xVIP3Rx
09/10/2013, 08:28 PM
What are you using to create it ?
I mean how are you saving it, And is other objects working good ?

ancezas
09/10/2013, 08:39 PM
yes with other is good, i'm creating it with samp constructor

xVIP3Rx
09/10/2013, 08:50 PM
I can't recheck your codes, Heavy load on Pastebin..
I guess the problem is when you removed the original objects.. The ones you made got deleted too,
But I've never tried that and have no experience with it.

ancezas
10/10/2013, 08:12 AM
stock NaikinamiObijektai(playerid)
{
//Laukas Nr. 1
RemoveBuildingForPlayer(playerid, 13228, 351.9141, -268.3203, 10.2578, 0.0);
RemoveBuildingForPlayer(playerid, 13208, 351.9141, -268.3203, 10.2578, 0.0);
//Laukas Nr. 2
RemoveBuildingForPlayer(playerid, 13414, 50.1797, -43.2813, 0.9844, 0.25);
RemoveBuildingForPlayer(playerid, 13050, 50.1797, -43.2813, 0.9844, 0.25);
}
//Laukų material...
stock Laukai()
{
new Laukas[2];
//Laukas Nr. 1
Laukas[0] = CreateObject(13208, 351.9141, -268.3203, 10.2578,0.00, 0.00, 0.00);
/*
//Pasodintas...
SetObjectMaterial(Laukas[0],7,13050,"ce_ground11","sw_crops");
SetObjectMaterial(Laukas[0],8,13050,"ce_ground11","sw_crops");
SetObjectMaterial(Laukas[0],3,13050,"ce_ground11","sw_crops");*/
/*
//Užauges...
SetObjectMaterial(Laukas[0],7,17123,"cuntwlandse","newcrop3");
SetObjectMaterial(Laukas[0],8,17123,"cuntwlandse","newcrop3");
SetObjectMaterial(Laukas[0],3,17123,"cuntwlandse","newcrop3");*/
//Nukulta...
SetObjectMaterial(Laukas[0],7,13030,"ce_ground11","desertgryard256");
SetObjectMaterial(Laukas[0],8,13030,"ce_ground11","desertgryard256");
SetObjectMaterial(Laukas[0],3,13030,"ce_ground11","desertgryard256");

//Laukas Nr. 2
Laukas[1] = CreateObject(13050, 50.1797, -43.2813, 0.9844, 0.25, 0.25, 0.25);
/*
//Pasodintas...
SetObjectMaterial(Laukas[1],0,13050,"ce_ground11","sw_crops");
SetObjectMaterial(Laukas[1],0,13050,"ce_ground11","sw_crops");
SetObjectMaterial(Laukas[1],0,13050,"ce_ground11","sw_crops");*/

//Užauges...
SetObjectMaterial(Laukas[1],0,17123,"cuntwlandse","newcrop3");
SetObjectMaterial(Laukas[1],0,17123,"cuntwlandse","newcrop3");
SetObjectMaterial(Laukas[1],0,17123,"cuntwlandse","newcrop3");
//Nukulta...
/*SetObjectMaterial(Laukas[1],0,13030,"ce_ground11","desertgryard256");
SetObjectMaterial(Laukas[1],0,13030,"ce_ground11","desertgryard256");
SetObjectMaterial(Laukas[1],0,13030,"ce_ground11","desertgryard256");*/

}



http://www.part.lt/img/15a68cabb3f052344bf3ac967f0acace317.png (http://www.part.lt/perziura/15a68cabb3f052344bf3ac967f0acace317.png)
http://www.part.lt/img/efd10fd42e434492e54e31df365f118b512.png (http://www.part.lt/perziura/efd10fd42e434492e54e31df365f118b512.png)

ancezas
13/10/2013, 12:42 PM
bump

ancezas
13/10/2013, 09:04 PM
help pls