Jump to content

[help]F.B.I arrest system


MoeezKhan

Recommended Posts

Posted

i make a FBI job system but FBI can not arrest player please help me :(

----Client side-----

local marker = createMarker( 2516.9538574219,2447.7045898438,11.03125, "Cylinder", 1.5, 255, 0, 0, 0) 
 createPed  (2516.9538574219,2447.7045898438,11.03125, 286, 286) 
 createMarker(2516.9538574219,2447.7045898438,11.03125, "Cylinder", 1.5, 0, 0, 0, 0) 
createBlip ( 2516.9538574219,2447.7045898438,11.03125, 10, 55 ) 
  
  
GUIEditor_Button = {} 
GUIEditor_Memo = {} 
GUIEditor_Label = {} 
  
function guiMyCwindow(w,h,t) 
    local x,y = guiGetScreenSize() 
    return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) 
end 
          
windowjob = guiCreateWindow(448,172,480,418,"F.B.I System By Moeez",false) 
guiSetAlpha(windowjob,1) 
guiWindowSetMovable(windowjob,true) 
guiWindowSetSizable(windowjob,true) 
guiSetVisible(windowjob, false) 
GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,false,windowjob) 
GUIEditor_Button[1] = guiCreateButton(9,332,389,77,"Take F.B.I Job !",false,windowjob) 
GUIEditor_Button[2] = guiCreateButton(399,332,372,77,"Cancel",false,windowjob) 
GUIEditor_Memo[1] = guiCreateMemo(9,25,462,307,"\n\F.B.I Job:-\n F.B.I arrest robbors,drug dealer and kidnaper. ",false,windowjob) 
guiMemoSetReadOnly(GUIEditor_Memo[1],true) 
          
function SAPDjob(hitElement) 
    if getElementType(hitElement) == "player" and (hitElement == localPlayer) then 
    if not guiGetVisible(windowjob) then 
        guiSetVisible(windowjob, true) 
                      showCursor(true) 
                  end 
             end 
        end 
        addEventHandler("onClientMarkerHit", marker, SAPDjob) 
          
        function FBIjobleave(leaveElement) 
             if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then 
                  if guiGetVisible(windowjob) then 
                       guiSetVisible(windowjob, false) 
                       showCursor(false) 
                  end 
             end 
        end 
        addEventHandler("onClientMarkerLeave", marker, SAPDjobleave) 
          
        function joinTeam() 
             triggerServerEvent("gov",localPlayer) 
             guiSetVisible(windowjob, false) 
             showCursor(false) 
        end 
        addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) 
          
        function removeSAPDWindow() 
             guiSetVisible(windowjob, false) 
             showCursor(false) 
        end 
        addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSAPDWindow, false) 

----Server side-----

function createSAPDTeam () 
    
           SAPDteam = createTeam ("F.B.I", 255, 0, 0) 
  
    end 
  
function joinadmin() 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then 
local wlevel = getPlayerWantedLevel( source ) 
    end 
  
end 
  
       addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) 
  
        
function joinSAPD() 
      
        setPlayerTeam(source,SAPDteam) 
      
           setElementModel(source, 286) 
      
               setElementFrozen ( ped, true ) 
      
                 setElementHealth ( ped, 180 ) 
      
                     giveWeapon ( source, 3 ) 
      
                       giveWeapon ( source, 31,2500 ) 
      
                         setElementData( source, "Occupation", "Government", true ) 
      
                           setElementData ( source, "Rank", "Federal Agent" ) 
  
end 
  
addEvent("gov", true) 
addEventHandler("gov",root,joinSAPD) 

Posted

Thats not how it works, i'm belgian we speak dutch and I learned some scripting

You're location is set as London, Ontario why shouldn't you understand english?

Learn it is the only option, if you have problems with your script post them and we'll help but no script requests

Posted

Do you even know what he tells you ?

You just created the GUI and the Job marker.

But there's no FBI Arrest System or something like that .

We don't script for you.

If you have a script with errors we could help you.

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...