Getting model id of spawned object
#3

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:
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;
}
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---
Код:
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);
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
Reply


Messages In This Thread
Getting model id of spawned object - by dNsLTU - 10.08.2012, 21:46
Re: Getting model id of spawned object - by Jefff - 10.08.2012, 23:13
Re: Getting model id of spawned object - by dNsLTU - 11.08.2012, 11:05
Re: Getting model id of spawned object - by Jefff - 11.08.2012, 14:12
Re: Getting model id of spawned object - by dNsLTU - 11.08.2012, 17:41
Re: Getting model id of spawned object - by Jefff - 11.08.2012, 20:49
Re: Getting model id of spawned object - by dNsLTU - 12.08.2012, 15:00
Re: Getting model id of spawned object - by dNsLTU - 13.08.2012, 10:42

Forum Jump:


Users browsing this thread: 1 Guest(s)