Snoop Dogg has managed to avoid a jail sentence after pleading no contest to gun and drug charges, reports DigitalSpy.
The rapper [real name Cordozar Calvin Broadus Jr] was sentenced to five years probation and 800 hours of community service.
The judge also ruled that Snoop must ban any gang members from his entourage.
However, as part of his plea agreement, the 35-year-old might be permitted to continue smoking marijuana in California on medical grounds.
Under the state's Compassionate Use Act the limited use of marijuana for medicinal purposes is permitted. Snoop Dogg's lawyer said that his client has a medical certificate to use the drug to control migraine headaches.
HIs lawyer said, "He [Snoop] will adhere to the parameters of what the law allows."