Jump to content

| Fixed |


iPrestege

Recommended Posts

Hi all,

I would like to program gangs script But i Have Some problem with this code !

-- Client Side 
  
addEventHandler ("onClientGUIClick", getRootElement(), 
 function( ) 
 if ( source ==  Police ) then  
 triggerServerEvent("Police",getLocalPlayer())  
 end 
 end 
)  

-- Server Side 
  
Police = createTeam ( "Police", 0,61,245, 0 ) 
addEvent("Police",true)  
addEventHandler("Police",root,  
 function( ) 
  
setPlayerTeam ( source, Police ) 
  
  outputChatBox("You Are Now in Police Gang", source, 0,61,245, true) 
  
end  
end  
 )  

:oops:

Edited by Guest
Link to comment
I'm sorry, but it did not work correctly , Solidsnake :( Can You Help Me ?
    -- Server Side 
      
    Police = createTeam ( "Police", 0,61,245, 0 ) 
    addEvent("Police",true) 
    addEventHandler("Police",root, 
    function(player) 
      
        setPlayerTeam ( player, Police ) 
      
        outputChatBox("You Are Now in Police Gang", player, 0,61,245, true) 
      
    end 
     )  

Link to comment
I'm sorry, but it did not work correctly , Solidsnake :( Can You Help Me ?
    -- Server Side 
      
    Police = createTeam ( "Police", 0,61,245, 0 ) 
    addEvent("Police",true) 
    addEventHandler("Police",root, 
    function(player) 
      
        setPlayerTeam ( player, Police ) 
      
        outputChatBox("You Are Now in Police Gang", player, 0,61,245, true) 
      
    end 
     )  

Does not work

Should to give the script admin rights ??

Link to comment

Try This

-- Client Side 
  
addEventHandler ("onClientGUIClick", getRootElement(), 
    function( ) 
        if ( source ==  Police ) then  
            triggerServerEvent("Police",getLocalPlayer())  
        end 
    end 
)  
  
-- Server Side 
  
Police = createTeam( "Police",0,61,245) 
addEvent("Police",true)  
addEventHandler("Police",root,  
    function () 
        setPlayerTeam ( source, Police ) 
        outputChatBox("You Are Now in Police Gang", source, 0,61,245, true) 
    end  
)  

Link to comment
Try This
-- Client Side 
  
addEventHandler ("onClientGUIClick", getRootElement(), 
    function( ) 
        if ( source ==  Police ) then  
            triggerServerEvent("Police",getLocalPlayer())  
        end 
    end 
)  
  
-- Server Side 
  
Police = createTeam( "Police",0,61,245) 
addEvent("Police",true)  
addEventHandler("Police",root,  
    function () 
        setPlayerTeam ( source, Police ) 
        outputChatBox("You Are Now in Police Gang", source, 0,61,245, true) 
    end  
)  

Thank You |Mr|-Talal07-| it,s Work ! :) Problem was in CreateTeam

Link to comment
Try This
-- Client Side 
  
addEventHandler ("onClientGUIClick", getRootElement(), 
    function( ) 
        if ( source ==  Police ) then  
            triggerServerEvent("Police",getLocalPlayer())  
        end 
    end 
)  
  
-- Server Side 
  
Police = createTeam( "Police",0,61,245) 
addEvent("Police",true)  
addEventHandler("Police",root,  
    function () 
        setPlayerTeam ( source, Police ) 
        outputChatBox("You Are Now in Police Gang", source, 0,61,245, true) 
    end  
)  

Thank You |Mr|-Talal07-| it,s Work ! :) Problem was in CreateTeam

You're Welcome

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