attachedobject wont remove from player - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: attachedobject wont remove from player (
/showthread.php?tid=424231)
attachedobject wont remove from player -
omidi - 21.03.2013
Код:
bagmoney = SetPlayerAttachedObject( i, 1, 1550, 1, 0.117696, -0.298594, -0.012395, 353.867675, 112.472045, 156.506286, 1.000000, 1.000000, 1.000000 ); // CJ_MONEY_BAG -
new bagmoney;
Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, bagmoney);
the problem is when i relog using sobit it wont remove object
i also puted in onplayerconnect and or player requestclass and even a command /remove but it the command remove randomly sometimes works and not
Код:
dcmd_remove(playerid,params[])
{
#pragma unused params
RemovePlayerAttachedObject(bagmoney,playerid);
when i put this code in on spawn player or connect or request it wont wrok too
Код:
RemovePlayerAttachedObject(bagmoney,playerid)
what is the problem ?
Respuesta: attachedobject wont remove from player -
Xabi - 21.03.2013
You should remove it OnPlayerDisconnect(playerid) and also change the attach for
pawn Код:
bagmoney[playerid] = SetPlayerAttachedObject( i, 1, 1550, 1, 0.117696, -0.298594, -0.012395, 353.867675, 112.472045, 156.506286, 1.000000, 1.000000, 1.000000 ); // CJ_MONEY_BAG -