Jump to content

How can i lock a Script to a Team?.


Recommended Posts

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.

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) 
            setVehicleOverrideLights (vehicle, 1) 
            outputChatBox ("FRF Lights Off!", src, 255, 0, 0) 
        return false 
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 ] ) ) 
            setElementPosition(thePlayer, unpack ( posicoes [ azar ] ) ) 
addCommandHandler ( "fuckitwarp", PosicaoPlayer  ) 
-----------wanted level------------ 
function callmks (source) 
playSoundFrontEnd ( source, 40) 
outputChatBox("Now you're wanted criminal feel free to rape the cops ",source,43, 22, 21) 

--Thanks For Reading--

Link to comment

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...