s1mple Posted October 15, 2015 Share Posted October 15, 2015 local policeSkins = {[280]=true, [281]=true, [282]=true, [283]=true, [284]=true, } can anyone can make this with addcommander? like if i write "duty" then i get one skin over there in roleplay server los santos police "faction type Law" Link to comment
AMARANT Posted October 15, 2015 Share Posted October 15, 2015 local policeSkins = {280, 281, 282, 283, 284} function Duty(player,command) local randomskin = policeSkins[math.random(1,#policeSkins)] setElementModel(player,randomskin) end addCommandHandler("duty",Duty) Link to comment
Enargy, Posted October 16, 2015 Share Posted October 16, 2015 local avaible_skin = { [280]=true, [281]=true, [282]=true, [283]=true, [284]=true } function blahblah(thePlayer,_,id) if ( avaible_skin[tonumber(id)] ) then setElementModel(thePlayer,id); return true; end return false; end addCommandHandler("duty",blahblah) /duty Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now