Retrieve position of an object
#1

Hello,

I created a small function that creates an object, I would like to retrieve the position of the object for a command to see if the player is ready or not this object.

pawn Код:
if(strcmp(subcmd, "haha", true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid, 8.0, info[playerid][bObjet1], info[playerid][bObjet2], adavre_info[playerid][bObjet3]))
    {
        ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.1,0,1,1,1,1);
        FreezePlayer(playerid,"Freeze");
    }
    else
    {
        SendClientMessage(playerid, COLOR_JOB, "no position object");
    }
}
Here by the creation of the object

pawn Код:
o1[playerid] = CreateDynamicObject(2900,posX-0.16,posY+0.49,posZ-0.95,0.0,0.0,0.0,-1,-1,-1,250);
    o2[playerid] = CreateDynamicObject(2900,posX+0.29,posY+0.31,posZ-0.95,0.0,180.0,330.68,-1,-1,-1,250);
    o3[playerid] = CreateDynamicObject(2900,posX-0.05,posY-0.36,posZ-0.95,0.0,0.0,0.0,-1,-1,-1,250);

    info[playerid][bObjet1] = o1[playerid];
    info[playerid][bObjet2] = o2[playerid];
    info[playerid][bObjet3] = o3[playerid];

thank you for aid future
Cordialement,
Drek.
Reply


Messages In This Thread
Retrieve position of an object - by Drek - 05.08.2013, 00:46
Re: Retrieve position of an object - by Marricio - 05.08.2013, 00:51
Re : Retrieve position of an object - by Drek - 05.08.2013, 00:57
Re: Retrieve position of an object - by Marricio - 05.08.2013, 01:19
Re : Retrieve position of an object - by Drek - 05.08.2013, 01:21

Forum Jump:


Users browsing this thread: 2 Guest(s)