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.
Syntax
Section titled “Syntax”SetPlayerCanPickpocket(pid [, enabled])| Parameter | Type | |
|---|---|---|
pid |
number | the player |
enabled |
boolean | false takes the right away, true (the default) gives it back (optional) |
Returns
Section titled “Returns”boolean - false when there is no such player
Example
Section titled “Example”-- only the thieves' guild robsfunction OnPlayerSpawn(pid) SetPlayerCanPickpocket(pid, GetPlayerTeam(pid) == 2)endSee also
Section titled “See also”CanPlayerPickpocket · SetPlayerPickpocketable · SetPickpocketing · the Pickpocketing group of the index
