GetObjectIdexes?
#1

Is there any way to find out how many indexes some object have? With some function, i don't want to look at map editor for each object...
Any smart solution?
Reply
#2

pawn Код:
CMD:onear(playerid, params[])
{
    if(IsPlayerAdmin(playerid)) //Some sort of check
    {
        SendClientMessage(playerid, COLOR_TWRED, "______________________");
        SendClientMessage(playerid, COLOR_TWRED, "Listing all nearby objects");
        SendClientMessage(playerid, COLOR_TWRED, "______________________");
        new Float:X,Float:Y,Float:Z, Float:OX, Float:OY, Float:OZ;
        new str[128];
        GetPlayerPos(playerid, X,Y,Z);
        for (new i = 0; i < MAX_OBJECTS; i++)
        {
            GetObjectPos(i, OX, OY, OZ);
            if(IsPlayerInRangeOfPoint(playerid, 30.0, OX, OY, OZ))
            {
                format(str, 128, "Object (%i) is %f far away from you.", i, GetDistance(X, Y, Z, OX, OY, OZ));
                SendClientMessageEx(playerid, COLOR_WHITE, str);
            }
        }
        return 1;
    }
    return SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this command.");
}
Reply
#3

That's now what i'm looking for...

https://sampwiki.blast.hk/wiki/SetObjectMaterial
materialindex The material index on the object to change

I want to know how many indexes have some object....
Reply
#4

BUMP
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)