sel3a Posted October 23, 2014 Share Posted October 23, 2014 Well, First of all hello i am new in scripting things i started this 1 week ago i am downloading some scripts from the community and reading them this is how i'm learning. anyway i've tried to make scripts and i did it Successfully like Story rob, changing the stats, trucker simple scripts anyway i have a problem i can't lock the script to a Team (if there is players in the team they are the only players who can use the commands) i hope that you can understand what i am saying like what i said i am new so it's Very complex for me. i hope that you will help me. -----------Lights------------ function lights (src, cmd) if getPedOccupiedVehicle (src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleOverrideLights (vehicle) == 1 then setVehicleOverrideLights (vehicle, 2) outputChatBox ("FRF Lights On!", src, 0, 255, 0) else setVehicleOverrideLights (vehicle, 1) outputChatBox ("FRF Lights Off!", src, 255, 0, 0) end else return false end end addCommandHandler ("lights", lights) local posicoes = { { 2600.455078125, 2761.0593261719, 10.8203125 }, { 2596.9272460938,2749.5744628906,10.8203125 }, { 2604.7878417969,2751.6325683594,10.8203125 }, } function PosicaoPlayer ( thePlayer, command ) local azar = math.random ( #posicoes ) local veh = getPedOccupiedVehicle(thePlayer) if (veh) then setElementPosition(veh, unpack ( posicoes [ azar ] ) ) else setElementPosition(thePlayer, unpack ( posicoes [ azar ] ) ) end end addCommandHandler ( "fuckitwarp", PosicaoPlayer ) -----------wanted level------------ function callmks (source) setPlayerWantedLevel(source,6) playSoundFrontEnd ( source, 40) outputChatBox("Now you're wanted criminal feel free to rape the cops ",source,43, 22, 21) end addCommandHandler("wanted",callmks) --Thanks For Reading-- Link to comment
Woovie Posted October 23, 2014 Share Posted October 23, 2014 if getPlayerTeam(thePlayer)==getTeamFromName("Police") then --blah blah end Link to comment
Anubhav Posted October 23, 2014 Share Posted October 23, 2014 If it was me, I'd do this. if getTeamName(getPlayerTeam(thePlayer)) == "Police" then end Link to comment
Woovie Posted October 23, 2014 Share Posted October 23, 2014 I was going for easier to understand. They work identically though. Link to comment
sel3a Posted October 23, 2014 Author Share Posted October 23, 2014 i have to put this in the first line or the last ? and Thanks Link to comment
Woovie Posted October 23, 2014 Share Posted October 23, 2014 What are you trying to limit exactly? You put 2 functions and some table. Need to be a bit more specific. Link to comment
sel3a Posted October 23, 2014 Author Share Posted October 23, 2014 i am trying to put some functions like light ON/OFF, kick the passenger from the car, ped stats, setpedhealth in one file (lua script) and every functions with command handler i did those already but now i'm trying to make. hmm let's say there is a Team in a server called Freedom Fighters i am trying to make it this team is the only team who can use the commands. 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