Pular para o conteúdo principal

RemovePlayerAttachedObject

Descrição

Remova um objeto anexado de um jogador.

NomeDescrição
playeridO ID do jogador do qual remover o objeto.
indexO índice do objeto a ser removido (definido com SetPlayerAttachedObject).

Retornos

1 em caso de sucesso, 0 em caso de falha.

Exemplos

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strmp(cmdtext, "/remove", true)) // Remover objetos anexados
{
for (new i = 0; i < MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if (IsPlayerAttachedObjectSlotUsed(playerid, i))
{
RemovePlayerAttachedObject(playerid, i);
}
}
return 1;
}
return 0;
}

Funções Relacionadas