AttachObjectToPlayer
#2

There is a FS that will help you attaching the object, then when you die you destroy the object, and if you wanna check if he has the briefcase, you must make a variable.

Something like this:

pawn Код:
new bool:HasObject[MAX_PLAYERS];

stock AttachObjectToPlayerEx(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ)
{
    AttachObjectToPlayer(objectid, playerid, OffsetX, OffsetY, OffsetZ, rX, rY, rZ);
    HasObject[playerid] = true;
    return 1;
}

stock DetachObject(objectid)
{
    DestroyObject(objectid);
    HasObject[playerid] = false;
    return 1;
}

stock HasAttachedObject(playerid)
{
    return HasObject[playerid];
}
To use that you will have to use AttachObjectToPlayerEx.
Reply


Messages In This Thread
AttachObjectToPlayer - by SkizzoTrick - 15.11.2010, 10:55
Re: AttachObjectToPlayer - by The_Moddler - 15.11.2010, 11:26
Re: AttachObjectToPlayer - by SkizzoTrick - 15.11.2010, 12:03
Re: AttachObjectToPlayer - by iggy1 - 15.11.2010, 12:05
Re: AttachObjectToPlayer - by SkizzoTrick - 15.11.2010, 12:29
Re: AttachObjectToPlayer - by iggy1 - 15.11.2010, 12:42
Re: AttachObjectToPlayer - by mick88 - 15.11.2010, 12:47
Re: AttachObjectToPlayer - by SkizzoTrick - 15.11.2010, 14:24
Re: AttachObjectToPlayer - by iggy1 - 15.11.2010, 14:26

Forum Jump:


Users browsing this thread: 2 Guest(s)