Skip to content

SetPlayerCanPickpocket

Takes the right to rob from a player, or gives it back.

With false the “Rob” prompt does not show to this player and every ask of theirs is refused; a session of theirs ends. Everybody may rob by default. It lasts the player’s session, through respawns, until a mode reload. The player’s state key steal is the server’s (see the group’s description) - this call writes it. false when pid is not a player.

SetPlayerCanPickpocket(pid [, enabled])
Parameter Type
pid number the player
enabled boolean false takes the right away, true (the default) gives it back (optional)

boolean - false when there is no such player

-- only the thieves' guild robs
function OnPlayerSpawn(pid)
SetPlayerCanPickpocket(pid, GetPlayerTeam(pid) == 2)
end

CanPlayerPickpocket · SetPlayerPickpocketable · SetPickpocketing · the Pickpocketing group of the index