11.08.2012, 11:05
Thank you Jefff, for your help. Everything is working fine, but now there is another problem
I have created a command to delete selected object:
So when i spawn objects and deleting lets say one of them, then doing /saveobjects - deleted object still is in my objects.txt EXAMPLE:
---SPAWNED 3 objects and the last one(2343) was deleted with /delete and then everything is saveded with /saveobjects---
As you can see, there is still object CreateObject(2343,-311.4164,1522.8221,74.8593,0.0000,0.0000,84.0050); even if it was deleted.
So could you help me with that problem? Thanks again if you could, I would be very pleased again
And of course sorry for my english
I have created a command to delete selected object:
pawn Код:
if (strcmp("/delete", cmdtext, true, 10) == 0)
{
if(Player[playerid][admin] < 3)
{
return SendClientMessage(playerid, COLOR_RED,"Command unavailable");
}
SelectObject(playerid);
SendClientMessage(playerid, GELTONA,"Select object, which you want to delete");
return 1;
}
pawn Код:
public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
{
if(type == SELECT_OBJECT_GLOBAL_OBJECT)
{
DestroyObject(objectid);
}
else
{
DestroyPlayerObject(playerid, objectid);
}
SendClientMessage(playerid, 0xFFFFFFFF, "You have deleted selected object!");
return 1;
}
---SPAWNED 3 objects and the last one(2343) was deleted with /delete and then everything is saveded with /saveobjects---
Код:
CreateObject(2341,-306.7627,1520.7591,74.8593,0.0000,0.0000,161.7124); CreateObject(2342,-309.4980,1520.4886,74.8593,0.0000,0.0000,119.7254); CreateObject(2343,-311.4164,1522.8221,74.8593,0.0000,0.0000,84.0050);
So could you help me with that problem? Thanks again if you could, I would be very pleased again
And of course sorry for my english