Jump to content

| Fixed |


iPrestege

Recommended Posts

Posted (edited)

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

  

Posted

In the server side code you have an extra 'end'.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
In the server side code you have an extra 'end'.

Thanks But if you can explain How do I use the "end" Please :oops: .

Remove one of your 'END'.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
In the server side code you have an extra 'end'.

Thanks But if you can explain How do I use the "end" Please :oops: .

Remove one of your 'END'.

I know this, but I want to explain "end"

But α7мα∂qтя has explained it

Thank You Solidsnake14 For Help ! :)

  

Posted

What's the problem? does it have any error? write "/debugscript 3" in the chat.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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 
     )  

ahmadsig1.png

Nobody is perfect , I'm nobody.

22771qw7.jpg

Skype : ahmad.nasser37

Posted
What's the problem? does it have any error? write "/debugscript 3" in the chat.

Say Nothing ! :(

Try mine ^^

ahmadsig1.png

Nobody is perfect , I'm nobody.

22771qw7.jpg

Skype : ahmad.nasser37

Posted
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 ??

  

Posted

Please post the complete script.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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  
)  

Retired.

Posted
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

  

Posted
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

Retired.

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