18.02.2012, 12:18
To remove attached object, you have to use the RemovePlayerAttachedObject() function, calling again SetPlayerAttachedObject() won't work.
pawn Код:
if (strcmp(cmd, "/helmet", true) == 0) {
if (IsPlayerAttachedObjectSlotUsed(playerid, 3))
RemovePlayerAttachedObject(playerid, 3);
else
SetPlayerAttachedObject(playerid, 3, 18645, 2, 0.07, 0.017, 0, 88, 75, 0);
return 1;
}