Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ch_lockpick = {function(player,choice)
- local user_id = vRP.getUserId(player)
- if user_id ~= nil then
- -- anim and lockpick
- if math.random(1,10) == 1 then
- if vRP.tryGetInventoryItem(user_id,"lockpick",1,true) then
- vRPclient.getNearestVehicle(player,{5},function(veh)
- if veh then
- vRPclient.playAnim(player,{false,{task="WORLD_HUMAN_WELDING"},false})
- SetTimeout(20000, function()
- vRPclient.vc_lockPick(player,{veh})
- vRPclient.stopAnim(player,{false})
- end)
- else
- vRPclient.notify(nplayer,{"~g~Quelqu'un a essayé de vous braquer ."})
- vRPclient.notify(player,{"~r~Tentative rater."})
- end
- end)
- end
- end
- end
- end,lang.police.menu.handcuff.description()}
- -- REGISTER MAIN MENU CHOICES
- vRP.registerMenuBuilder({"main", function(add, data)
- local user_id = vRP.getUserId({data.player})
- if user_id ~= nil then
- local choices = {}
- if vRP.hasPermission({user_id,"player.player_menu"}) then
- choices["Joueur"] = ch_player_menu -- opens player submenu
- end
- if vRP.hasPermission({user_id,"toggle.service"}) then
- choices["Service"] = choice_service -- toggle the receiving of missions
- end
- if vRP.hasPermission({user_id,"player.loot"}) then
- choices["💪 Looter corps"] = choice_loot -- take the items of nearest player in coma
- end
- if vRP.hasPermission({user_id,"mugger.mug"}) then
- choices["💪 Braquer"] = ch_mug -- steal nearest player wallet
- end
- if vRP.hasPermission({user_id,"player.handcuff"}) then
- choices["🔗 Menotter"] = ch_handcuff -- steal nearest player wallet
- end
- if vRP.hasPermission({user_id,"player.lockpick"}) then
- choices["🔐 Crochetter véhicule"] = ch_lockpick -- steal nearest player wallet
- end
- if vRP.hasPermission({user_id,"hacker.hack"}) then
- choices["Hacker"] = ch_hack -- 1 in 100 chance of stealing 1% of nearest player bank
- end
- add(choices)
- end
- end})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement