15.11.2010, 11:26
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:
To use that you will have to use AttachObjectToPlayerEx.
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];
}