05.08.2013, 00:46
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.
Here by the creation of the object
thank you for aid future
Cordialement,
Drek.
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");
}
}
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.