SetPlayerAttachedObject TR
From SA-MP Wiki
Description:
Bir nesneyi, belirtilen oyuncunun belirtilen bir bölgesine takar.
(playerid, index, modelid, bolge, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotasyonX, Float:fRotasyonY, Float:fRotasyonZ, Float:fBoyutX, Float:fBoyutY, Float:fBoyutZ)
playerid | ID of the player you want to attach the object to. |
index | the index of the object |
modelid | The model you want to use. |
bone | The bone you want to attach the object to. |
fOffsetX | (optional) X axis offset for the object position. |
fOffsetY | (optional) Y axis offset for the object position. |
fOffsetZ | (optional) Z axis offset for the object position. |
fRotX | (optional) X axis rotation of the object. |
fRotY | (optional) Y axis rotation of the object. |
fRotZ | (optional) Z axis rotation of the object. |
fScaleX | (optional) X axis scaling of the object. |
fScaley | (optional) Y axis scaling of the object. |
fScalez | (optional) Z axis scaling of the object. |
Return Values:
1 on success, 0 on failure
Notes
- Bir oyuncuya en fazla 5 nesne takılabilir.
- Bu fonksiyon CreateObject ve CreatePlayerObject fonksiyonlarından bağımsızdır.
public OnPlayerSpawn(playerid) { SetPlayerAttachedObject(playerid, 3, 1609, 2); // Belirtilen oyuncunun kafasına bir kaplumbağa nesnesi takar. return 1; }
Önceki scriptlerinizi kolayca 0.3c scriptlerine çevirmenizi sağlayacak kodlar:
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9) #define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1) #define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
RemovePlayerAttachedObject - Oyuncuya takılan nesneyi kaldırma.
IsPlayerAttachedObjectSlotUsed - Bir oyuncunun bu fonksiyon içinde kullanılabilecek index değerinin dolu olup olmadığını döndürür.